summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthew Vernon <mvernon@wikimedia.org>2024-08-28 17:37:46 +0200
committerMatthew Vernon <mvernon@wikimedia.org>2024-08-28 20:04:18 +0200
commitb863c93ef1a1ce85164584dd17c5e71441bc550f (patch)
tree1359dcda0ede1565bdb26006244cf3c7328779f7 /src
parentMerge PR #59300 into main (diff)
downloadceph-b863c93ef1a1ce85164584dd17c5e71441bc550f.tar.xz
ceph-b863c93ef1a1ce85164584dd17c5e71441bc550f.zip
cephadm: emit warning if daemon's image is not to be used
If an image is not specified, cephadm shell will use the image corresponding to a Ceph daemon running on the host (and will log a debug message to that effect). However, it will only use that image if it appears in the output of: podman images --filter label=ceph=True --filter dangling=false This commit means that cephadm will emit a warning if the container image it was going to use fails this check, so the operator has more of a clue to what is going on. Fixes: https://tracker.ceph.com/issues/67778 Signed-off-by: Matthew Vernon <mvernon@wikimedia.org>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cephadm/cephadm.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py
index e71addf7bfa..587c2c0529b 100755
--- a/src/cephadm/cephadm.py
+++ b/src/cephadm/cephadm.py
@@ -595,6 +595,8 @@ def infer_local_ceph_image(ctx: CephadmContext, container_path: str) -> Optional
if digest and not digest.endswith('@'):
logger.info(f"Using ceph image with id '{image_id}' and tag '{tag}' created on {created_date}\n{digest}")
return digest
+ if container_info is not None:
+ logger.warning(f"Not using image '{container_info.image_id}' as it's not in list of non-dangling images with ceph=True label")
return None