]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: don't cleanup the daemon keyring on failed redeploy
authorMelissa Li <li.melissa.kun@gmail.com>
Mon, 29 Mar 2021 04:34:42 +0000 (00:34 -0400)
committerSage Weil <sage@newdream.net>
Fri, 23 Apr 2021 12:24:13 +0000 (07:24 -0500)
Fixes: https://tracker.ceph.com/issues/49872
Signed-off-by: Melissa Li <li.melissa.kun@gmail.com>
(cherry picked from commit 9b6ae808c68feec672c6e55a65bcde22b7085ee4)

src/pybind/mgr/cephadm/serve.py

index 15cb8d7c3bfde8c4c40763a70e60017140c062bb..1344fdd4e2ba9dd58a39baae292dede8b54e5afa 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')