Skip to content

Commit 07e44e0

Browse files
authored
Merge pull request ceph#66075 from rhcs-dashboard/bootstrap-fixes
mgr/dashboard: fixes for quick-bootstrap script Reviewed-by: Pedro Gonzalez Gomez <[email protected]> Reviewed-by: Abhishek Desai <[email protected]> Reviewed-by: Ankush Behl <[email protected]>
2 parents 518f24a + fe9dcf4 commit 07e44e0

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ export CEPHADM_IMAGE='quay.ceph.io/ceph-ci/ceph:main'
1010
CEPHADM="/root/bin/cephadm"
1111
CEPHADM_SRC="/mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm"
1212

13-
cp $CEPHADM_SRC $CEPHADM
13+
ln -s $CEPHADM_SRC $CEPHADM
1414

1515
mkdir -p /etc/ceph
16-
mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}')
16+
if [ "$(grep -oE '[0-9]+' /etc/fedora-release)" -lt 41 ]; then
17+
# for fedora <41 compatibility
18+
mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2 }')
19+
else
20+
mon_ip=$(ip -4 addr show ens3 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
21+
fi
1722

1823
bootstrap_extra_options='--allow-fqdn-hostname --dashboard-password-noupdate'
1924

src/pybind/mgr/dashboard/ci/cephadm/ceph_cluster.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55
netmask: 255.255.255.0
66
numcpus: 1
77
memory: 2048
8-
image: fedora40
8+
image: fedora42
99
notify: false
1010
admin_password: password
1111
disks:

src/pybind/mgr/dashboard/ci/cephadm/quick-bootstrap.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ use_cached_image=false
2626
extra_args="-P quick_install=True"
2727
CLUSTERS=1
2828
NODES=3
29+
CEPH_DEV_FOLDER=""
2930

3031
for arg in "$@"; do
3132
case "$arg" in
3233
-u|--use-cached-image)
3334
use_cached_image=true
3435
;;
3536
-dir=*|--ceph-dir=*)
36-
extra_args+=" -P ceph_dev_folder=${arg#*=}"
37+
CEPH_DEV_FOLDER="${arg#*=}"
38+
extra_args+=" -P ceph_dev_folder=${CEPH_DEV_FOLDER}"
3739
;;
3840
-e|--expanded-cluster)
3941
extra_args+=" -P expanded_cluster=True"
@@ -70,6 +72,17 @@ rm -f ceph_image.tar
7072
printf "Saving the image: %s\n" "$image_name"
7173
podman save -o ceph_image.tar quay.ceph.io/ceph-ci/ceph:main
7274

75+
# build cephadm binary if it does not exist
76+
printf "\nChecking for cephadm binary...\n"
77+
pushd ${CEPH_DEV_FOLDER}/src/cephadm/
78+
if [[ ! -f cephadm ]]; then
79+
echo "Building cephadm binary..."
80+
python3 build.py cephadm
81+
else
82+
printf "\ncephadm binary already exists."
83+
fi
84+
popd
85+
7386
NODE_IP_OFFSET=100
7487
PREFIX="ceph"
7588
for cluster in $(seq 1 $CLUSTERS); do

src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ fi
5959
npm run build ${FRONTEND_BUILD_OPTS} &
6060

6161
cd ${CEPH_DEV_FOLDER}
62-
: ${VM_IMAGE:='fedora40'}
63-
: ${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'}
62+
: ${VM_IMAGE:='fedora42'}
63+
: ${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'}
6464
kcli download image -p ceph-dashboard -u ${VM_IMAGE_URL} ${VM_IMAGE}
6565
kcli delete plan -y ceph || true
6666
# Compile cephadm locally for the shared_ceph_folder to pick it up

0 commit comments

Comments
 (0)