From 16bc30c9553e1ec8b4cb26c60bac86e1cf28bf43 Mon Sep 17 00:00:00 2001 From: Vallari Agrawal Date: Wed, 9 Apr 2025 13:51:39 +0530 Subject: [PATCH] mgr/cephadm/module.py: Run ok_to_stop logic for stop Also run ok_to_stop logic for daemons when stopping a daemon with "ceph orch daemon stop " Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2279225 Signed-off-by: Vallari Agrawal --- src/pybind/mgr/cephadm/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 1a5389d0260..7c305096569 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2667,7 +2667,7 @@ Then run the following: raise OrchestratorError( f'Unable to schedule redeploy for {daemon_name}: No standby MGRs') - if action == 'restart' and not force: + if action in ['restart', 'stop'] and not force: r = service_registry.get_service(daemon_type_to_service( d.daemon_type)).ok_to_stop([d.daemon_id], force=False) if r.retval: -- 2.39.5