cinder-manage fails if a version of pbr<0.5.10 is installed

Bug #1182203 reported by Jay Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Jay Bryant

Bug Description

When attempting to install the Havana level of Cinder on a system we were encountering the following failure when attempting to execute 'cinder-manage db sync' :

[root@rhel6havana migrate_repo]# cinder-manage --debug db sync
2013-05-20 14:52:40 DEBUG [cinder.utils] backend <module 'cinder.db.sqlalchemy.migration' from '/usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migration.pyc'>
2013-05-20 14:52:40 DEBUG [migrate.versioning.repository] Loading repository /usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migrate_repo...
2013-05-20 14:52:40 CRITICAL [cinder] /usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migrate_repo
Traceback (most recent call last):
  File "/usr/bin/cinder-manage", line 820, in <module>
    main()
  File "/usr/bin/cinder-manage", line 817, in main
    fn(*fn_args)
  File "/usr/bin/cinder-manage", line 219, in sync
    return migration.db_sync(version)
  File "/usr/lib/python2.6/site-packages/cinder/db/migration.py", line 33, in db_sync
    return IMPL.db_sync(version=version)
  File "/usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migration.py", line 76, in db_sync
    current_version = db_version()
  File "/usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migration.py", line 86, in db_version
    repository = _find_migrate_repo()
  File "/usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migration.py", line 117, in _find_migrate_repo
    _REPOSITORY = Repository(path)
  File "/usr/lib/python2.6/site-packages/migrate/versioning/repository.py", line 77, in __init__
    self.verify(path)
  File "/usr/lib/python2.6/site-packages/migrate/versioning/repository.py", line 98, in verify
    raise exceptions.InvalidRepositoryError(path)
InvalidRepositoryError: /usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migrate_repo
[root@rhel6havana migrate_repo]#

After doing some investigation we discovered that the missing file was actually /usr/lib/python2.6/site-packages/cinder/db/sqlalchemy/migrate_repo/migrate.cfg . There appears to be a bug in PBR that was causing this file to be left out. The OpenStack people at RedHat were aware of this issue and advised us to move to PBR 0.5.10. That did resolve our problem.

So, the requires for PBR in Cinder should be pbr>=0.5.10,<0.6 to ensure that people who are installing on systems with previously installed PBR 0.5 levels do not encounter this issue.

Jay Bryant (jsbryant)
Changed in cinder:
assignee: nobody → Jay Bryant (jsbryant)
Revision history for this message
Monty Taylor (mordred) wrote :

yes. we should really bump the requirement across everything.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
Jay Bryant (jsbryant) wrote :

Looks like I have to update the level across all projects for them to accept the change. :-) Learned something else new.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/29820
Committed: http://github.com/openstack/cinder/commit/94220b145c6340fbfece511d8c45defef5a6c436
Submitter: Jenkins
Branch: master

commit 94220b145c6340fbfece511d8c45defef5a6c436
Author: Jay S. Bryant <email address hidden>
Date: Mon May 20 15:02:11 2013 -0500

    Ensure that pbr>=0.5.10 is installed

    A bug in PBR levels less than 0.5.10 causes the
    /usr/lib/python2.X/site-packages/cinder/db/sqlalchemy/migrate_repo/migrate.cfg
    file to not be properly installed. This causes 'cinder-manage db sync'
    to fail due to the missing file.

    This change sets the required PBR level to >=0.5.10,<0.6 to avoid the problem.
    In the case that user already has a 0.5.X level of PBR installed that is less
    than 0.5.10 it should be updated rather than encountering issues as our
    test system did.

    Change-Id: I532158277a4acbb2f8cb75d03c91097e6d7e0312
    fixes: bug 1182203

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-2 → 2013.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.