]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix error 'KeyError' with inventory 44218/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 6 Dec 2021 09:24:46 +0000 (10:24 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Dec 2021 15:50:28 +0000 (16:50 +0100)
commit691660c42eaa568a754670e093c512aa041d1479
treead463e15b25ec6464b20830c5b4af622f9d01e8f
parentb7dfff6cf14240a394c21a83b26a9db8f535767a
ceph-volume: fix error 'KeyError' with inventory

The tag ceph.cluster_name is always set at the end.
The only way it could be absent was if the osd prepare
has been interrupted between [1] and [2].

[1] https://github.com/ceph/ceph/blob/v14.2.11/src/ceph-volume/ceph_volume/devices/lvm/strategies/bluestore.py#L355-L387
[2] https://github.com/ceph/ceph/blob/v14.2.11/src/ceph-volume/ceph_volume/devices/lvm/prepare.py

Although the code received tremendous changes meantime
and this error shouldn't show up again, we need to handle
the case where this tag wouldn't have been set.

Fixes: https://tracker.ceph.com/issues/44356
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
src/ceph-volume/ceph_volume/api/lvm.py