]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix simple activate when legacy osd
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 10 Sep 2020 23:13:06 +0000 (01:13 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 21 Sep 2020 11:49:05 +0000 (13:49 +0200)
commitf6ac5b98480fad05bf840f96663f148caf7153fd
treee628695d31553a8fcfcc9a6e9e8e22f5d4cc46db
parent011e0c4bef9d8631e5cbfa1c15ef38b496f06f07
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>
(cherry picked from commit a3e9e215bda110b3224e165bee6565943b3f3c14)
src/ceph-volume/ceph_volume/devices/simple/activate.py