nova boot fails when using rbd backend

Bug #1352595 reported by Jens Rosenboom
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Yaguang Tang

Bug Description

Trace ends with:

TRACE nova.compute.manager [instance: c1edd5bf-ba48-4374-880f-1f5fa2f41cd3] File "/opt/stack/nova/nova/virt/libvirt/rbd.py", line 238, in exists
TRACE nova.compute.manager [instance: c1edd5bf-ba48-4374-880f-1f5fa2f41cd3] except rbd.ImageNotFound:
TRACE nova.compute.manager [instance: c1edd5bf-ba48-4374-880f-1f5fa2f41cd3] AttributeError: 'module' object has no attribute 'ImageNotFound'

It looks like the above module tries to do a "import rbd" and ends up importing itself again instead of the global library module.

A quick fix would be renaming the file to rbd2.py and changing the references in driver.py and imagebackend.py, but maybe there is a better solution?

Tags: rbd
Yaguang Tang (heut2008)
Changed in nova:
importance: Undecided → High
Yaguang Tang (heut2008)
tags: added: rbd
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/111892

Changed in nova:
assignee: nobody → Yaguang Tang (heut2008)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Yaguang Tang (<email address hidden>) on branch: master
Review: https://review.openstack.org/111892

Revision history for this message
Jens Rosenboom (frickler) wrote :

As there seems to be some uncertainty as to whether this really is a bug:

I could reproduce this easily with a fresh VM running Ubuntu 14.04 and just the plain devstack setup from http://techs.enovance.com/6572/brace-yourself-devstack-ceph-is-here

To confirm the wrong module being loaded, I added a "print(rbd)" just after the import and got this in the log:

<module 'nova.virt.libvirt.rbd' from '/opt/stack/nova/nova/virt/libvirt/rbd.py'>

This may be specific to the way that devstack starts nova-compute.

Revision history for this message
Daniel Berrange (berrange) wrote :

I'm investigating why we're not seeing this in unit tests - a sign that we've got some missing scenario probably.

Revision history for this message
Daniel Berrange (berrange) wrote :

Strangely I'm not seeing a failure when I use devstack on 14.04 with the stack conf from that blog post

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

I've got the same error with devstack+cinder+ceph

Revision history for this message
Daniel Berrange (berrange) wrote :

Oh, my devstack setup was messed up so it wasn't fully exercising RBD. Having fixed that I can reproduce the problem, so can try to figure out why our test suite don't see the same problem

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

Daniel, thanks! I'll provide test for this issue if needed

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

Reviewed: https://review.openstack.org/111892
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=81348368c70cd39c6241e7da6d33629e577494f5
Submitter: Jenkins
Branch: master

commit 81348368c70cd39c6241e7da6d33629e577494f5
Author: Yaguang Tang <email address hidden>
Date: Tue Aug 5 11:06:10 2014 +0800

    Rename rbd.py to rbd_utils.py in libvirt driver directory

    In libvirt driver directory, rbd.py confict with global rbd library
    which is imported in rbd.py, so we rename rbd.py to rbd_utils.py.

    Change-Id: Ib62e430e678fe09c4a8475a636a8ecc11a194f5c
    Closes-Bug: #1352595

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Dmitry Borodaenko (angdraug) wrote :

For the record, previous discussion of naming of this file:
https://review.openstack.org/#/c/94293/29/nova/virt/libvirt/ceph.py

Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.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.