sahara-api should not create DB from metadata
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Sahara |
Fix Released
|
Critical
|
Sergey Lukjanov |
Bug Description
Right now we create DB tables on sahara-api start:
https:/
We do this by creating tables from metadata. That is not right because we support alembic migrations. With alembic tables could be created with:
sahara-db-manage upgrade head
Comparing these two ways the second one is superior. Creating tables from metadata works _only_ by creating new tables from scratch. Alembic supports not just DB creation, but migrations as well out of the box. I.e. when a new Sahara project releases, user will just run the same 'sahara-db-manage upgrade head', and his DB will be migrated to a new version preserving all the data.
There is no sense in keeping tables creation from metadata, since alembic already does that. But also we should not run alembic migrations automatically on start. Managing DB is a serious task and should be performed by person, and not implicitly by server itself. For instance, a person might decide to take a backup before proceeding with upgrade.
Changed in sahara: | |
status: | Triaged → In Progress |
Changed in sahara: | |
status: | Fix Committed → Fix Released |
Changed in sahara: | |
milestone: | icehouse-rc1 → 2014.1 |
So, some additional notes:
* it'll remove implicit db management; /review. openstack. org/#/c/ 68631/2/ savanna/ main.py but it's missing one more place where db auto-created, so, it means that overall approach was applied and approved months ago, but it's a bug in this approach.
* it was already approved https:/