I've put together a small patch that disables the auto creation of database schema and instead performs a simple query at service startup via the sqlalchemy models defined in glance.db.models. These queries will fail if the tables and their columns do not match the models, meaning the database is not up to date and migration needs to be run. Database connection/permission issues are also caught here, previously they were caught during auto creation.
Should note that packaging will run the manual migration (glance-manage db_sync) if glance-registry.conf points to a local database. Otherwise, it will just restart the service. In the case of a shared database that requires a migration run, the service will fail to start completely, which IMHO is better than a database that ends up in an inconsistent state -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/883988 Title: db migration failing when upgrading glance - trying to create existing tables To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glance/+bug/883988/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs