From: Sage Weil Date: Mon, 10 Feb 2020 16:06:21 +0000 (-0600) Subject: mgr/cephadm: fix redeploy (etc) of crash containers X-Git-Tag: v15.1.1~467^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33189%2Fhead;p=ceph.git mgr/cephadm: fix redeploy (etc) of crash containers 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 --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 1a38ef0876c6..c5efca99cde2 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -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,