db.utils.create_shadow_table() doesn't work if we have table with Enum column

Bug #1194106 reported by Boris Pavlovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Unassigned
oslo.db
Confirmed
Low
Unassigned

Bug Description

In postgres we are not able to create two times Enum with the same name.

So If we try to make a shadow table for table we will get exception that Enum with the same name already exists.

So we should rename our Enum.
I think that shadow_prefix + original_name will be good convention.

Tags: db postgresql
Changed in nova:
assignee: nobody → Boris Pavlovic (boris-42)
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/34643

Changed in nova:
assignee: Boris Pavlovic (boris-42) → Yongli He (yongli-he)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/35098

Changed in nova:
assignee: Yongli He (yongli-he) → Boris Pavlovic (boris-42)
David Ripton (dripton)
tags: added: postgresql
Revision history for this message
David Ripton (dripton) wrote :

The first review was abandoned and the second review doesn't seem to exist. Does anyone have an update on this? Looks pretty serious if it breaks all migrations with an Enum on postgres.

Revision history for this message
Boris Pavlovic (boris-42) wrote :

At this moment we don't use Enum, so it is not important at all

Revision history for this message
Matt Riedemann (mriedem) wrote :

Should this be handled in oslo.db now if it's not already?

Changed in nova:
status: In Progress → Triaged
assignee: Boris Pavlovic (boris-42) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

This code isn't in nova any more, moving to oslo.db

Changed in nova:
status: Triaged → Invalid
Changed in oslo.db:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.