Cannot mount old encrypted volume to an instance with Invalid password, cannot unlock any keyslot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Barbican |
New
|
Undecided
|
Unassigned |
Bug Description
Description
===========
After an upgrade of barbican from ussuri to yoga version there is no possibility to attach encrypted volumes created before an upgrade to any instance, because of an error: "libvirt.
So far there is no workaround. Tried to detach and attach volume again, tried to convert a volume to an image and back to volume, but no luck.
Steps to reproduce
==================
1. Have already created encrypted volume
2. Execute command:
openstack server add volume my-new-instance my-old-
3. Check attachments details by:
openstack server show my-new-instance
Expected result
===============
my-old-
Actual result
=============
my-old-
Barbican logs or cinder logs are not saying anything wrong. What is more, I can correctly retrieve a payload of a key from barbican and secret, which is used for keeping passphrase for a my-old-
barbican secret get --payload_
The same procedure, executed for a freshly created volume is working fine - new encrypted disk is visible inside instance OS.
Environment
===========
1. Exact version of OpenStack you are running. See the following
# dpkg -l | grep nova
ii nova-api 2:21.2.4-0ubuntu1 all OpenStack Compute - API frontend
ii nova-common 2:21.2.4-0ubuntu1 all OpenStack Compute - common files
ii nova-conductor 2:21.2.4-0ubuntu1 all OpenStack Compute - conductor service
ii nova-novncproxy 2:21.2.4-0ubuntu1 all OpenStack Compute - NoVNC proxy
ii nova-scheduler 2:21.2.4-0ubuntu1 all OpenStack Compute - virtual machine scheduler
ii python3-nova 2:21.2.4-0ubuntu1 all OpenStack Compute Python 3 libraries
ii python3-novaclient 2:17.0.0-0ubuntu1 all client library for OpenStack Compute API - 3.x
# dpkg -l | grep barbican
ii barbican-api 2:14.0.
ii barbican-common 2:14.0.
ii barbican-
ii barbican-worker 2:14.0.
ii python3-barbican 2:14.0.
ii python3-
2. Which hypervisor did you use?
Libvirt:
# dpkg -l | grep libvirt
ii libvirt-daemon 6.0.0-0ubuntu8.16 amd64 Virtualization daemon
ii libvirt-
ii libvirt-
ii libvirt0:amd64 6.0.0-0ubuntu8.16 amd64 library for interfacing with different virtualization systems
ii python3-libvirt 6.1.0-1 amd64 libvirt Python 3 bindings
2. Which storage type did you use?
iSCSI Huawei dorado
3. Which networking type did you use?
Neutron linuxbridge
Logs & Configs
==============
An error message from nova-compute log: https:/
After further troubleshooting I realized that issue is related to barbican. Seems that value key inside vault, received an incorrect luks passphrase(do not know how right now) and when volume is trying to be migrated, it receives a wrong luks passphrase and nova responses with error code which is a correct behavior. Seems that adding a new index to vault was done incorrectly in the past(in ussuri version?) and was fixed in the meantime as it is not visible anymore. Or it's not fixed and a key value can be somehow retrieved "modified" in a future? As I can see that vault key value was not modified from the beginning, seems like it was delivered to nova as a different value. So far I cannot find a relation for that in code, but definitely it's not a nova issue.