From: Nizamudeen A Date: Tue, 28 Oct 2025 07:46:26 +0000 (+0530) Subject: mgr/dashboard: fixes for quick-bootstrap script X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F66075%2Fhead;p=ceph.git mgr/dashboard: fixes for quick-bootstrap script - bump kcli to fedora42 - modify ip logic - generate cephadm binary if it doesn't exist Signed-off-by: Nizamudeen A --- diff --git a/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh b/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh index a0cf86e69e0..89332210bf3 100755 --- a/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh +++ b/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh @@ -10,10 +10,15 @@ export CEPHADM_IMAGE='quay.ceph.io/ceph-ci/ceph:main' CEPHADM="/root/bin/cephadm" CEPHADM_SRC="/mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm" -cp $CEPHADM_SRC $CEPHADM +ln -s $CEPHADM_SRC $CEPHADM mkdir -p /etc/ceph -mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}') +if [ "$(grep -oE '[0-9]+' /etc/fedora-release)" -lt 41 ]; then + # for fedora <41 compatibility + mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2 }') +else + mon_ip=$(ip -4 addr show ens3 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') +fi bootstrap_extra_options='--allow-fqdn-hostname --dashboard-password-noupdate' diff --git a/src/pybind/mgr/dashboard/ci/cephadm/ceph_cluster.yml b/src/pybind/mgr/dashboard/ci/cephadm/ceph_cluster.yml index 96e32e0eef3..17ebe38968c 100755 --- a/src/pybind/mgr/dashboard/ci/cephadm/ceph_cluster.yml +++ b/src/pybind/mgr/dashboard/ci/cephadm/ceph_cluster.yml @@ -5,7 +5,7 @@ parameters: netmask: 255.255.255.0 numcpus: 1 memory: 2048 - image: fedora40 + image: fedora42 notify: false admin_password: password disks: diff --git a/src/pybind/mgr/dashboard/ci/cephadm/quick-bootstrap.sh b/src/pybind/mgr/dashboard/ci/cephadm/quick-bootstrap.sh index 6ae4c7fb2e2..3a8704afc24 100755 --- a/src/pybind/mgr/dashboard/ci/cephadm/quick-bootstrap.sh +++ b/src/pybind/mgr/dashboard/ci/cephadm/quick-bootstrap.sh @@ -26,6 +26,7 @@ use_cached_image=false extra_args="-P quick_install=True" CLUSTERS=1 NODES=3 +CEPH_DEV_FOLDER="" for arg in "$@"; do case "$arg" in @@ -33,7 +34,8 @@ for arg in "$@"; do use_cached_image=true ;; -dir=*|--ceph-dir=*) - extra_args+=" -P ceph_dev_folder=${arg#*=}" + CEPH_DEV_FOLDER="${arg#*=}" + extra_args+=" -P ceph_dev_folder=${CEPH_DEV_FOLDER}" ;; -e|--expanded-cluster) extra_args+=" -P expanded_cluster=True" @@ -70,6 +72,17 @@ rm -f ceph_image.tar printf "Saving the image: %s\n" "$image_name" podman save -o ceph_image.tar quay.ceph.io/ceph-ci/ceph:main +# build cephadm binary if it does not exist +printf "\nChecking for cephadm binary...\n" +pushd ${CEPH_DEV_FOLDER}/src/cephadm/ +if [[ ! -f cephadm ]]; then + echo "Building cephadm binary..." + python3 build.py cephadm +else + printf "\ncephadm binary already exists." +fi +popd + NODE_IP_OFFSET=100 PREFIX="ceph" for cluster in $(seq 1 $CLUSTERS); do diff --git a/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh b/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh index 16151f39153..4e3f887d20f 100755 --- a/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh +++ b/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh @@ -59,8 +59,8 @@ fi npm run build ${FRONTEND_BUILD_OPTS} & cd ${CEPH_DEV_FOLDER} -: ${VM_IMAGE:='fedora40'} -: ${VM_IMAGE_URL:='https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2'} +: ${VM_IMAGE:='fedora42'} +: ${VM_IMAGE_URL:='https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2'} kcli download image -p ceph-dashboard -u ${VM_IMAGE_URL} ${VM_IMAGE} kcli delete plan -y ceph || true # Compile cephadm locally for the shared_ceph_folder to pick it up