]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: don't cleanup the daemon keyring on failed redeploy 40459/head
authorMelissa Li <li.melissa.kun@gmail.com>
Mon, 29 Mar 2021 04:34:42 +0000 (00:34 -0400)
committerMelissa Li <li.melissa.kun@gmail.com>
Fri, 2 Apr 2021 02:57:15 +0000 (22:57 -0400)
Fixes: https://tracker.ceph.com/issues/49872
Signed-off-by: Melissa Li <li.melissa.kun@gmail.com>
src/pybind/mgr/cephadm/serve.py

index 824f674807523bb5aaf5bb1bf0a4c9b560cdc138..37bca503e0f0ce4f5b633c5621b456b16b270413 100644 (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')