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.
Reviewed: https:/ /review. openstack. org/466481 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=10a62ec99e2 839f0fb163d38f3 7fa09e9f7b6c1c
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 10a62ec99e2839f 0fb163d38f37fa0 9e9f7b6c1c
Author: Jackie Truong <email address hidden>
Date: Thu May 4 12:51:22 2017 -0400
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] https:/ /github. com/openstack/ os-brick/ blob/6cf9b1cd68 9f70a2c50c0fa83 a9a9f7c502712a1 /os_brick/ encryptors/ cryptsetup. py#L100- L102
Closes-Bug: #1688342 a972038cf72b065 0321ded2856 018c16d17403242 7a172378ed)
Change-Id: I050585ecb55742
(cherry picked from commit 53a71c1241aac70