]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix error 'KeyError' with inventory 44883/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 6 Dec 2021 09:24:46 +0000 (10:24 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 16 Feb 2022 17:24:45 +0000 (18:24 +0100)
commitf92ec024b101a2313f8292cb94f5b25a93b7affb
tree55e74e7dcb32d1331a9b1caa6a60b930ff352d0c
parent7516df7fec9d21581a28fd4addedfd8e4c26f0d9
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>
(cherry picked from commit 691660c42eaa568a754670e093c512aa041d1479)
src/ceph-volume/ceph_volume/api/lvm.py