From 279014ddc63f041ecd4145c23853c0ce657e768c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 10 Feb 2020 10:06:21 -0600 Subject: [PATCH] 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 --- src/pybind/mgr/cephadm/module.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 1a38ef0876c66..c5efca99cde2e 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, -- 2.39.5