Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octopus: ceph-volume: fix tags dict output in lvm list #44768

Merged
merged 1 commit into from Mar 2, 2022

Conversation

guits
Copy link
Contributor

@guits guits commented Jan 25, 2022

backport tracker: https://tracker.ceph.com/issues/54008


backport of #44219
parent tracker: https://tracker.ceph.com/issues/53425

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh

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>
(cherry picked from commit c24d366)
@guits guits requested a review from a team as a code owner January 25, 2022 09:58
@guits guits added this to the octopus milestone Jan 25, 2022
@guits
Copy link
Contributor Author

guits commented Jan 25, 2022

jenkins test ceph-volume tox

@guits
Copy link
Contributor Author

guits commented Jan 25, 2022

jenkins test ceph-volume all

@guits
Copy link
Contributor Author

guits commented Jan 25, 2022

jenkins test make check

@guits guits merged commit 3e50bf9 into ceph:octopus Mar 2, 2022
@guits guits deleted the wip-54008-octopus branch March 2, 2022 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants