From: Sage Weil Date: Tue, 17 Dec 2019 14:05:04 +0000 (-0600) Subject: cephadm: drop 'sha256:' prefix on container id X-Git-Tag: v15.1.0~452^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1e0c2e2061179b285eefa5f9eae50d8e015f2c1b;p=ceph.git cephadm: drop 'sha256:' prefix on container id Podman doesn't include the prefix--only the (bionic) docker as far as I can tell. Signed-off-by: Sage Weil --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 9fea0b3add05..3511b13acca9 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -1786,6 +1786,13 @@ def list_daemons(detail=True, legacy_dir=None): verbose_on_failure=False) if not code: (container_id, image_name, image_id) = out.strip().split(',') + # docker adds the sha256: prefix, but AFAICS both + # docker (18.09.7 in bionic at least) and podman + # both always use sha256, so leave off the prefix + # for consistency. + prefix = 'sha256:' + if image_name.startswith(prefix): + image_name = image_name[len(prefix):] out, err, code = call( [container_path, 'exec', container_id, 'ceph', '-v'])