ceph backup driver broken import

Bug #1231412 reported by Edward Hope-Morley on 2013-09-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Edward Hope-Morley

Bug Description

I using non rbd driver e.g. lvm for volumes and rbd driver for backups I get this:

2013-09-26 11:55:46.359 ERROR cinder.openstack.common.rpc.amqp [req-4d4463da-0043-4c93-ba5f-63c11914df16 85cd3a74a6bb43eb87b100776993af0f 96da9a1604614b43ab0475c59f053126] Exception during message handling
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/amqp.py", line 441, in _process_data
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp **args)
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/dispatcher.py", line 148, in dispatch
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/utils.py", line 804, in wrapper
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp return func(self, *args, **kwargs)
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/backup/manager.py", line 196, in create_backup
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp 'fail_reason': unicode(err)})
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/backup/manager.py", line 189, in create_backup
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp self.driver.backup_volume(context, backup, backup_service)
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/drivers/lvm.py", line 328, in backup_volume
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp backup_service.backup(backup, volume_file)
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/backup/drivers/ceph.py", line 747, in backup
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp volume_name, length)
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/backup/drivers/ceph.py", line 598, in _full_backup
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp with drivers.rbd.RADOSClient(self, self._ceph_backup_pool) as client:
2013-09-26 11:55:46.359 TRACE cinder.openstack.common.rpc.amqp AttributeError: 'module' object has no attribute 'rbd'

I do not get this problem when using the rbd driver with rbd backup. Looks like weird import issue

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

Changed in cinder:
assignee: nobody → Edward Hope-Morley (hopem)
status: New → In Progress

Reviewed: https://review.openstack.org/48443
Committed: http://github.com/openstack/cinder/commit/c683f2fafc69eab7f6ff88d94adc37506d5b5714
Submitter: Jenkins
Branch: master

commit c683f2fafc69eab7f6ff88d94adc37506d5b5714
Author: Edward Hope-Morley <email address hidden>
Date: Thu Sep 26 14:05:24 2013 +0100

    Fixes ceph backup import errors

    For some reason, using non-rbd volume driver whilst using
    Ceph backup causes what looks to be a cyclic import error.
    Ensuring that the backup.drivers.ceph module is imported
    into volume.drivers.rbd ONLY if it is needed i.e. if both
    drivers are in use, seems to remedy this.

    Change-Id: Ieae0c3451cfb1750eca8cfcde5e0be9e7eb028d0
    Fixes: bug 1231412

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-10-04
Changed in cinder:
milestone: none → havana-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers