Skip to content

Commit 94dbc49

Browse files
committed
cephadm: don't collect image ids for daemons with no container info
This was missed as part of ceph@4940596 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 <[email protected]>
1 parent 7e91398 commit 94dbc49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cephadm/cephadmlib/container_lookup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ def infer_local_ceph_image(
132132
]
133133
# collect the running ceph daemon image ids
134134
images_in_use_by_daemon = set(
135-
d.image_id for d, n in matching_daemons if n == daemon_name
135+
d.image_id
136+
for d, n in matching_daemons
137+
if (n == daemon_name and d is not None)
136138
)
137139
images_in_use = set(
138140
d.image_id for d, _ in matching_daemons if d is not None

0 commit comments

Comments
 (0)