yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #39197
[Bug 1468946] Re: glance metadef tables need unique constraints
** Changed in: glance
Status: Fix Committed => Fix Released
--
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 Glance:
Fix Released
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
References