From bdb0afc4e01c401c2154f96f10997ab315326f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Fri, 1 Aug 2025 08:19:08 +0200 Subject: [PATCH] ci.ocp: Fix incorrectly quoted argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit with the shellcheck fixes we accidentally quoted the "-n NAMESPACE" argument where we should have used array instead, which lead to oc considering this as a pod name and returning error. Signed-off-by: Lukáš Doktor --- ci/openshift-ci/cluster/install_kata.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/openshift-ci/cluster/install_kata.sh b/ci/openshift-ci/cluster/install_kata.sh index b7cfa2507a..607969c2aa 100755 --- a/ci/openshift-ci/cluster/install_kata.sh +++ b/ci/openshift-ci/cluster/install_kata.sh @@ -173,13 +173,13 @@ wait_for_app_pods_message() { local namespace="$5" [[ -z "${pod_count}" ]] && pod_count=1 [[ -z "${timeout}" ]] && timeout=60 - [[ -n "${namespace}" ]] && namespace=" -n ${namespace} " + [[ -n "${namespace}" ]] && namespace=("-n" "${namespace}") local pod local pods local i SECONDS=0 while :; do - mapfile -t pods < <(oc get pods -l app="${app}" --no-headers=true "${namespace}" | awk '{print $1}') + mapfile -t pods < <(oc get pods -l app="${app}" --no-headers=true "${namespace[@]}" | awk '{print $1}') [[ "${#pods}" -ge "${pod_count}" ]] && break if [[ "${SECONDS}" -gt "${timeout}" ]]; then printf "Unable to find ${pod_count} pods for '-l app=\"${app}\"' in ${SECONDS}s (%s)" "${pods[@]}" @@ -189,7 +189,7 @@ wait_for_app_pods_message() { local log for pod in "${pods[@]}"; do while :; do - log=$(oc logs "${namespace}" "${pod}") + log=$(oc logs "${namespace[@]}" "${pod}") echo "${log}" | grep "${message}" -q && echo "Found $(echo "${log}" | grep "${message}") in ${pod}'s log (${SECONDS})" && break; if [[ "${SECONDS}" -gt "${timeout}" ]]; then echo -n "Message '${message}' not present in '${pod}' pod of the '-l app=\"${app}\"' "