Upgrade from Openstack Juno to Kilo fails with error [alembic.util] No such revision or branch 'juno-ucsm'
Environment
- Red Hat OpenStack 5.0 on RHEL 7 (installed initially)
- Red Hat OpenStack 6.0 on RHEL 7 (current version)
- openstack-neutron-2015.1.1-7.el7ost.noarch
Issue
- We are upgrading from Openstack Juno release to kilo release and the upgrade of neutron database/step:8.1 fails with the following error.
[root@controller1 ~]# openstack-db --service neutron --update
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
ERROR [alembic.util] No such revision or branch 'juno-ucsm'
Can't determine the existing sync level.
Please ensure the database is running and already initialised.
Resolution
NOTE: This issue only affects brand new deployments of Openstack 6 (Juno) and immediate upgrade to Openstack 7(Kilo).
This issue is being tracked by bugzilla
Workaround
1) Get the neutron DB-password from /etc/neutron/neutron.conf
:
grep connection /etc/neutron/neutron.conf
2) Check which version of database schema is present using the neutron-db-password in step (1):
# mysql -uneutron -p<password> neutron -e "select * from alembic_version"
- Confirm whether
juno-ucsm
is being used.
3) Correct this to use juno
instead:
# mysql -uneutron -p<password> neutron -e "update alembic_version set version_num='juno' where version_num='juno-ucsm'
4) Then check if there are any other tables using ucsm
:
# mysql -uneutron -p<password> neutron -e "show tables" | grep ucsm
5) Confirm if there are any ml2_ucsm_port_profiles
table that still exists? If yes, drop that table using:
# mysql -uneutron -p<password> neutron -e "drop table ml2_ucsm_port_profiles"
- Then use the following neutron command to update the database:
# neutron-db-manage current
- After this, you can follow the steps to continue updating the nova database.
Root Cause
- The juno-ucsm is a db schema in process added in the most recent Openstack 6.z release it has nothing to do with used plugin 'juno-ucsm'
- Migration change for OSP7 hasn't been released yet, "head" of Openstack 6 is not compatible with Openstack 7 at this time.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments