]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix simple activate when legacy osd 37093/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 10 Sep 2020 23:13:06 +0000 (01:13 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 16 Sep 2020 09:13:11 +0000 (11:13 +0200)
commita3e9e215bda110b3224e165bee6565943b3f3c14
tree5c79991502376f0c90417ea7ff928e2ea48a1407
parent25e5b8726d3a84dc48c5c588604927065c0bcc6d
ceph-volume: fix simple activate when legacy osd

`ceph-volume simple activate --all` relies on the presence of json files
in `/etc/ceph/osd` that was created with `ceph-volume simple scan`
command.

In a cluster lifecycle, it is very likely an OSD which was deployed with
ceph-disk at some point gets removed or replaced. It means the corresponding
json file in `/etc/ceph/osd` becomes unrelevant. It makes `ceph-volume
simple activate --all` fails because it tries to mount non existing
partitions.
The idea here is to simply warn the user that the osd described in the
json file doesn't exist anymore and exit properly instead of throwing an
error.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1877672
Closes: https://tracker.ceph.com/issues/47493
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
src/ceph-volume/ceph_volume/devices/simple/activate.py