From: Vallari Agrawal Date: Wed, 9 Apr 2025 08:21:39 +0000 (+0530) Subject: mgr/cephadm/module.py: Run ok_to_stop logic for stop X-Git-Tag: v20.1.0~43^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eee17f1d067e3164269c1ffca1dec23e3de08124;p=ceph.git 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 (cherry picked from commit 16bc30c9553e1ec8b4cb26c60bac86e1cf28bf43) --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 6ee03a1c696a..a69766fa8316 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: