From: Shweta Bhosale Date: Thu, 27 Nov 2025 16:38:42 +0000 (+0530) Subject: mgr/cephadm: Fixed cache update for updating daemon user_stopped status X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e20140ecf673f95e9424ab1c938398fa9ea68bc;p=ceph.git mgr/cephadm: Fixed cache update for updating daemon user_stopped status Fixes: https://tracker.ceph.com/issues/73442 Signed-off-by: Shweta Bhosale --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 91dff724ad6..2072a8bf5b4 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -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) diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index 816c4c43be9..384e743a8c0 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -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 "({type}.{id})".format(type=self.daemon_type, id=self.daemon_id)