[Bug 1633576] Re: neutron-db-manage fails when old migrations are present
James Page
james.page at ubuntu.com
Fri Oct 20 11:17:24 UTC 2017
Hi Jon
I've had a go at reproducing your bug; I installed a trusty-kilo based
neutron-server instance using a mysql backend and then basically
successfully completed:
for release in liberty mitaka; do
add-apt-repository cloud-archive:$release
apt update
apt -y dist-upgrade
neutron-db-manage upgrade head
done
all three db upgrades completed successfully; I also validated that
older migrations where removed on package upgrade between all three
releases.
Is there any chance that the offending migration file was not installed
via a package?
I'm going to mark this bug as Incomplete/Low for now; I appreciate it
was raised in 2016 so I suspect you've either figured out a workaround,
or what was actually wrong.
** Changed in: neutron (Ubuntu)
Status: New => Incomplete
** Changed in: neutron (Ubuntu)
Importance: Undecided => Low
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to neutron in Ubuntu.
https://bugs.launchpad.net/bugs/1633576
Title:
neutron-db-manage fails when old migrations are present
Status in neutron:
Invalid
Status in neutron package in Ubuntu:
Incomplete
Bug description:
Ubuntu 14.04 using cloud-archive packages upgrading from kilo to liberty
python-neutron:
Installed: 2:8.2.0-0ubuntu1~cloud0
500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/mitaka/main amd64 Packages
neutron db migration error in prod kilo->liberty upgrade:
# neutron-db-manage upgrade head
/usr/lib/python2.7/dist-packages/alembic/util/messaging.py:69: UserWarning: Revision havana referenced from havana -> 1cbdb560f806 (head), empty message is not present
<snip details at http://pastebin.com/D8Pdsvn9 >
KeyError: 'havana'
packages are additive so system had migrations for 'havana' in
/usr/lib/python2.7/dist-
packages/neutron/db/migration/alembic_migrations but current neutron-
db-manage doesn't know about 'havana' so freaks out.
solution:
rm -r /usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations
apt-get install --reinstall python-neutron
then migrations work as expected.
I feel like this is a packaging bug and old migrations should be
removed on upgrade. I could also see this as an upstream bug where
code should at least remember historic version names, but choosing to
report here ...
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1633576/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list