Bug #44440
cephadm should be able to infer running container
0%
Description
If I use "cephadm" to deploy a Ceph cluster using "Container A" (not the default one) and I have that cluster running, my expectation is that "cephadm" will use that container, but (apparently) that's not the case.
Immediately after deployment, if I do:
admin:~ # cephadm -v shell pwd
I get the following output:
INFO:cephadm:Inferring fsid 45027a8a-5ee6-11ea-8557-525400902c65 DEBUG:cephadm:['/usr/bin/podman', 'run', '--rm', '--net=host', '-e', 'CONTAINER_IMAGE=docker.io/ceph/daemon-base:latest-master-devel', '-e', 'NODE_NAME=admin', '--entrypoint', 'stat', 'docker.io/ceph/daemon-base:latest-master-devel', '-c', '%u %g', '/var/lib/ceph'] DEBUG:cephadm:Running command: /usr/bin/podman run --rm --net=host -e CONTAINER_IMAGE=docker.io/ceph/daemon-base:latest-master-devel -e NODE_NAME=admin --entrypoint stat docker.io/ceph/daemon-base:latest-master-devel -c %u %g /var/lib/ceph DEBUG:cephadm:stat:stderr Trying to pull docker.io/ceph/daemon-base:latest-master-devel...Getting image source signatures ...
In other words, "cephadm" notices that the container image "docker.io/ceph/daemon-base:latest-master-devel" is not present on the system and tries to pull it from the registry.
I can work around this, either by supplying the image path on the command line every time I run cephadm, or by setting CEPHADM_IMAGE environment variable, but . . . isn't that too much to ask? Won't users expect cephadm to keep using a given image once it has deployed a cluster from that image?
Related issues
History
#1 Updated by Nathan Cutler about 4 years ago
- Description updated (diff)
#2 Updated by Nathan Cutler about 4 years ago
- Related to Feature #43937: cephadm: make default image configurable added
#3 Updated by Ricardo Marques about 4 years ago
- Category set to cephadm (binary)
#4 Updated by Ricardo Marques about 4 years ago
- Related to deleted (Feature #43937: cephadm: make default image configurable)
#5 Updated by Ricardo Marques about 4 years ago
- Duplicates Feature #43937: cephadm: make default image configurable added
#6 Updated by Ricardo Marques about 4 years ago
- Assignee set to Ricardo Marques
#7 Updated by Nathan Cutler about 4 years ago
- Status changed from New to Duplicate
#8 Updated by Ricardo Marques about 4 years ago
- Status changed from Duplicate to New
#9 Updated by Ricardo Marques about 4 years ago
- Duplicates deleted (Feature #43937: cephadm: make default image configurable)
#10 Updated by Ricardo Marques about 4 years ago
- Related to Feature #43937: cephadm: make default image configurable added
#11 Updated by Ricardo Marques about 4 years ago
As described in https://github.com/ceph/ceph/pull/33781#issuecomment-595760420, if 'image' isn't specified then cephadm should be able to infer which ceph image should be used by looking into `docker images` / `podman images` output, instead of always assuming the default image.
We should use image "Labels" to filter ceph images.
Instead of checking existing Labels like `GIT_REPO=*/ceph-container.git` or the presence of `CEPH_POINT_RELEASE`, a better approach is to create a new `"ceph": "True"` Label on https://github.com/ceph/ceph-container because `podman images --filter "label=<KEY>=<VALUE>"` always require a VALUE, and wildcards are not supported.
Then we will be able to filter ceph images by using the following command:
podman images --filter "label=ceph=True"
#12 Updated by Ricardo Marques about 4 years ago
ceph-container proposal for adding a new LABEL - https://github.com/ceph/ceph-container/pull/1604
#13 Updated by Ricardo Marques about 4 years ago
- Status changed from New to In Progress
#14 Updated by Sage Weil about 4 years ago
- Status changed from In Progress to Resolved