]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: fix redeploy (etc) of crash containers
authorSage Weil <sage@redhat.com>
Mon, 10 Feb 2020 16:06:21 +0000 (10:06 -0600)
committerSage Weil <sage@redhat.com>
Mon, 10 Feb 2020 18:41:00 +0000 (12:41 -0600)
When deploying a crash container, the crash keyring is the crash keyring,
and there is not additional crash_keyring for the implicit crash
container.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/cephadm/module.py

index 1a38ef0876c66d87b1f8ebc2088a2098485f9113..c5efca99cde2edd5a04ed81613070b8fbbaf4c88 100644 (file)
@@ -1320,7 +1320,7 @@ class CephadmOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin):
                     if '.' in d['name']:
                         sd.service_instance = '.'.join(d['name'].split('.')[1:])
                     elif d['name'] != '*':
-                        sd.service_instance = host  # e.g., crash
+                        sd.service_instance = host
                     if service_id and service_id != sd.service_instance:
                         continue
                     if service_name and not sd.service_instance.startswith(service_name + '.'):
@@ -1632,13 +1632,16 @@ class CephadmOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin):
         if extra_config:
             config += extra_config
 
-        # crash_keyring
-        ret, crash_keyring, err = self.mon_command({
-            'prefix': 'auth get-or-create',
-            'entity': 'client.crash.%s' % host,
-            'caps': ['mon', 'profile crash',
-                     'mgr', 'profile crash'],
-        })
+        if daemon_type != 'crash':
+            # crash_keyring
+            ret, crash_keyring, err = self.mon_command({
+                'prefix': 'auth get-or-create',
+                'entity': 'client.crash.%s' % host,
+                'caps': ['mon', 'profile crash',
+                         'mgr', 'profile crash'],
+            })
+        else:
+            crash_keyring = None
 
         j = json.dumps({
             'config': config,