]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: don't collect image ids for daemons with no container info 64079/head
authorAdam King <adking@redhat.com>
Wed, 23 Apr 2025 17:02:13 +0000 (13:02 -0400)
committerAdam King <adking@redhat.com>
Sat, 21 Jun 2025 19:40:43 +0000 (15:40 -0400)
This was missed as part of
https://github.com/ceph/ceph/commit/49405967620c9dbb69a1ea4660af46c240fcd298
as this particular bit seems to only cause an issue
when you pass in --name to shell and the daemon
you pass to --name is not running. That procedure (stopping the daemon
and then passing it's name to shell) is what is used to run tools like
ceph-objectstore-tool and ceph-monstore-tool for debugging

Fixes: https://tracker.ceph.com/issues/70989
NOTE: for the tracker, the actual specific issue this change
fixes is the one shown in https://tracker.ceph.com/issues/70989#note-2
The original reported issue was fixed by the linked commit

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 94dbc49e2b1877f798faae19fe5d3e15eea8d0c2)

src/cephadm/cephadmlib/container_lookup.py

index 3d44b57d8d4af9e01201808c4da99ce0f6920bb4..2924990161fb17f60c3cfa90f7cf7b3ba0daeecb 100644 (file)
@@ -132,7 +132,9 @@ def infer_local_ceph_image(
     ]
     # collect the running ceph daemon image ids
     images_in_use_by_daemon = set(
-        d.image_id for d, n in matching_daemons if n == daemon_name
+        d.image_id
+        for d, n in matching_daemons
+        if (n == daemon_name and d is not None)
     )
     images_in_use = set(
         d.image_id for d, _ in matching_daemons if d is not None