From fcdae78c3561eaa04295154758bc2c7c4db69d35 Mon Sep 17 00:00:00 2001 From: Adam King Date: Mon, 9 Sep 2024 18:51:17 -0400 Subject: [PATCH] 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 --- src/cephadm/cephadm.py | 6 ++++++ 1 file changed, 6 insertions(+) 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']) -- 2.47.3