nova/nova/virt/libvirt/storage
Jackie Truong 10a62ec99e Fix decoding of encryption key passed to dmcrypt
This patch fixes the decoding of the encryption key passed to dmcrypt.
During the key management move from Nova to Castellan, in the Newton
release, conversion of the encryption key (from a string to list of
unsigned ints) was removed from the key retrieval method. This patch
updates dmcrypt to decode an encryption key string, rather than a list
of unsigned ints. See the linked bug for more information.

The method used to decode the encryption key has been updated to use
binascii, as done in os-brick [1], to maintain consistency. The key
generation and decoding portions of test_dmcrypt have been updated to
reflect this change and ensure compatibility with both, Python 2 and
Python 3.

[1] 6cf9b1cd68/os_brick/encryptors/cryptsetup.py (L100-L102)

Closes-Bug: #1688342
Change-Id: I050585ecb55742a972038cf72b0650321ded2856
(cherry picked from commit 53a71c1241)
2017-05-23 16:01:53 +01:00
..
__init__.py libvirt: move lvm/dmcrypt/rbd_utils modules under storage subdir 2015-07-27 12:47:31 -07:00
dmcrypt.py Fix decoding of encryption key passed to dmcrypt 2017-05-23 16:01:53 +01:00
lvm.py Config options: centralize lvm libvirt options (4) 2016-05-06 08:28:36 +00:00
rbd_utils.py Fix issue with not removing rbd rescue disk 2016-10-13 11:49:51 +00:00