Public bug reported:

Sometime during Kilo, the unique constraints on
metadef_namespaces (namespace)
metadef_objects(namespace_id, name)
metadef_properties(namespace_id, name)
metadef_tags(namespace_id, name)
metadef_resource_types(name)
were removed.
I believe this was done erroneously to make the migrate_repo/versions/scripts 
match the db/sqlalchemy/models_metadef.py definitions. Unfortunately, the 
schema scripts were correct with the unique constraints and what should have 
changed was the models_metadef.py.
This bug, puts one more migrate script in place which will rename any duplicate 
records it finds to make them unique and then re-establishes the unique 
constraints. It also, fixes models_metadef.py and adds in tests to create 
duplicates which should result in an HTTPConflict.

** Affects: glance
     Importance: Undecided
     Assignee: Wayne (wayne-okuma)
         Status: New


** Tags: metadef

** Changed in: glance
     Assignee: (unassigned) => Wayne (wayne-okuma)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1468946

Title:
  glance metadef tables need unique constraints

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  Sometime during Kilo, the unique constraints on
  metadef_namespaces (namespace)
  metadef_objects(namespace_id, name)
  metadef_properties(namespace_id, name)
  metadef_tags(namespace_id, name)
  metadef_resource_types(name)
  were removed.
  I believe this was done erroneously to make the migrate_repo/versions/scripts 
match the db/sqlalchemy/models_metadef.py definitions. Unfortunately, the 
schema scripts were correct with the unique constraints and what should have 
changed was the models_metadef.py.
  This bug, puts one more migrate script in place which will rename any 
duplicate records it finds to make them unique and then re-establishes the 
unique constraints. It also, fixes models_metadef.py and adds in tests to 
create duplicates which should result in an HTTPConflict.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1468946/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to