DB migration 209 can fail when deleting from instance_actions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Johannes Erdfelt |
Bug Description
Migration 209 adds foreign key constraints that were defined in the model but never applied as part of a migration.
Since the foreign key didn't exist previously, there may be rows that need to be deleted before the foreign key constraint is added.
It does this by selecting the list of rows that reference a nonexistant row in the parent table. It first dumps the rows into a dump table and then deletes the rows.
However, the instance_actions table is a parent in a foreign key relationship with the instance_
File "nova/db/
migrate_
File "site-packages/
return connection.
File "site-packages/
params)
File "site-packages/
compiled_sql, distilled_params
File "site-packages/
context)
File "site-packages/
None, sys.exc_info()[2]
IntegrityError: (IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`nova`
Changed in nova: | |
assignee: | nobody → Johannes Erdfelt (johannes.erdfelt) |
tags: | added: db |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
milestone: | none → icehouse-2 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-2 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/58384
Review: https:/