yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #38522
[Bug 1496146] [NEW] instance_actions table should have a UniqueConstraint on instance_uuid and request_id
Public bug reported:
An instance action should be unique per instance uuid and request ID.
That's pointed out in the data model:
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L1241
"The intention is that there will only be one of these per user request.
A lookup by (instance_uuid, request_id) should always return a single
result."
It's also enforced in the API:
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L5719
def action_get_by_request_id(context, instance_uuid, request_id):
"""Get the action by request_id and given instance."""
action = _action_get_by_request_id(context, instance_uuid, request_id)
return action
But that is not actually enforced in the schema using a
UniqueConstraint.
This is a low priority but it's technically something we should have in
the data model/schema.
** Affects: nova
Importance: Low
Status: Triaged
** Tags: db
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1496146
Title:
instance_actions table should have a UniqueConstraint on instance_uuid
and request_id
Status in OpenStack Compute (nova):
Triaged
Bug description:
An instance action should be unique per instance uuid and request ID.
That's pointed out in the data model:
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L1241
"The intention is that there will only be one of these per user
request. A lookup by (instance_uuid, request_id) should always return
a single result."
It's also enforced in the API:
https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L5719
def action_get_by_request_id(context, instance_uuid, request_id):
"""Get the action by request_id and given instance."""
action = _action_get_by_request_id(context, instance_uuid, request_id)
return action
But that is not actually enforced in the schema using a
UniqueConstraint.
This is a low priority but it's technically something we should have
in the data model/schema.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1496146/+subscriptions