From: Adam King Date: Mon, 9 Sep 2024 22:51:17 +0000 (-0400) Subject: cephadm: bootstrap: verify orch module is running before setting cephadm backend X-Git-Tag: v20.0.0~1083^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F59681%2Fhead;p=ceph.git cephadm: bootstrap: verify orch module is running before setting cephadm backend There have been occasional failures when bootstrapping with error messages like ``` Module 'orchestrator' is not enabled/loaded (required by command 'orch set backend'): use `ceph mgr module enable orchestrator` to enable it ``` despite the orchestrator being meant to be an always on module. Since trying to enable an already enabled module causes no issues, trying to enable it ourselves seems like a sensible workaround. Fixes: https://tracker.ceph.com/issues/67969 Signed-off-by: Adam King --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index e71addf7bfa5..a0c7c7f31e08 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -2408,6 +2408,12 @@ def enable_cephadm_mgr_module( logger.info('Enabling cephadm module...') cli(['mgr', 'module', 'enable', 'cephadm']) wait_for_mgr_restart() + # https://tracker.ceph.com/issues/67969 + # luckily `ceph mgr module enable ` returns + # a zero rc when the module is already enabled so + # this is no issue even if it is unnecessary + logger.info('Verifying orchestrator module is enabled...') + cli(['mgr', 'module', 'enable', 'orchestrator']) logger.info('Setting orchestrator backend to cephadm...') cli(['orch', 'set', 'backend', 'cephadm'])