instance_actions table should have a UniqueConstraint on instance_uuid and request_id
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Low
|
Pushkar Umaranikar |
Bug Description
An instance action should be unique per instance uuid and request ID. That's pointed out in the data model:
https:/
"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:/
def action_
"""Get the action by request_id and given instance."""
action = _action_
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.
Changed in nova: | |
assignee: | nobody → Akira KAMIO (akamio) |
Changed in nova: | |
assignee: | Akira KAMIO (akamio) → nobody |
Changed in nova: | |
assignee: | nobody → Rebecca Finn (rebeccax-finn) |
Changed in nova: | |
assignee: | Rebecca Finn (rebeccax-finn) → nobody |
Changed in nova: | |
assignee: | nobody → Pushkar Umaranikar (pushkar-umaranikar) |
Note that any database migration which adds a UniqueConstraint here would have to check for duplicates and drop them before attempting to create the constraint.