]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fixes for quick-bootstrap script 66075/head
authorNizamudeen A <nia@redhat.com>
Tue, 28 Oct 2025 07:46:26 +0000 (13:16 +0530)
committerNizamudeen A <nia@redhat.com>
Thu, 30 Oct 2025 06:23:01 +0000 (11:53 +0530)
- bump kcli to fedora42
- modify ip logic
- generate cephadm binary if it doesn't exist

Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh
src/pybind/mgr/dashboard/ci/cephadm/ceph_cluster.yml
src/pybind/mgr/dashboard/ci/cephadm/quick-bootstrap.sh
src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh

index a0cf86e69e028961f34938d0baab47a273f9c9ca..89332210bf35f6275851d9ab226272d12cc637de 100755 (executable)
@@ -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'
 
index 96e32e0eef320f2f0dd4a87fbc49c56308021473..17ebe38968c7ce3bd70a59d636945e57a1b446b3 100755 (executable)
@@ -5,7 +5,7 @@ parameters:
  netmask: 255.255.255.0
  numcpus: 1
  memory: 2048
- image: fedora40
+ image: fedora42
  notify: false
  admin_password: password
  disks:
index 6ae4c7fb2e276703a276c04f4174ddac450f7f79..3a8704afc24bd777735410d2969f20e82074ced0 100755 (executable)
@@ -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
index 16151f3915363dd3ea6a93e791b87eac10f67098..4e3f887d20f9c23073ede91c18ad0cf6862c73e9 100755 (executable)
@@ -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