]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: Fixed cache update for updating daemon user_stopped status
authorShweta Bhosale <Shweta.Bhosale1@ibm.com>
Thu, 27 Nov 2025 16:38:42 +0000 (22:08 +0530)
committerShweta Bhosale <Shweta.Bhosale1@ibm.com>
Tue, 30 Jun 2026 12:52:11 +0000 (18:22 +0530)
Fixes: https://tracker.ceph.com/issues/73442
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/orchestrator/_interface.py

index 91dff724ad624f2d6378a6c3f35e659ad3eb6bc6..2072a8bf5b49ea9f97d1b55bccb8a896ad317654 100644 (file)
@@ -3147,11 +3147,11 @@ Then run the following:
 
         # Track user-initiated stop/start actions
         if action == 'stop':
-            d.user_stopped = True
-            self.cache.update_host_daemons(d.hostname, {d.name(): d})
+            d.update_user_stopped_status(True)
+            self.cache.save_host(d.hostname)
         elif action in ['start', 'restart']:
-            d.user_stopped = False
-            self.cache.update_host_daemons(d.hostname, {d.name(): d})
+            d.update_user_stopped_status(False)
+            self.cache.save_host(d.hostname)
 
         self._daemon_action_set_image(action, image, d.daemon_type, d.daemon_id)
 
index 816c4c43be972fa22b769d5171026471708f63c2..384e743a8c059844635f8a145a47088a15f27c52 100644 (file)
@@ -1428,6 +1428,9 @@ class DaemonDescription(object):
     def update_pending_daemon_config(self, value: bool) -> None:
         self.pending_daemon_config = value
 
+    def update_user_stopped_status(self, value: bool) -> None:
+        self.user_stopped = value
+
     def __repr__(self) -> str:
         return "<DaemonDescription>({type}.{id})".format(type=self.daemon_type,
                                                          id=self.daemon_id)