From 0cab64cd16bdf3d9060183bc44fa16f7447c15b4 Mon Sep 17 00:00:00 2001 From: David Vossel Date: Fri, 26 Apr 2024 14:57:35 -0400 Subject: [PATCH] Add default console passsword for VMs in CI Signed-off-by: David Vossel --- .../hypershift-kubevirt-create-commands.sh | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/ci-operator/step-registry/hypershift/kubevirt/create/hypershift-kubevirt-create-commands.sh b/ci-operator/step-registry/hypershift/kubevirt/create/hypershift-kubevirt-create-commands.sh index 91df0122bceb6..e4d0ca225e987 100644 --- a/ci-operator/step-registry/hypershift/kubevirt/create/hypershift-kubevirt-create-commands.sh +++ b/ci-operator/step-registry/hypershift/kubevirt/create/hypershift-kubevirt-create-commands.sh @@ -89,7 +89,6 @@ fi oc patch ingresscontroller -n openshift-ingress-operator default --type=json -p \ '[{ "op": "add", "path": "/spec/routeAdmission", "value": {wildcardPolicy: "WildcardsAllowed"}}]' - RELEASE_IMAGE="${RELEASE_IMAGE_LATEST}" if [[ "${DISCONNECTED}" == "true" ]]; @@ -130,7 +129,6 @@ then fi - echo "$(date) Creating HyperShift guest cluster ${CLUSTER_NAME}" # shellcheck disable=SC2086 "${HCP_CLI}" create cluster kubevirt ${EXTRA_ARGS} ${ICSP_COMMAND} \ @@ -144,6 +142,39 @@ echo "$(date) Creating HyperShift guest cluster ${CLUSTER_NAME}" --pull-secret "${PULL_SECRET_PATH}" \ --generate-ssh +# Set Console Password for NodePool VMs so we can easily debug them even if network failures occur +oc apply -f - < mc-patch.yaml +spec: + config: + - name: set-core-user-password +EOF +oc patch nodepool -n clusters $CLUSTER_NAME --patch-file mc-patch.yaml + if [[ -n ${MCE} ]] ; then if (( $(awk 'BEGIN {print ("'"$MCE_VERSION"'" < 2.4)}') )); then oc annotate hostedclusters -n "${CLUSTER_NAMESPACE_PREFIX}" "${CLUSTER_NAME}" "cluster.open-cluster-management.io/managedcluster-name=${CLUSTER_NAME}" --overwrite