]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/ssh: fix redeploy 31613/head
authorSage Weil <sage@redhat.com>
Wed, 13 Nov 2019 14:53:37 +0000 (08:53 -0600)
committerSage Weil <sage@redhat.com>
Wed, 13 Nov 2019 14:53:37 +0000 (08:53 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/orchestrator.py
src/pybind/mgr/ssh/module.py

index b5ca06a4378ba8b54acf02249ca987189f12c9b0..01985e2d9ac1776969cbacda95e26f75e31448f5 100644 (file)
@@ -448,7 +448,7 @@ class Orchestrator(object):
         :param service_id: service daemon instance (usually a short hostname)
         :rtype: WriteCompletion
         """
-        assert action in ["start", "stop", "reload"]
+        assert action in ["start", "stop", "reload", "restart", "redeploy"]
         assert service_name or service_id
         assert not (service_name and service_id)
         raise NotImplementedError()
index 4e0d6b7b112d109687a003e0c35cd730ea21c37f..2489215b8ea74b72c8080d8984c8dcb5fdc51b95 100644 (file)
@@ -12,6 +12,7 @@ import multiprocessing.pool
 
 from mgr_module import MgrModule
 import orchestrator
+from orchestrator import OrchestratorError
 
 from . import remotes
 
@@ -579,11 +580,13 @@ class SSHOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin):
                 self._service_action, (d.service_type, d.service_instance,
                                        d.nodename, action)))
         if not results:
-            n = service_name
-            if n:
-                n += '-*'
-            raise OrchestratorError('Unable to find %s.%s%s daemon(s)' % (
-                service_type, service_id, n))
+            if service_name:
+                n = service_name + '-*'
+            else:
+                n = service_id
+            raise OrchestratorError(
+                'Unable to find %s.%s daemon(s)' % (
+                    service_type, n))
         return SSHWriteCompletion(results)
 
     def _service_action(self, service_type, service_id, host, action):