Bug 1139243 - RHOS4->RHOS5 upgrade fails due to wrong version of python-migrate installed
Summary: RHOS4->RHOS5 upgrade fails due to wrong version of python-migrate installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-glance
Version: 5.0 (RHEL 6)
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: z1
: 5.0 (RHEL 6)
Assignee: Flavio Percoco
QA Contact: nlevinki
Dafna Ron
URL:
Whiteboard:
Depends On: 1133905
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-08 13:08 UTC by Lon Hohberger
Modified: 2022-07-09 07:02 UTC (History)
8 users (show)

Fixed In Version: openstack-glance-2014.1.2-3.el6ost
Doc Type: Bug Fix
Doc Text:
Clone Of: 1133905
Environment:
Last Closed: 2014-09-30 17:15:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-16482 0 None None None 2022-07-09 07:02:57 UTC
Red Hat Product Errata RHSA-2014:1338 0 normal SHIPPED_LIVE Moderate: openstack-glance security and bug fix update 2014-09-30 21:13:42 UTC

Description Lon Hohberger 2014-09-08 13:08:07 UTC
+++ This bug was initially created as a clone of Bug #1133905 +++

Dafna was following our upgrade documentation and ran into the following error while trying to upgrade the Cinder database:

  Can't determine the existing sync level.
  Please ensure the database is running and already initialised.

The actual error from /var/log/cinder/cinder-manage.log, was:

  TRACE cinder   File "/usr/lib/python2.6/site-packages/cinder/utils.py", line 423, in __get_backend
  TRACE cinder     self.__backend = __import__(name, None, None, fromlist)
  TRACE cinder   File "/usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migration.py", line 21, in <module>
  TRACE cinder     from migrate.versioning import api as versioning_api
  TRACE cinder   File "/usr/lib/python2.6/site-packages/migrate/versioning/api.py", line 33, in <module>
  TRACE cinder     from migrate.versioning import (repository, schema, version,
  TRACE cinder   File "/usr/lib/python2.6/site-packages/migrate/versioning/schema.py", line 10, in <module>
  TRACE cinder     from sqlalchemy import exceptions as sa_exceptions
  TRACE cinder ImportError: cannot import name exceptions

This is caused because after upgrading the openstack packages, python-migrate is still at version python-migrate-0.7.1-1.el6ost.noarch, while version python-migrate-0.8.2-2.el6ost.noarch is required.  The workaround is to manually upgrade python-migrate:

    yum upgrade python-migrate

The solution is to set a versioned Requires: on all of the openstack packages that require python-migrate.  According to 'repoquery --whatrequires python-migrate', this is:

  openstack-heat-common
  python-ceilometer
  python-cinder
  python-glance
  python-keystone
  python-nova

--- Additional comment from Lars Kellogg-Stedman on 2014-08-26 08:38:16 EDT ---

Using the openstack-cinder spec file as an example, I would probably change:

Requires:         python-sqlalchemy
Requires:         python-migrate

To:

Requires:         python-sqlalchemy >= 0.8.4
Requires:         python-migrate >= 0.8.2

--- Additional comment from Lars Kellogg-Stedman on 2014-08-26 13:48:48 EDT ---

Fixed in:

openstack-heat-2014.1.2-2.0.el6ost
openstack-ceilometer-2014.1.2-2.el6ost
openstack-cinder-2014.1.2-3.el6ost
openstack-glance-2014.1.2-3.el6ost
openstack-nova-2014.1.2-4.el6ost

This was previously fixed in:

openstack-keystone-2014.1.2.1-2.el6ost

Comment 3 Dafna Ron 2014-09-11 16:29:58 UTC
we do not fail on upgrade and the package exists after upgrade: 
[root@RHEL6 ~]# rpm -qa |grep python-sqlalchemy
python-sqlalchemy-0.8.4-1.el6ost.x86_64
python-sqlalchemy0.7-0.7.8-1.el6ost.x86_64
[root@RHEL6 ~]# rpm -qa |grep python-migrat
python-migrate-0.8.2-2.el6ost.noarch
[root@RHEL6 ~]#

Comment 5 errata-xmlrpc 2014-09-30 17:15:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-1338.html


Note You need to log in before you can comment on or make changes to this bug.