mgr/cephadm: don't cleanup the daemon keyring on failed redeploy

Fixes: https://tracker.ceph.com/issues/49872
Signed-off-by: Melissa Li <li.melissa.kun@gmail.com>
This commit is contained in:
Melissa Li 2021-03-29 00:34:42 -04:00
parent 94a0af289c
commit 9b6ae808c6

View File

@ -918,7 +918,8 @@ class CephadmServe:
daemon_spec.name(), OrchestratorEvent.ERROR, f'Failed to {what}: {err}')
return msg
except OrchestratorError:
if not reconfig:
redeploy = daemon_spec.name() in self.mgr.cache.get_daemon_names()
if not reconfig and not redeploy:
# we have to clean up the daemon. E.g. keyrings.
servict_type = daemon_type_to_service(daemon_spec.daemon_type)
dd = daemon_spec.to_daemon_description(DaemonDescriptionStatus.error, 'failed')