From 0c1455334054f1dad343b874f8c6b4b3f1be5599 Mon Sep 17 00:00:00 2001 From: yaelazulay-redhat Date: Wed, 22 Apr 2026 09:37:57 +0300 Subject: [PATCH] cephadm: replace call_throws with call in command_inspect_image Problem: During the upgrade, when inspecting the new ceph image for the first time, an error is printed to the ceph-mgr log instead of displaying a user-friendly message. Root cause: During an upgrade, inspect-image is called on each node to check if the target image exists locally before pulling it. This flow, where inspect-image always precedes the pull, occurs on nodes other than the first. Code Fixes: 1. src/cephadm/cephadm.py: Replace call_throws with call in command_inspect_image. call_throws raises a RuntimeError on any non-zero exit code, producing a full traceback in the logs. call returns the exit code instead of raising, so the function exits cleanly with errno.ENOENT when the image is not found. Fixes: https://tracker.ceph.com/issues/75448 Signed-off-by: Yael Azulay --- src/cephadm/cephadm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 7038d4214c8c..cb51e4a350f5 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -2044,7 +2044,7 @@ def _pull_image(ctx, image, insecure=False): @infer_image def command_inspect_image(ctx): # type: (CephadmContext) -> int - out, err, ret = call_throws(ctx, [ + out, err, ret = call(ctx, [ ctx.container_engine.path, 'inspect', '--format', '{{.ID}},{{.RepoDigests}}', ctx.image]) -- 2.47.3