Project

General

Profile

Actions

Bug #46568

closed

cephadm: Sometimes setting global container_image does not work

Added by Varsha Rao almost 4 years ago. Updated about 3 years ago.

Status:
Can't reproduce
Priority:
Normal
Assignee:
-
Category:
cephadm
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Here container_image is set before enabling cephadm.

diff --git a/src/vstart.sh b/src/vstart.sh
index 8b6a84c205..51515a7b5b 100755
--- a/src/vstart.sh
+++ b/src/vstart.sh
@@ -972,9 +972,8 @@ EOF
     if [ "$cephadm" -eq 1 ]; then
         debug echo Enabling cephadm orchestrator
        if [ "$new" -eq 1 ]; then
-               DEFAULT_IMAGE="docker.io/ceph/daemon-base:latest-master-devel" 
-               podman image rm $DEFAULT_IMAGE 2>/dev/null || true
-               docker image rm $DEFAULT_IMAGE 2>/dev/null || true
+               digest=$(curl -s https://registry.hub.docker.com/v2/repositories/ceph/daemon-base/tags/latest-master-devel  | jq -r '.images[].digest')
+               ceph_adm config set global container_image "docker.io/ceph/daemon-base@$digest" 
        fi
         ceph_adm config-key set mgr/cephadm/ssh_identity_key -i ~/.ssh/id_rsa
         ceph_adm config-key set mgr/cephadm/ssh_identity_pub -i ~/.ssh/id_rsa.pub

[root@varsha build]# ../src/cephadm/cephadm ls
[
    {
        "style": "cephadm:v1",
        "name": "mds.a.varsha.icblyu",
        "fsid": "ad0a3d1a-7f92-45b4-ac3d-5e6894691b30",
        "systemd_unit": "ceph-ad0a3d1a-7f92-45b4-ac3d-5e6894691b30@mds.a.varsha.icblyu",
        "enabled": true,
        "state": "unknown",
        "container_id": null,
        "container_image_name": "docker.io/ceph/daemon-base@sha256:14ac3fa6c54439119f729a066a212bff09f54213dc53b64f396df719222d5810",
        "container_image_id": null,
        "version": null,
        "started": null,
        "created": "2020-07-14T12:54:55.404653",
        "deployed": "2020-07-14T12:54:54.649640",
        "configured": "2020-07-14T12:54:55.404653" 
    },
    {
        "style": "cephadm:v1",
        "name": "nfs.ganesha-vstart.varsha",
        "fsid": "ad0a3d1a-7f92-45b4-ac3d-5e6894691b30",
        "systemd_unit": "ceph-ad0a3d1a-7f92-45b4-ac3d-5e6894691b30@nfs.ganesha-vstart.varsha",
        "enabled": true,
        "state": "running",
        "container_id": "e70b0dee85192f93f4f97162ed7aa30403e77f907c44d158fd9928f4dd4c557b",
        "container_image_name": "docker.io/ceph/daemon-base:latest-master-devel",
        "container_image_id": "549703294cfc467fa7223f68a06b40867a861bdd710b1e7f89edbb6c5810e3f4",
        "version": "3.3",
        "started": "2020-07-14T12:54:59.104801",
        "created": "2020-07-14T12:54:58.526707",
        "deployed": "2020-07-14T12:54:57.767694",
        "configured": "2020-07-14T12:54:58.526707" 
    },
    {
        "style": "cephadm:v1",
        "name": "crash.varsha",
        "fsid": "ad0a3d1a-7f92-45b4-ac3d-5e6894691b30",
        "systemd_unit": "ceph-ad0a3d1a-7f92-45b4-ac3d-5e6894691b30@crash.varsha",
        "enabled": true,
        "state": "running",
        "container_id": "3c16bbbbe8150058a6e06ac8359b3f54998b5cdad754871315391d561308e293",
        "container_image_name": "docker.io/ceph/daemon-base:latest-master-devel",
        "container_image_id": "549703294cfc467fa7223f68a06b40867a861bdd710b1e7f89edbb6c5810e3f4",
        "version": "16.0.0-3423-g1904df80be",
        "started": "2020-07-14T12:54:38.166579",
        "created": "2020-07-14T12:54:37.981353",
        "deployed": "2020-07-14T12:54:36.965336",
        "configured": "2020-07-14T12:54:37.981353" 
    }
]
Actions #1

Updated by Sebastian Wagner about 3 years ago

  • Status changed from New to Can't reproduce

please reopen, if it is still reproducible

Actions

Also available in: Atom PDF