Skip to content

Commit fcdae78

Browse files
committed
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 <[email protected]>
1 parent ce2c7d5 commit fcdae78

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cephadm/cephadm.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2408,6 +2408,12 @@ def enable_cephadm_mgr_module(
24082408
logger.info('Enabling cephadm module...')
24092409
cli(['mgr', 'module', 'enable', 'cephadm'])
24102410
wait_for_mgr_restart()
2411+
# https://tracker.ceph.com/issues/67969
2412+
# luckily `ceph mgr module enable <module>` returns
2413+
# a zero rc when the module is already enabled so
2414+
# this is no issue even if it is unnecessary
2415+
logger.info('Verifying orchestrator module is enabled...')
2416+
cli(['mgr', 'module', 'enable', 'orchestrator'])
24112417
logger.info('Setting orchestrator backend to cephadm...')
24122418
cli(['orch', 'set', 'backend', 'cephadm'])
24132419

0 commit comments

Comments
 (0)