]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: upgrade: handle stopped daemons
authorSage Weil <sage@redhat.com>
Sat, 22 Feb 2020 15:41:30 +0000 (09:41 -0600)
committerSage Weil <sage@redhat.com>
Mon, 24 Feb 2020 15:47:01 +0000 (09:47 -0600)
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 <sage@redhat.com>
src/pybind/mgr/cephadm/module.py

index 0a5ea3b066906dbb578e5b580cfbc4988f2acc82..1feb79115450816cec46952e0650c79dc00f5e21 100644 (file)
@@ -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' %