]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/ssh: invalidate service state on create, remove, and service action
authorSage Weil <sage@redhat.com>
Mon, 4 Nov 2019 19:05:07 +0000 (13:05 -0600)
committerSage Weil <sage@redhat.com>
Wed, 6 Nov 2019 14:26:12 +0000 (08:26 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/ssh/module.py

index 505dfcdceccaa7edb1adc040b46e64e2d6b7f804..661a8fac56267e8e478210d42397be95f3cccbcb 100644 (file)
@@ -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):