Ask Your Question
0

Nova - unable to attach encrypted volume

asked 2016-03-27 04:59:41 -0500

bkopilov gravatar image

updated 2016-03-27 15:55:31 -0500

Hi , Installed openstack cloud on fedora 22 && devstack installer.

we are able to create an encrypted volume but can not attach it to nova .

Here is the Traceback :

2016-03-25 07:12:27.407 ERROR nova.volume.encryptors [req-a0b6168c-65e2-4691-b051-88fd53e179b3 tempest-TestBackupEncryptedCinderVolumes-1570305561 tempest-TestBackupEncr
yptedCinderVolumes-703484057] Error instantiating cryptsetup.CryptsetupEncryptor: No module named cryptsetup
2016-03-25 07:12:27.408 ERROR nova.virt.libvirt.driver [req-a0b6168c-65e2-4691-b051-88fd53e179b3 tempest-TestBackupEncryptedCinderVolumes-1570305561 tempest-TestBackupEn
cryptedCinderVolumes-703484057] [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a] Failed to attach volume at mountpoint: /dev/vdb
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a] Traceback (most recent call last):
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1338, in 
attach_volume
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]     encryption)
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1279, in 
_get_volume_encryptor
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]     **encryption)
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]   File "/opt/stack/nova/nova/volume/encryptors/__init__.py", line 48
, in get_volume_encryptor
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]     **kwargs)
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]   File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py",
 line 44, in import_object
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]     return import_class(import_str)(*args, **kwargs)
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]   File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py",
 line 30, in import_class
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a]     __import__(mod_str)
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a] ImportError: No module named cryptsetup
2016-03-25 07:12:27.408 TRACE nova.virt.libvirt.driver [instance: 102e49c4-94ad-4443-b187-08fca8d2a11a] 
2016-03-25 07:12:27.411 DEBUG nova.virt.libvirt.volume.iscsi [req-a0b6168c-65e2-4691-b051-88fd53e179b3 tempest-TestBackupEncryptedCinderVolumes-1570305561 tempest-TestBa

I tried the same on rhel7.2 with rhos8 packstack - same issue. I tried it with provider='cryptsetup.CryptsetupEncryptor' and 'luks.LuksEncryptor' , same result. Looks like nova complains that it can not import crypto packages .

When we try to attach the volume , looks like the volume state changed to "Attaching" and returned to "Available" again. It should be in "In-use" .

Any idea ?

edit retag flag offensive close merge delete

Comments

Have you tried installing cryptsetup package?

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2016-03-27 16:00:49 -0500 )edit

Did you set up keys in /etc/nova/nova.conf and /etc/cinder/cinder.conf in the key manager? See fixed_key in [keymgr].

mschuler gravatar imagemschuler ( 2017-09-11 08:37:02 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-09-09 13:21:44 -0500

AmitSanaye gravatar image

I am facing similar issue :

2017-09-09 23:47:23.252 22615 WARNING nova.volume.encryptors [req-21ab58b2-12e0-47c6-8aee-792666418520 90bb4840abd446ac9e68b9f19cd57164 e32ef10dbb0948d39eddbaa98c01d017 - - -] Use of the out of tree encryptor class nova.encryptors.luks.LuksEncryptor will be blocked with the 16.0.0 Pike release of Nova. 2017-09-09 23:47:23.253 22615 ERROR nova.volume.encryptors [req-21ab58b2-12e0-47c6-8aee-792666418520 90bb4840abd446ac9e68b9f19cd57164 e32ef10dbb0948d39eddbaa98c01d017 - - -] Error instantiating nova.encryptors.luks.LuksEncryptor: No module named encryptors.luks 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [req-21ab58b2-12e0-47c6-8aee-792666418520 90bb4840abd446ac9e68b9f19cd57164 e32ef10dbb0948d39eddbaa98c01d017 - - -] [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] Failed to attach volume at mountpoint: /dev/vdb 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] Traceback (most recent call last): 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1229, in attach_volume 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] encryption) 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1170, in _get_volume_encryptor 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] *encryption) 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] File "/usr/lib/python2.7/site-packages/nova/volume/encryptors/__init__.py", line 74, in get_volume_encryptor 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] *kwargs) 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 44, in import_object 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] return import_class(import_str)(args, *kwargs) 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 30, in import_class 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] __import__(mod_str) 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] ImportError: No module named encryptors.luks 2017-09-09 23:47:23.253 22615 ERROR nova.virt.libvirt.driver [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] 2017-09-09 23:47:25.279 22615 ERROR nova.virt.block_device [req-21ab58b2-12e0-47c6-8aee-792666418520 90bb4840abd446ac9e68b9f19cd57164 e32ef10dbb0948d39eddbaa98c01d017 - - -] [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] Driver failed to attach volume 8ccc883c-e49a-4e85-8a8f-efe04d5d1240 at /dev/vdb 2017-09-09 23:47:25.279 22615 ERROR nova.virt.block_device [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] Traceback (most recent call last): 2017-09-09 23:47:25.279 22615 ERROR nova.virt.block_device [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 273, in attach 2017-09-09 23:47:25.279 22615 ERROR nova.virt.block_device [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] device_type=self['device_type'], encryption=encryption) 2017-09-09 23:47:25.279 22615 ERROR nova.virt.block_device [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1243, in attach_volume 2017-09-09 23:47:25.279 22615 ERROR nova.virt.block_device [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] self._disconnect_volume(connection_info, disk_dev) 2017-09-09 23:47:25.279 22615 ERROR nova.virt.block_device [instance: 5e191917-e470-4d5a-94fe-bce1ac341cbe] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line ... (more)

edit flag offensive delete link more
0

answered 2016-03-27 22:13:38 -0500

bkopilov gravatar image

Hi , Yes i did from dnf tool

here are the packages : [root@cougar09 ~]# rpm -qa | grep crypts cryptsetup-devel-1.6.8-2.fc22.x86_64 cryptsetup-libs-1.6.8-2.fc22.x86_64 cryptsetup-python-1.6.8-2.fc22.x86_64 cryptsetup-devel-1.6.8-2.fc22.i686 cryptsetup-1.6.8-2.fc22.x86_64 cryptsetup-reencrypt-1.6.8-2.fc22.x86_64 cryptsetup-python3-1.6.8-2.fc22.x86_64 cryptsetup-libs-1.6.8-2.fc22.i686

Should i do it from pip install ?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-03-27 04:59:41 -0500

Seen: 159 times

Last updated: Sep 09