]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm/module.py: Run ok_to_stop logic for stop
authorVallari Agrawal <vallari.agrawal@ibm.com>
Wed, 9 Apr 2025 08:21:39 +0000 (13:51 +0530)
committerVallari Agrawal <vallari.agrawal@ibm.com>
Wed, 9 Apr 2025 08:21:39 +0000 (13:51 +0530)
Also run ok_to_stop logic for daemons when
stopping a daemon with "ceph orch daemon stop <daemon>"

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2279225
Signed-off-by: Vallari Agrawal <vallari.agrawal@ibm.com>
src/pybind/mgr/cephadm/module.py

index 1a5389d026083707205548227b8eb6123896571c..7c3050965693ca67d52d16e2d7d733a1a558e6f7 100644 (file)
@@ -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: