From a2fabd86db534f340b4119e0eac9aa305a05d8c1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 1 Nov 2019 11:49:06 -0500 Subject: [PATCH] mgr/ssh: use . as delimiter between service group and id This aligns with . as an entity delimiter in the ceph config. Signed-off-by: Sage Weil --- src/pybind/mgr/ssh/module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/ssh/module.py b/src/pybind/mgr/ssh/module.py index bd9c637a0a637..f8bee40150f9b 100644 --- a/src/pybind/mgr/ssh/module.py +++ b/src/pybind/mgr/ssh/module.py @@ -191,7 +191,7 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator): """ while True: if prefix: - name = prefix + '-' + name = prefix + '.' else: name = '' name += ''.join(random.choice(string.ascii_lowercase) @@ -477,7 +477,7 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator): sd.service_instance = host # e.g., crash if service_id and service_id != sd.service_instance: continue - if service_name and not sd.service_instance.startswith(service_name + '-'): + if service_name and not sd.service_instance.startswith(service_name + '.'): continue sd.nodename = host sd.container_id = d['container_id'] @@ -956,7 +956,7 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator): daemons = self._get_services('mds') results = [] for d in daemons: - if d.service_instance == name or d.service_instance.startswith(name + '-'): + if d.service_instance == name or d.service_instance.startswith(name + '.'): results.append(self._worker_pool.apply_async( self._remove_mds, (d.service_instance, d.nodename))) if not results: @@ -1008,7 +1008,7 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator): daemons = self._get_services('rgw') results = [] for d in daemons: - if d.service_instance == name or d.service_instance.startswith(name + '-'): + if d.service_instance == name or d.service_instance.startswith(name + '.'): results.append(self._worker_pool.apply_async( self._remove_rgw, (d.service_instance, d.nodename))) if not results: -- 2.39.5