From 65674c63b77726c8514a22ac8738d67e219541f0 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 20 Mar 2020 17:18:48 +0100 Subject: [PATCH] mgr/cephadm: replace async_completion with trivial_completion Signed-off-by: Sebastian Wagner (cherry picked from commit 397d062759eeabad36a01ccee8bf0db3dfa1415b) --- src/pybind/mgr/cephadm/module.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index b351900578b95..e8d88d50aca6a 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1106,7 +1106,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): # type: (Optional[str]) -> List[str] return list(self.inventory.filter_by_label(label)) - @async_completion + @trivial_completion def add_host(self, spec): # type: (HostSpec) -> str """ @@ -1130,7 +1130,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): self.log.info('Added host %s' % spec.hostname) return "Added host '{}'".format(spec.hostname) - @async_completion + @trivial_completion def remove_host(self, host): # type: (str) -> str """ @@ -1145,7 +1145,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): self.log.info('Removed host %s' % host) return "Removed host '{}'".format(host) - @async_completion + @trivial_completion def update_host_addr(self, host, addr): self.inventory.set_addr(host, addr) self._reset_con(host) @@ -1164,13 +1164,13 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): """ return list(self.inventory.all_specs()) - @async_completion + @trivial_completion def add_host_label(self, host, label): self.inventory.add_label(host, label) self.log.info('Added label %s to host %s' % (label, host)) return 'Added label %s to host %s' % (label, host) - @async_completion + @trivial_completion def remove_host_label(self, host, label): self.inventory.rm_label(host, label) self.log.info('Removed label %s to host %s' % (label, host)) @@ -1416,6 +1416,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): self.cache.invalidate_host_daemons(host) return "{} {} from host '{}'".format(action, name, host) + @trivial_completion def daemon_action(self, action, daemon_type, daemon_id): args = [] for host, dm in self.cache.daemons.items(): @@ -2025,6 +2026,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): def apply_rgw(self, spec): return self._apply(spec) + @trivial_completion def add_iscsi(self, spec): # type: (ServiceSpec) -> orchestrator.Completion return self._add_daemon('iscsi', spec, self.iscsi_servcie.create, self.iscsi_servcie.config) @@ -2033,6 +2035,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): def apply_iscsi(self, spec): return self._apply(spec) + @trivial_completion def add_rbd_mirror(self, spec): return self._add_daemon('rbd-mirror', spec, self.rbd_mirror_service.create) @@ -2040,6 +2043,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): def apply_rbd_mirror(self, spec): return self._apply(spec) + @trivial_completion def add_nfs(self, spec): return self._add_daemon('nfs', spec, self.nfs_service.create, self.nfs_service.config) -- 2.39.5