From: Afreen Misbah Date: Wed, 27 May 2026 00:07:38 +0000 (+0530) Subject: mgr/dashboard: fix nested shell quoting in cephadm e2e start-cluster X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc3f1ab474862bb762740368e4dcd75eec0e47d8;p=ceph.git mgr/dashboard: fix nested shell quoting in cephadm e2e start-cluster with_libvirt wraps commands in sg libvirt -c "$1", adding an extra shell layer. Nested double quotes inside the outer double-quoted string caused the argument to be split — with_libvirt received a truncated $1, producing "Unterminated quoted string" on the remote shell. Drop the unnecessary inner double quotes around cephadm shell arguments since cephadm shell accepts the command as separate args. Use single quotes for the grep pattern inside the double-quoted string so it survives the sg subshell. Signed-off-by: Afreen Misbah (cherry picked from commit ae1fee05818e202287609ec1cbebd5f73ed4fd81) --- diff --git a/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh b/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh index 89332210bf3..0dbba449ef1 100755 --- a/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh +++ b/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh @@ -5,7 +5,7 @@ set -x export PATH=/root/bin:$PATH mkdir /root/bin -export CEPHADM_IMAGE='quay.ceph.io/ceph-ci/ceph:main' +export CEPHADM_IMAGE='quay.ceph.io/ceph-ci/ceph:tentacle' CEPHADM="/root/bin/cephadm" CEPHADM_SRC="/mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm" diff --git a/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh b/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh index 8d8adb1e89e..784f24d2876 100755 --- a/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh +++ b/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh @@ -74,7 +74,7 @@ with_libvirt "kcli create plan -f src/pybind/mgr/dashboard/ci/cephadm/ceph_clust : ${CLUSTER_DEBUG:=0} : ${DASHBOARD_CHECK_INTERVAL:=10} -while [[ -z $(with_libvirt "kcli ssh -u root -- ceph-node-00 'journalctl --no-tail --no-pager -t cloud-init' | grep "kcli boot finished"") ]]; do +while [[ -z $(with_libvirt "kcli ssh -u root -- ceph-node-00 'journalctl --no-tail --no-pager -t cloud-init' | grep 'kcli boot finished'") ]]; do sleep ${DASHBOARD_CHECK_INTERVAL} with_libvirt "kcli list vm" if [[ ${CLUSTER_DEBUG} != 0 ]]; then @@ -84,10 +84,10 @@ while [[ -z $(with_libvirt "kcli ssh -u root -- ceph-node-00 'journalctl --no-ta with_libvirt "kcli ssh -u root -- ceph-node-00 'journalctl -n 100 --no-pager -t cloud-init'" done -with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell "ceph config set mgr mgr/prometheus/exclude_perf_counters false"'" +with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell ceph config set mgr mgr/prometheus/exclude_perf_counters false'" get_prometheus_running_count() { - echo $(with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch ls --service_name=prometheus --format=json"' | jq -r '.[] | .status.running'") + echo $(with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell ceph orch ls --service_name=prometheus --format=json' | jq -r '.[] | .status.running'") } # check if the prometheus daemon is running on jenkins node @@ -112,8 +112,8 @@ if [[ -n "${JENKINS_HOME}" ]]; then # grafana ip address is set to the fqdn by default. # kcli is not working with that, so setting the IP manually. - with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-alertmanager-api-host http://192.168.100.100:9093"'" - with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-prometheus-api-host http://192.168.100.100:9095"'" - with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell "ceph dashboard set-grafana-api-url https://192.168.100.100:3000"'" - with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch apply node-exporter --placement 'count:2"'"' + with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell ceph dashboard set-alertmanager-api-host http://192.168.100.100:9093'" + with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell ceph dashboard set-prometheus-api-host http://192.168.100.100:9095'" + with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell ceph dashboard set-grafana-api-url https://192.168.100.100:3000'" + with_libvirt "kcli ssh -u root ceph-node-00 'cephadm shell ceph orch apply node-exporter --placement count:2'" fi