QemuImgInfo: encrypted has inconsistent value according to format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.utils |
Fix Released
|
Medium
|
Takashi Kajinami |
Bug Description
When format='human' is used, the ecnrypted attribute can be 'yes' or None. This is because the `qemu-img info` command shows "encrypted: yes" for encrypted images while no line with the encrypted key for non-encrypted images.
``
image: /dev/disk/
file format: luks
virtual size: 0.998 GiB (1071644672 bytes)
disk size: 0 B
encrypted: yes <====(*)
Format specific information:
ivgen alg: plain64
hash alg: sha256
cipher alg: aes-128
uuid: 001bdcd8-
cipher mode: xts
slots:
[0]:
...
payload offset: 2097152
master key iters: 113188
```
However when json format is used, the encrypted field of "qemu-img info" shows true or false.
```
{
"virtual-size": 1071644672,
"filename": "/dev/disk/
"format": "luks",
"actual-size": 0,
"format-
"type": "luks",
"data": {
"uuid": "ab4c427c-
{
}
},
"encrypted": true, <===(*)
"dirty-flag": false
}
```
Because of this now encrypted attribute can be different ('yes'/None vs true/false) according to the output format used.
description: | updated |
Changed in oslo.utils: | |
assignee: | nobody → Takashi Kajinami (kajinamit) |
description: | updated |
description: | updated |
Changed in oslo.utils: | |
importance: | Undecided → Medium |
Fix proposed to branch: master /review. opendev. org/c/openstack /oslo.utils/ +/807456
Review: https:/