Display alembic branch in neutron-db-manage current
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Wishlist
|
Matt Thompson |
Bug Description
In my AIO test instance, I have just upgraded neutron from 7.0.0.0b3.dev200 to 7.0.0.0b3.dev356. If I run 'neutron-db-manage current', I see:
root@aio_
Running current for neutron ...
2a16083502f3 (head)
1b4c6e320f79
OK
root@aio_
Based on this, I can see that one branch is not on head, and that migrations will need to be applied to that specific branch.
In our deployment tooling, what we currently do after neutron has upgraded is run 'neutron-db-manage upgrade liberty_
What would be ideal is if the 'neutron-db-manage current' output also indicated which alembic branch the migration ID was referring to. That way, we could determine if we're on head for a given branch, and if not proceed with applying the migrations for that specific branch. For the liberty_expand@head branch, this is a non-issue since these migrations can run with neutron-server up and responding. However, if we can avoid having to shut down neutron-server unnecessarily when there are no pending liberty_
Please give me a shout if I can provide any further information.
Thanks,
Matt
tags: | added: db |
Changed in neutron: | |
assignee: | nobody → Matt Thompson (mattt416) |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Thanks for the report!
The way it's done now is that neutron-db-manage merely calls to 'alembic current' that actually generates the output. If we want to see it with branch labels, we'll need to reimplement it to call to proper alembic API.
Also note for your tooling: liberty_contract is removed into contract, and liberty_expand into expand.