← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1257829] [NEW] Misspelled encryption field in QemuImgInfo

 

You have been subscribed to a public bug:

Location: openstack.common.imageutils.QemuImgInfo
Method: __init__
Error: line 45, self.encryption = details.get('encryption')

The parsing of the encryption field for qemu-img commands does not work.
The key used to index the details dictionary for encryption information,
'encryption', does not match the key generated by qemu-img, 'encrypted.'
As a result, the encryption field is always 'None', regardless of the
image's encryption status.

Example call to 'qemu-img info':
$ qemu-img info encrypted_disk.qcow2
Disk image 'encrypted_disk.qcow2' is encrypted.
password: 
image: encrypted_disk.qcow2
file format: qcow2
virtual size: 16G (17179869184 bytes)
disk size: 136K
encrypted: yes
cluster_size: 65536
backing file: debian_squeeze_i386_standard.qcow2 (actual path: debian_squeeze_i386_standard.qcow2)

Proposed Fix:
Simply change the key used to index the encryption information.

self.encrypted = details.get('encrypted')

Since the fields in __init__ seem to be named to match the keys used to
index the corresponding information, I would also propose changing the
attribute from self.encryption to self.encrypted, and updating any
references to it wherever appropriate.

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: cinder encryption nova oslo qemu
-- 
Misspelled encryption field in QemuImgInfo
https://bugs.launchpad.net/bugs/1257829
You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova).


References