Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ceph-volume: fix tags dict output in
lvm list
Default value for `--crush-device-class` is `None`. When not passing this parameter, ceph-volume sets the value "None" in the lv tags. Therefore, ceph-volume will output that value with calling `ceph-volume lvm list --format json` For instance: ``` "1": [ { "devices": [ "/dev/sdc" ], "lv_name": "osd-data-5a4a34f5-5733-4c69-b439-edb48e31a45f", "lv_path": "/dev/ceph-aeb16fc3-9ac2-4126-ab66-bf920d101ea4/osd-data-5a4a34f5-5733-4c69-b439-edb48e31a45f", "lv_size": "49.00g", "lv_tags": "ceph.block_device=/dev/ceph-aeb16fc3-9ac2-4126-ab66-bf920d101ea4/osd-data-5a4a34f5-5733-4c69-b439-edb48e31a45f,ceph.block_uuid=E9hZNU-80Zz-PiER-iWN3-jSIU-krEN-khwU3x,ceph.cephx_lockbox_secret=,ceph.cluster_fsid=40fe4af5-0408-444b-843c-0926d550d1f1,ceph.cluster_name=ceph,ceph.crush_device_class=None,ceph.encrypted=0,ceph.osd_fsid=39680838-19df-4e50-9bb6-46b093d5b52b,ceph.osd_id=1,ceph.type=block,ceph.vdo=0", "lv_uuid": "E9hZNU-80Zz-PiER-iWN3-jSIU-krEN-khwU3x", "name": "osd-data-5a4a34f5-5733-4c69-b439-edb48e31a45f", "path": "/dev/ceph-aeb16fc3-9ac2-4126-ab66-bf920d101ea4/osd-data-5a4a34f5-5733-4c69-b439-edb48e31a45f", "tags": { "ceph.block_device": "/dev/ceph-aeb16fc3-9ac2-4126-ab66-bf920d101ea4/osd-data-5a4a34f5-5733-4c69-b439-edb48e31a45f", "ceph.block_uuid": "E9hZNU-80Zz-PiER-iWN3-jSIU-krEN-khwU3x", "ceph.cephx_lockbox_secret": "", "ceph.cluster_fsid": "40fe4af5-0408-444b-843c-0926d550d1f1", "ceph.cluster_name": "ceph", "ceph.crush_device_class": "None", ``` ceph-volume should print `"ceph.crush_device_class": "",` instead of `"ceph.crush_device_class": "None",` Fixes: https://tracker.ceph.com/issues/53425 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
- Loading branch information