From 36391d06b7bc095963d3c94a7a79ac07a67269eb Mon Sep 17 00:00:00 2001 From: kubevirt-bot Date: Thu, 12 Sep 2024 00:01:13 +0000 Subject: [PATCH] Bump kubevirtci [939e610 fix the busybox netcat not found issue in fedora-test-tooling for s390x.](https://github.com/kubevirt/kubevirtci/pull/1268) [4ad94f0 Label rook storage class](https://github.com/kubevirt/kubevirtci/pull/1267) [88a4f6b fix: Wait until istio cni files appear before copying them](https://github.com/kubevirt/kubevirtci/pull/1262) [4cc1018 Run ./hack/bump-cdi.sh](https://github.com/kubevirt/kubevirtci/pull/1249) [6149a01 Include manifests that are part of gocli when checking for prepull images](https://github.com/kubevirt/kubevirtci/pull/1265) [1b17b20 fix: Remove extra slash in file path and remove unneeded sed](https://github.com/kubevirt/kubevirtci/pull/1258) [b35649a Automatic bump of CentOS Stream to latest](https://github.com/kubevirt/kubevirtci/pull/1257) [374b5e9 bug: Move namespace and CRD files to names with higher alphabetical order to be created first](https://github.com/kubevirt/kubevirtci/pull/1255) [79bfd07 Run bazel run //robots/cmd/kubevirtci-bumper:kubevirtci-bumper -- -ensure-only-latest-three --k8s-provider-dir /home/prow/go/src/github.com/kubevirt/project-infra/../kubevirtci/cluster-provision/k8s --cluster-up-dir /home/prow/go/src/github.com/kubevirt/project-infra/../kubevirtci/cluster-up/cluster](https://github.com/kubevirt/kubevirtci/pull/1256) [ba145b2 bug: Fix KSM flag passing to the gocli](https://github.com/kubevirt/kubevirtci/pull/1254) [8501d22 Opts package](https://github.com/kubevirt/kubevirtci/pull/1217) [4f37d07 Automatic bump of CentOS Stream to latest](https://github.com/kubevirt/kubevirtci/pull/1250) ```release-note NONE ``` Signed-off-by: kubevirt-bot --- cluster-up-sha.txt | 2 +- .../cluster/ephemeral-provider-common.sh | 53 ++++++ cluster-up/cluster/k8s-1.28/provider.sh | 9 - cluster-up/cluster/k8s-provider-common.sh | 173 +----------------- cluster-up/hack/common.sh | 2 +- cluster-up/version.txt | 2 +- hack/config-default.sh | 2 +- 7 files changed, 59 insertions(+), 184 deletions(-) delete mode 100644 cluster-up/cluster/k8s-1.28/provider.sh diff --git a/cluster-up-sha.txt b/cluster-up-sha.txt index 0f9ac630a635..6ea818fe98ff 100644 --- a/cluster-up-sha.txt +++ b/cluster-up-sha.txt @@ -1 +1 @@ -41b822114a0158f14ff8a86f206dc459241726e4 +2a216ba4464b49e821f0c283d3378770d95f555d diff --git a/cluster-up/cluster/ephemeral-provider-common.sh b/cluster-up/cluster/ephemeral-provider-common.sh index 808e7b79a8d0..35d708a2247b 100644 --- a/cluster-up/cluster/ephemeral-provider-common.sh +++ b/cluster-up/cluster/ephemeral-provider-common.sh @@ -181,6 +181,59 @@ function _add_common_params() { params=" --enable-fips $params" fi + if [ "$KUBEVIRT_WITH_MULTUS_V3" == "true" ]; then + params=" --deploy-multus $params" + fi + + if [ "$KUBEVIRT_WITH_CNAO" == "true" ]; then + params=" --enable-cnao $params" + fi + + if [ "$KUBEVIRT_DEPLOY_CDI" == "true" ]; then + params=" --deploy-cdi $params" + fi + + if [ -n "$KUBEVIRT_CUSTOM_CDI_VERSION" ]; then + params=" --cdi-version=$KUBEVIRT_CUSTOM_CDI_VERSION $params" + fi + + if [ "$KUBEVIRT_DEPLOY_AAQ" == "true" ]; then + params=" --deploy-aaq $params" + fi + + if [ -n "$KUBEVIRT_CUSTOM_AAQ_VERSION" ]; then + params=" --aaq-version=$KUBEVIRT_CUSTOM_AAQ_VERSION $params" + fi + + if [ "$KUBEVIRT_KSM_ON" == "true" ]; then + params=" --enable-ksm $params" + fi + + if [ ! -z $KUBEVIRT_KSM_SLEEP_BETWEEN_SCANS_MS ]; then + params=" --ksm-scan-interval=$KUBEVIRT_KSM_SLEEP_BETWEEN_SCANS_MS $params" + fi + + if [ ! -z $KUBEVIRT_KSM_PAGES_TO_SCAN ]; then + params=" --ksm-page-count=$KUBEVIRT_KSM_PAGES_TO_SCAN $params" + fi + + if [ "$KUBEVIRT_SWAP_ON" == "true" ]; then + params=" --enable-swap $params" + fi + + if [ ! -z $KUBEVIRT_SWAP_SIZE_IN_GB ]; then + params=" --swap-size=$KUBEVIRT_SWAP_SIZE_IN_GB $params" + fi + + if [ ! -z $KUBEVIRT_SWAPPINESS ]; then + params=" --swapiness=$KUBEVIRT_SWAPPINESS $params" + fi + + if [ $KUBEVIRT_UNLIMITEDSWAP == "true" ]; then + params=" --unlimited-swap $params" + fi + + if [ -n "$KUBEVIRTCI_PROXY" ]; then params=" --docker-proxy=$KUBEVIRTCI_PROXY $params" fi diff --git a/cluster-up/cluster/k8s-1.28/provider.sh b/cluster-up/cluster/k8s-1.28/provider.sh deleted file mode 100644 index e2bf40cda083..000000000000 --- a/cluster-up/cluster/k8s-1.28/provider.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -e - -if [ "${KUBEVIRT_CGROUPV2}" == "true" ]; then - export KUBEVIRT_PROVIDER_EXTRA_ARGS="${KUBEVIRT_PROVIDER_EXTRA_ARGS} --kernel-args='systemd.unified_cgroup_hierarchy=1'" -fi - -# shellcheck disable=SC1090 -source "${KUBEVIRTCI_PATH}/cluster/k8s-provider-common.sh" diff --git a/cluster-up/cluster/k8s-provider-common.sh b/cluster-up/cluster/k8s-provider-common.sh index f760356e39ca..32c4ede42598 100644 --- a/cluster-up/cluster/k8s-provider-common.sh +++ b/cluster-up/cluster/k8s-provider-common.sh @@ -6,64 +6,6 @@ set -e source "${KUBEVIRTCI_PATH}/cluster/ephemeral-provider-common.sh" -#if UNLIMITEDSWAP is set to true - Kubernetes workloads can use as much swap memory as they request, up to the system limit. -#otherwise Kubernetes workloads can use as much swap memory as they request, up to the system limit by default -function configure_swap_memory () { - if [ "$KUBEVIRT_SWAP_ON" == "true" ] ;then - for nodeNum in $(seq -f "%02g" 1 $KUBEVIRT_NUM_NODES); do - if [ ! -z $KUBEVIRT_SWAP_SIZE_IN_GB ]; then - $ssh node${nodeNum} -- sudo dd if=/dev/zero of=/swapfile count=$KUBEVIRT_SWAP_SIZE_IN_GB bs=1G - $ssh node${nodeNum} -- sudo mkswap /swapfile - fi - - $ssh node${nodeNum} -- sudo swapon -a - - if [ ! -z $KUBEVIRT_SWAPPINESS ]; then - $ssh node${nodeNum} -- "sudo /bin/su -c \"echo vm.swappiness = $KUBEVIRT_SWAPPINESS >> /etc/sysctl.conf\"" - $ssh node${nodeNum} -- sudo sysctl vm.swappiness=$KUBEVIRT_SWAPPINESS - fi - - if [ $KUBEVIRT_UNLIMITEDSWAP == "true" ]; then - $ssh node${nodeNum} -- "sudo sed -i ':a;N;\$!ba;s/memorySwap: {}/memorySwap:\n swapBehavior: UnlimitedSwap/g' /var/lib/kubelet/config.yaml" - $ssh node${nodeNum} -- sudo systemctl restart kubelet - fi - done - fi -} - -function configure_ksm_module () { - if [ "$KUBEVIRT_KSM_ON" == "true" ] ;then - for nodeNum in $(seq -f "%02g" 1 $KUBEVIRT_NUM_NODES); do - $ssh node${nodeNum} -- "echo 1 | sudo tee /sys/kernel/mm/ksm/run >/dev/null" - if [ ! -z $KUBEVIRT_KSM_SLEEP_BETWEEN_SCANS_MS ]; then - $ssh node${nodeNum} -- "echo ${KUBEVIRT_KSM_SLEEP_BETWEEN_SCANS_MS} | sudo tee /sys/kernel/mm/ksm/sleep_millisecs >/dev/null " - fi - if [ ! -z $KUBEVIRT_KSM_PAGES_TO_SCAN ]; then - $ssh node${nodeNum} -- "echo ${KUBEVIRT_KSM_PAGES_TO_SCAN} | sudo tee /sys/kernel/mm/ksm/pages_to_scan >/dev/null " - fi - done - fi -} - -function configure_memory_overcommitment_behavior () { - configure_swap_memory - configure_ksm_module -} - -function deploy_cnao() { - if [ "$KUBEVIRT_WITH_CNAO" == "true" ] || [ "$KUBVIRT_WITH_CNAO_SKIP_CONFIG" == "true" ]; then - $kubectl create -f /opt/cnao/namespace.yaml - $kubectl create -f /opt/cnao/network-addons-config.crd.yaml - $kubectl create -f /opt/cnao/operator.yaml - - if [ "$KUBVIRT_WITH_CNAO_SKIP_CONFIG" != "true" ]; then - create_network_addons_config - fi - - # Install whereabouts on CNAO lanes - $kubectl create -f /opt/whereabouts - fi -} function deploy_kwok() { if [[ ${KUBEVIRT_DEPLOY_KWOK} == "true" ]]; then @@ -72,102 +14,17 @@ function deploy_kwok() { fi } -function create_network_addons_config() { - local nac="/opt/cnao/network-addons-config-example.cr.yaml" - if [ "$KUBEVIRT_WITH_MULTUS_V3" == "true" ]; then - local no_multus_nac="/opt/cnao/no-multus-nac.yaml" - $ssh node01 -- "awk '!/multus/' ${nac} | sudo tee ${no_multus_nac}" - nac=${no_multus_nac} - fi - - $kubectl apply -f ${nac} -} - -function wait_for_cnao_ready() { - if [ "$KUBEVIRT_WITH_CNAO" == "true" ] || [ "$KUBVIRT_WITH_CNAO_SKIP_CONFIG" == "true" ]; then - $kubectl wait deployment -n cluster-network-addons cluster-network-addons-operator --for condition=Available --timeout=200s - if [ "$KUBVIRT_WITH_CNAO_SKIP_CONFIG" != "true" ]; then - $kubectl wait networkaddonsconfig cluster --for condition=Available --timeout=200s - fi - fi -} - -function deploy_multus() { - if [ "$KUBEVIRT_WITH_MULTUS_V3" == "true" ]; then - $kubectl create -f /opt/multus/multus.yaml - fi -} - -function wait_for_multus_ready() { - if [ "$KUBEVIRT_WITH_MULTUS_V3" == "true" ]; then - $kubectl rollout status -n kube-system ds/kube-multus-ds --timeout=200s - fi -} - -function deploy_istio() { - if [ "$KUBEVIRT_DEPLOY_ISTIO" == "true" ]; then - if [ "$KUBEVIRT_WITH_CNAO" == "true" ]; then - $kubectl create -f /opt/istio/istio-operator-with-cnao.cr.yaml - else - $kubectl create -f /opt/istio/istio-operator.cr.yaml - fi - fi -} - -function wait_for_istio_ready() { - if [ "$KUBEVIRT_DEPLOY_ISTIO" == "true" ]; then - istio_operator_ns=istio-system - retries=0 - max_retries=20 - while [[ $retries -lt $max_retries ]]; do - echo "waiting for istio-operator to be healthy" - sleep 5 - health=$($kubectl -n $istio_operator_ns get istiooperator istio-operator -o jsonpath="{.status.status}") - if [[ $health == "HEALTHY" ]]; then - break - fi - retries=$((retries + 1)) - done - if [ $retries == $max_retries ]; then - echo "waiting istio-operator to be healthy failed" - exit 1 - fi - fi -} - # copy_istio_cni_conf_files copy the generated Istio CNI net conf file # (at '/etc/cni/multus/net.d/') to where Multus expect CNI net conf files ('/etc/cni/net.d/') function copy_istio_cni_conf_files() { if [ "$KUBEVIRT_DEPLOY_ISTIO" == "true" ] && [ "$KUBEVIRT_WITH_CNAO" == "true" ]; then for nodeNum in $(seq -f "%02g" 1 $KUBEVIRT_NUM_NODES); do + $ssh node${nodeNum} -- "until ls /etc/cni/multus > /dev/null 2>&1; do sleep 1; done" $ssh node${nodeNum} -- sudo cp -uv /etc/cni/multus/net.d/*istio*.conf /etc/cni/net.d/ done fi } -function deploy_cdi() { - if [ "$KUBEVIRT_DEPLOY_CDI" == "true" ]; then - if [ -n "${KUBEVIRT_CUSTOM_CDI_VERSION}" ]; then - $ssh node01 -- 'sudo sed --regexp-extended -i s/v[0-9]+\.[0-9]+\.[0-9]+\(.*\)?$/'"$KUBEVIRT_CUSTOM_CDI_VERSION"'/g /opt/cdi-*-operator.yaml' - fi - - LATEST_CDI_OPERATOR=$($ssh node01 -- 'ls -rt /opt/cdi-*-operator.yaml | tail -n 1') - LATEST_CDI_CR=$($ssh node01 -- 'ls -rt /opt/cdi-*-cr.yaml | tail -n 1') - $kubectl create -f $LATEST_CDI_OPERATOR - $kubectl create -f $LATEST_CDI_CR - fi -} - -function wait_for_cdi_ready() { - if [ "$KUBEVIRT_DEPLOY_CDI" == "true" ]; then - while [ "$($kubectl get pods --namespace cdi | grep -c 'cdi-')" -lt 4 ]; do - $kubectl get pods --namespace cdi - sleep 10 - done - $kubectl wait --for=condition=Ready pod --timeout=180s --all --namespace cdi - fi -} - # configure Prometheus to select kubevirt prometheusrules function configure_prometheus() { if [[ $KUBEVIRT_DEPLOY_PROMETHEUS == "true" ]] && $kubectl get crd prometheuses.monitoring.coreos.com; then @@ -175,26 +32,6 @@ function configure_prometheus() { fi } -function deploy_aaq() { - if [ "$KUBEVIRT_DEPLOY_AAQ" == "true" ]; then - if [ -n "${KUBEVIRT_CUSTOM_AAQ_VERSION}" ]; then - $ssh node01 -- 'sudo sed --regexp-extended -i s/v[0-9]+\.[0-9]+\.[0-9]+\(.*\)?$/'"$KUBEVIRT_CUSTOM_AAQ_VERSION"'/g /opt/aaq/aaq-*-operator.yaml' - fi - - $kubectl create -f /opt/aaq/aaq-*-operator.yaml - $kubectl create -f /opt/aaq/aaq-*-cr.yaml - fi -} - -function wait_for_aaq_ready() { - if [ "$KUBEVIRT_DEPLOY_AAQ" == "true" ]; then - while [ "$($kubectl get pods --namespace aaq | grep -c 'aaq-')" -lt 4 ]; do - $kubectl get pods --namespace aaq - sleep 10 - done - $kubectl wait --for=condition=Ready pod --timeout=180s --all --namespace aaq - fi -} function wait_for_kwok_ready() { if [ "KUBEVIRT_DEPLOY_KWOK" == "true" ]; then @@ -259,17 +96,11 @@ function up() { $kubectl label node -l $label node-role.kubernetes.io/worker='' configure_prometheus - configure_memory_overcommitment_behavior configure_cpu_manager - deploy_cnao - deploy_multus - deploy_istio - deploy_cdi - deploy_aaq deploy_kwok - until wait_for_cnao_ready && wait_for_istio_ready && wait_for_cdi_ready && wait_for_multus_ready && wait_for_aaq_ready && wait_for_kwok_ready; do + until wait_for_kwok_ready; do echo "Waiting for cluster components..." sleep 5 done diff --git a/cluster-up/hack/common.sh b/cluster-up/hack/common.sh index 0f4e84394900..1b7b33ecb697 100644 --- a/cluster-up/hack/common.sh +++ b/cluster-up/hack/common.sh @@ -53,4 +53,4 @@ provider_prefix=${JOB_NAME:-${KUBEVIRT_PROVIDER}}${EXECUTOR_NUMBER} job_prefix=${JOB_NAME:-kubevirt}${EXECUTOR_NUMBER} mkdir -p $KUBEVIRTCI_CONFIG_PATH/$KUBEVIRT_PROVIDER -KUBEVIRTCI_TAG=2408151028-a0ad3359 +KUBEVIRTCI_TAG=2409111639-939e6106 diff --git a/cluster-up/version.txt b/cluster-up/version.txt index 213e09c2e5bc..cae5abbb9b30 100644 --- a/cluster-up/version.txt +++ b/cluster-up/version.txt @@ -1 +1 @@ -2408151028-a0ad3359 +2409111639-939e6106 diff --git a/hack/config-default.sh b/hack/config-default.sh index b9b2b6d0169b..a0b67ce6ae7c 100644 --- a/hack/config-default.sh +++ b/hack/config-default.sh @@ -37,7 +37,7 @@ cdi_namespace=cdi image_pull_policy=${IMAGE_PULL_POLICY:-IfNotPresent} verbosity=${VERBOSITY:-2} package_name=${PACKAGE_NAME:-kubevirt-dev} -kubevirtci_git_hash="2408151028-a0ad3359" +kubevirtci_git_hash="2409111639-939e6106" conn_check_ipv4_address=${CONN_CHECK_IPV4_ADDRESS:-""} conn_check_ipv6_address=${CONN_CHECK_IPV6_ADDRESS:-""} conn_check_dns=${CONN_CHECK_DNS:-""}