From: Adam King Date: Mon, 6 Jun 2022 21:39:31 +0000 (-0400) Subject: mgr/cephadm: don't redeploy osds seen in raw list if cephadm knows them X-Git-Tag: v16.2.11~546^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9f4800a99c74f6359a0ae4ed05ad3d60232a6502;p=ceph.git mgr/cephadm: don't redeploy osds seen in raw list if cephadm knows them As is already done when checking the lvm list results and should also be done for checking raw list but is missing do ot a backporting mistake Tachnically a partial backport of #44228 that was not included in #44627 because raw osd support was not in pacific then Signed-off-by: Adam King --- diff --git a/src/pybind/mgr/cephadm/services/osd.py b/src/pybind/mgr/cephadm/services/osd.py index e00ca762240..5899ba49a98 100644 --- a/src/pybind/mgr/cephadm/services/osd.py +++ b/src/pybind/mgr/cephadm/services/osd.py @@ -162,6 +162,10 @@ class OSDService(CephService): if osd_id in before_osd_uuid_map and osd_id not in replace_osd_ids: # if it exists but is part of the replacement operation, don't skip continue + if self.mgr.cache.has_daemon(f'osd.{osd_id}', host): + # cephadm daemon instance already exists + logger.debug(f'osd id {osd_id} daemon already exists') + continue if osd_id not in osd_uuid_map: logger.debug('osd id {} does not exist in cluster'.format(osd_id)) continue