From: Sage Weil Date: Mon, 4 Nov 2019 19:05:07 +0000 (-0600) Subject: mgr/ssh: invalidate service state on create, remove, and service action X-Git-Tag: v15.1.0~1020^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26789b3940619b8da85aed2ca249e75c5c7fb02f;p=ceph.git mgr/ssh: invalidate service state on create, remove, and service action Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/ssh/module.py b/src/pybind/mgr/ssh/module.py index 505dfcdcecca..661a8fac5626 100644 --- a/src/pybind/mgr/ssh/module.py +++ b/src/pybind/mgr/ssh/module.py @@ -591,6 +591,7 @@ class SSHOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin): host, name, 'unit', ['--name', name, a], error_ok=True) + self.service_cache.invalidate(host) self.log.debug('_service_action code %s out %s' % (code, out)) return "{} {} from host '{}'".format(action, name, host) @@ -763,7 +764,7 @@ class SSHOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin): ] + extra_args, stdin=j) self.log.debug('create_daemon code %s out %s' % (code, out)) - + self.service_cache.invalidate(host) return "(Re)deployed {} on host '{}'".format(name, host) except Exception as e: @@ -782,6 +783,7 @@ class SSHOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin): host, name, 'rm-daemon', ['--name', name]) self.log.debug('_remove_daemon code %s out %s' % (code, out)) + self.service_cache.invalidate(host) return "Removed {} from host '{}'".format(name, host) def _create_mon(self, host, network):