attach encrypted volume, raise "Empty module name" exception

Bug #1384653 reported by wanghao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
wanghao

Bug Description

Create encrypted volume type by using "encryption-type-create", the provider is "LuksEncryptor". Then attach the encrypted volume to vm, there is an exception raising in nova/volume/encryptor/__init__.py.

The error log:

2014-10-23 02:03:04.115 ERROR nova.virt.libvirt.driver [req-5f4f611c-2c6f-4e2f-9a42-f9dad529054a admin demo] [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] Failed to attach volume at mountpoint: /dev/vdb
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] Traceback (most recent call last):
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1380, in attach_volume
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] encryption)
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1327, in _get_volume_encryptor
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] **encryption)
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] File "/opt/stack/nova/nova/volume/encryptors/__init__.py", line 41, in get_volume_encryptor
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] **kwargs)
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] File "/usr/local/lib/python2.7/dist-packages/oslo/utils/importutils.py", line 38, in import_object
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] return import_class(import_str)(*args, **kwargs)
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] File "/usr/local/lib/python2.7/dist-packages/oslo/utils/importutils.py", line 27, in import_class
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] __import__(mod_str)
2014-10-23 02:03:04.115 15313 TRACE nova.virt.libvirt.driver [instance: c2589f3a-3d20-44fc-bb37-88e65cb13b2d] ValueError: Empty module name

the code should add full class name when user set encryption provider like "LuksEncryptor" or "CryptsetupEncryptor".

wanghao (wanghao749)
Changed in nova:
assignee: nobody → wanghao (wanghao749)
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/130497

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

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

commit e54fb007a803b61dfcbc918d11e49eb616042f55
Author: wanghao <email address hidden>
Date: Thu Oct 23 19:02:48 2014 +0800

    fix 'Empty module name' exception attaching volume

    Create encrypted volume type with 'LuksEncryptor'
    provider, and attach the encrypted volume to volume.
    Then nova raise the exception "Empty module name".
    The code should add the full module name automatic.

    Change-Id: I641036fb5428154d73c2a1a0ed58171152b3900b
    Closes-bug: #1384653

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