db migration completely fails on sqlalchemy-migrate 0.6

Bug #962592 reported by Mark Washenberger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Mark Washenberger

Bug Description

Looks like the version checking code doesn't handle older versions of sqlalchemy migrate, where the migrate module lacks a __version__ attribute.

root@z4-api1:~# nova-manage db sync
Command failed, please check log for more info
2012-03-22 17:42:06 CRITICAL nova [-] 'module' object has no attribute '__version__'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-manage", line 1791, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/usr/bin/nova-manage", line 1778, in main
(nova): TRACE: fn(*fn_args, **fn_kwargs)
(nova): TRACE: File "/usr/bin/nova-manage", line 1097, in sync
(nova): TRACE: return migration.db_sync(version)
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/nova/db/migration.py", line 30, in db_sync
(nova): TRACE: return IMPL.db_sync(version=version)
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/nova/utils.py", line 662, in __getattr__
(nova): TRACE: backend = self.__get_backend()
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/nova/utils.py", line 657, in __get_backend
(nova): TRACE: self.__backend = __import__(name, None, None, fromlist)
(nova): TRACE: File "/usr/lib/python2.6/dist-packages/nova/db/sqlalchemy/migration.py", line 32, in <module>
(nova): TRACE: MIGRATE_PKG_VER = dist_version.StrictVersion(migrate.__version__)
(nova): TRACE: AttributeError: 'module' object has no attribute '__version__'
(nova): TRACE:

Changed in nova:
assignee: nobody → Mark Washenberger (markwash)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/5716

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/5716
Committed: http://github.com/openstack/nova/commit/164fb0cd52f00dafb506952374168ce20309a5ea
Submitter: Jenkins
Branch: master

commit 164fb0cd52f00dafb506952374168ce20309a5ea
Author: Mark Washenberger <email address hidden>
Date: Thu Mar 22 18:21:00 2012 -0400

    Assume migrate module missing __version__ is old

    Fixes bug 962592

    Change-Id: I9675b99df89d4f2d47e0a2fbfd13147fa1c7aeb7

Changed in nova:
status: In Progress → Fix Committed
Devin Carlen (devcamcar)
Changed in nova:
importance: Undecided → Medium
milestone: none → folsom-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.