mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
mgr/cephadm: Fixed cache update for updating daemon user_stopped status
Fixes: https://tracker.ceph.com/issues/73442 Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
This commit is contained in:
parent
51504dbf2a
commit
4e20140ecf
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user