]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: Don't run `daemons_post` if _create_daemon fail
authorSebastian Wagner <sebastian.wagner@suse.com>
Thu, 30 Jul 2020 11:38:45 +0000 (13:38 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 21 Aug 2020 11:04:01 +0000 (13:04 +0200)
We can't run daemon_check_post for the type, if a single daemon failed.
Mainly cause `daemon_check_post` is run by service type.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit fdaa00977e3d9ee3bd1c6f5be69a0e93d6825136)

src/pybind/mgr/cephadm/module.py

index 476c1d9923432082eed70b73facaa7eac8fd96a4..287d4ccdad8595eba204b02c120e9f4d5736eb3c 100644 (file)
@@ -2129,9 +2129,13 @@ you may want to run:
                         reconfig=True)
                 except OrchestratorError as e:
                     self.events.from_orch_error(e)
+                    if dd.daemon_type in daemons_post:
+                        del daemons_post[dd.daemon_type]
                     # continue...
                 except Exception as e:
                     self.events.for_daemon_from_exception(dd.name(), e)
+                    if dd.daemon_type in daemons_post:
+                        del daemons_post[dd.daemon_type]
                     # continue...
 
         # do daemon post actions