]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: allow activation of OSDs that have previously started
authorSage Weil <sage@newdream.net>
Mon, 6 Dec 2021 15:19:16 +0000 (10:19 -0500)
committerSebastian Wagner <sewagner@redhat.com>
Tue, 18 Jan 2022 10:54:17 +0000 (11:54 +0100)
commitf78a7a87334a01a223d91fc9c284ba00e8268a48
treea88fb2b3fafff1b47d402837047a9dddcf3fc472
parentaae0c4a4f1209fdd149d16c544252004eae8d535
mgr/cephadm: allow activation of OSDs that have previously started

When this code was introduced way back in ea987a0e56db106f7c76d11f86b3e602257f365e,
for some reason I was focused only on freshly created OSDs.  The
get_osd_uuid_map() helper is used by deploy_osd_daemons_for_existing_osds()
which is called not only by OSD creation but also by 'ceph cephadm
osd activate', which is meant to instantiate daemons for existing OSD
devices (e.g., devices that were reattached to a new server, or whose
/var/lib/ceph/$fsid/osd.$id directory was lost for some other reason.
However, if we ignore OSDs with up_from > 0, then we can't recreate a
daemon instance for such existing OSDs--arguably the most important ones,
since they may hold real data.

Fixes: https://tracker.ceph.com/issues/53491
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 40aeac7f52c80df0daa99bb664e3d672da3bc249)
src/pybind/mgr/cephadm/module.py