From 5649d5571c14e6f739e5e6e75dcf28ea7c9fb6c1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 22 Feb 2020 09:41:30 -0600 Subject: [PATCH] mgr/cephadm: upgrade: handle stopped daemons A stopped daemon should have the correct target_name, and we should ensure that the host has an up-to-date image, so that when it does start it comes up with the new image. If it has an old image name, we should redeploy as per usual. Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 0a5ea3b066906..1feb791154508 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -706,6 +706,10 @@ class CephadmOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin): self._update_upgrade_progress(done / len(daemons)) + if d.status <= 0: + if d.container_image_name == target_name: + self.log.debug('daemon %s is stopped but has correct image name' % (d.name())) + continue if not self._wait_for_ok_to_stop(d): return None self.log.info('Upgrade: Redeploying %s.%s' % -- 2.39.5