From e8078acf3c07fe33f3501e5b0c2b6dd62f44d144 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 5 Mar 2020 07:52:41 -0600 Subject: [PATCH] mgr/cephadm: upgrade: fix daemons missing image_id If a daemon isn't running, we don't know the image_id (hash), so we skip. But it's also possible to have a running daemon that doesn't report an image_id... like right after we deploy it when the container hasn't started up yet. Skip those too. Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index a3c768bdc29..3485023144d 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -819,9 +819,9 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): self._update_upgrade_progress(done / len(daemons)) - if d.status <= 0: + if not d.container_image_id: if d.container_image_name == target_name: - self.log.debug('daemon %s is stopped but has correct image name' % (d.name())) + self.log.debug('daemon %s has unknown container_image_id but has correct image name' % (d.name())) continue if not self._wait_for_ok_to_stop(d): return -- 2.39.5