From: Sage Weil Date: Wed, 13 Nov 2019 14:53:37 +0000 (-0600) Subject: mgr/ssh: fix redeploy X-Git-Tag: v15.1.0~909^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d23a53b7bd092346bf00d8fd66ff81cefc14f839;p=ceph.git mgr/ssh: fix redeploy Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index b5ca06a4378b..01985e2d9ac1 100644 --- a/src/pybind/mgr/orchestrator.py +++ b/src/pybind/mgr/orchestrator.py @@ -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() diff --git a/src/pybind/mgr/ssh/module.py b/src/pybind/mgr/ssh/module.py index 4e0d6b7b112d..2489215b8ea7 100644 --- a/src/pybind/mgr/ssh/module.py +++ b/src/pybind/mgr/ssh/module.py @@ -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):