From 304a5c28d219db466d6e1c74499fe0f25b1d515a Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Tue, 31 Mar 2026 18:00:28 +0300 Subject: [PATCH 01/14] feat(ci): add sdn for e2e nested cluster Signed-off-by: Nikita Korolev --- test/dvp-static-cluster/charts/infra/templates/_helpers.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl index 4a5e99da43..8d5a4b05d2 100644 --- a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl +++ b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl @@ -33,7 +33,10 @@ spec: - kind: VirtualDisk name: {{ printf "%s-%d" $name $i }} {{- end }} -{{- end }} + networks: + - type: Main + - type: ClusterNetwork + name: cn-4006-for-e2e-test bootloader: {{ $ctx.Values.image.bootloader }} liveMigrationPolicy: PreferForced cpu: From 7e5976cd4fab6bf2c700f8ca86043abc5efefb9d Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 11:51:42 +0300 Subject: [PATCH 02/14] prep for testing Signed-off-by: Nikita Korolev --- .github/workflows/e2e-matrix.yml | 17 +++++++++++++---- .github/workflows/e2e-reusable-pipeline.yml | 5 +++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-matrix.yml b/.github/workflows/e2e-matrix.yml index 4c3a6160da..3d45b92016 100644 --- a/.github/workflows/e2e-matrix.yml +++ b/.github/workflows/e2e-matrix.yml @@ -16,8 +16,13 @@ name: E2E Matrix Tests (nested clusters) on: workflow_dispatch: - schedule: - - cron: "40 4 * * *" + # pull_request: + # types: [opened, reopened, synchronize, labeled, unlabeled] + # branches: + # - main + # - feat/ci/e2e-nested-add-sdn + # schedule: + # - cron: "40 4 * * *" concurrency: group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" @@ -29,6 +34,7 @@ defaults: jobs: cleanup-nested-clusters: + if: github.event_name != 'pull_request' name: Cleanup nested clusters runs-on: ubuntu-latest steps: @@ -100,6 +106,7 @@ jobs: cleanup_kind "vmclass" power-off-vms-for-nested: + if: github.event_name != 'pull_request' name: Power off VMs for nested clusters needs: cleanup-nested-clusters runs-on: ubuntu-latest @@ -315,7 +322,7 @@ jobs: fi set-vars: name: Set vars - needs: power-off-vms-for-nested + # needs: power-off-vms-for-nested runs-on: ubuntu-latest outputs: date_start: ${{ steps.vars.outputs.date-start }} @@ -345,6 +352,7 @@ jobs: randuuid4c: ${{ needs.set-vars.outputs.randuuid4c }} cluster_config_workers_memory: "9Gi" cluster_config_k8s_version: "1.34" + e2e_focus_tests: "VirtualMachineAdditionalNetworkInterfaces" secrets: DEV_REGISTRY_DOCKER_CFG: ${{ secrets.DEV_REGISTRY_DOCKER_CFG }} VIRT_E2E_NIGHTLY_SA_TOKEN: ${{ secrets.VIRT_E2E_NIGHTLY_SA_TOKEN }} @@ -647,4 +655,5 @@ jobs: curl --request POST --header 'Content-Type: application/json' --data "{\"text\": \"${COMBINED_SUMMARY}\"}" "$LOOP_WEBHOOK_URL" fi env: - LOOP_WEBHOOK_URL: ${{ secrets.LOOP_WEBHOOK_URL }} + LOOP_WEBHOOK_URL: ${{ secrets.LOOP_TEST_CHANNEL }} + # LOOP_WEBHOOK_URL: ${{ secrets.LOOP_WEBHOOK_URL }} diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index 17cb9b31b5..01f05b8491 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -141,7 +141,7 @@ jobs: run: | GIT_SHORT_HASH=$(git rev-parse --short HEAD) - namespace="nightly-e2e-$STORAGE_TYPE-$GIT_SHORT_HASH-$RANDUUID4C" + namespace="test-sdn-e2e-$STORAGE_TYPE-$GIT_SHORT_HASH-$RANDUUID4C" echo "namespace=$namespace" >> $GITHUB_OUTPUT echo "sha_short=$GIT_SHORT_HASH" >> $GITHUB_OUTPUT @@ -1143,7 +1143,8 @@ jobs: echo $SUMMARY > "${summary_file_name_json}" echo "[INFO] Exit code: $GINKGO_EXIT_CODE" - exit $GINKGO_EXIT_CODE + # exit $GINKGO_EXIT_CODE + exit 0 - name: Upload summary test results (junit/xml) uses: actions/upload-artifact@v4 id: e2e-report-artifact From 699ce48fc968e37a6b439b72aed5e5d3e39d1b1f Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 15:53:28 +0300 Subject: [PATCH 03/14] add sdn conf and so on Signed-off-by: Nikita Korolev --- .github/workflows/e2e-matrix.yml | 10 +- .github/workflows/e2e-reusable-pipeline.yml | 135 +++++++++++++++++- .../charts/infra/templates/_helpers.tpl | 2 +- 3 files changed, 139 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-matrix.yml b/.github/workflows/e2e-matrix.yml index 3d45b92016..c116898773 100644 --- a/.github/workflows/e2e-matrix.yml +++ b/.github/workflows/e2e-matrix.yml @@ -16,11 +16,11 @@ name: E2E Matrix Tests (nested clusters) on: workflow_dispatch: - # pull_request: - # types: [opened, reopened, synchronize, labeled, unlabeled] - # branches: - # - main - # - feat/ci/e2e-nested-add-sdn + pull_request: + types: [opened, reopened, synchronize, labeled, unlabeled] + branches: + - main + - feat/ci/e2e-nested-add-sdn # schedule: # - cron: "40 4 * * *" diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index 01f05b8491..f733b4ea9b 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -432,10 +432,140 @@ jobs: include-hidden-files: true retention-days: 3 + configure-sdn: + name: Configure SDN + runs-on: ubuntu-latest + needs: bootstrap + steps: + - uses: actions/checkout@v4 + + - name: Install Task + uses: arduino/setup-task@v2 + with: + version: 3.x + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup d8 + uses: ./.github/actions/install-d8 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Install kubectl CLI + uses: azure/setup-kubectl@v4 + + - name: Check nested kube-api via generated kubeconfig + run: | + mkdir -p ~/.kube + echo "[INFO] Configure kubeconfig for nested cluster" + echo "${{ needs.bootstrap.outputs.kubeconfig }}" | base64 -d | base64 -d > ~/.kube/config + + echo "[INFO] Show paths and files content" + ls -la ~/.kube + echo "[INFO] Set permissions for kubeconfig" + chmod 600 ~/.kube/config + + echo "[INFO] Show current kubeconfig context" + kubectl config get-contexts + + echo "[INFO] Show nodes in cluster" + # `kubectl get nodes` may return error, so we need to retry. + count=30 + success=false + for i in $(seq 1 $count); do + echo "[INFO] Attempt $i/$count..." + if kubectl get nodes; then + echo "[SUCCESS] Successfully retrieved nodes." + success=true + break + fi + + if [ $i -lt $count ]; then + echo "[INFO] Retrying in 10 seconds..." + sleep 10 + fi + done + + if [ "$success" = false ]; then + echo "[ERROR] Failed to retrieve nodes after $count attempts." + exit 1 + fi + - name: Enable SDN + run: | + d8 system module enable sdn + + d8_queue_list() { + d8 s queue list | grep -Po '([0-9]+)(?= active)' || echo "[WARNING] Failed to retrieve list queue" + } + + d8_queue() { + local count=90 + local queue_count + + for i in $(seq 1 $count) ; do + queue_count=$(d8_queue_list) + if [ -n "$queue_count" ] && [ "$queue_count" = "0" ]; then + echo "[SUCCESS] Queue is clear" + return 0 + fi + + echo "[INFO] Wait until queues are empty ${i}/${count}" + if (( i % 5 == 0 )); then + echo "[INFO] Show queue list" + d8 s queue list | head -n25 || echo "[WARNING] Failed to retrieve list queue" + echo " " + fi + + if (( i % 10 == 0 )); then + echo "[INFO] deckhouse logs" + echo "::group::📝 deckhouse logs" + d8 s logs | tail -n 100 + echo "::endgroup::" + echo " " + fi + sleep 10 + done + } + + d8_queue + echo "[INFO] Wait for sdn deployments to be ready" + kubectl -n d8-sdn wait --for=condition=Available deploy --all --timeout 900s + echo "[INFO] Wait for sdn daemonsets to be ready" + kubectl -n d8-sdn wait --for=condition=Available daemonsets --all --timeout 900s + + - name: Configure ClusterNetwork + run: | + extraNic=$(kubectl get nodenetworkinterface -l network.deckhouse.io/interface-type=NIC -o json | jq -r '.items[] | select(.status.operationalState == "Up") | select(.status.ifName != "enp1s0") | .metadata.name') + for nic in $extraNic; do + kubectl label nodenetworkinterface $nic nic-group=extra + done + + for cnn in 4006 4007; do + kubectl apply -f - <<-EOF + apiVersion: network.deckhouse.io/v1alpha1 + kind: ClusterNetwork + metadata: + name: cn-${cnn}-for-e2e-test + spec: + parentNodeNetworkInterfaces: + labelSelector: + matchLabels: + nic-group: extra + type: VLAN + vlan: + id: ${cnn} + EOF + + echo "[INFO] Wait for ClusterNetwork cn-${cnn}-for-e2e-test to be ready" + # TODO: remove true before merge + kubectl wait clusternetworks.network.deckhouse.io --for=condition=Ready cn-${cnn}-for-e2e-test --timeout 300s || true + done + configure-storage: name: Configure storage runs-on: ubuntu-latest - needs: bootstrap + needs: + - configure-sdn + - bootstrap steps: - uses: actions/checkout@v4 @@ -1339,10 +1469,11 @@ jobs: runs-on: ubuntu-latest needs: - bootstrap + - configure-sdn - configure-storage - configure-virtualization - e2e-test - if: cancelled() || success() + if: (cancelled() || success()) && (needs.configure-sdn.result == 'success') steps: - uses: actions/checkout@v4 diff --git a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl index 8d5a4b05d2..f16387a549 100644 --- a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl +++ b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl @@ -36,7 +36,7 @@ spec: networks: - type: Main - type: ClusterNetwork - name: cn-4006-for-e2e-test + name: cn-4006-for-e2e-test bootloader: {{ $ctx.Values.image.bootloader }} liveMigrationPolicy: PreferForced cpu: From ac4f393301cccd74f4102f185a7433617284a366 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 16:55:03 +0300 Subject: [PATCH 04/14] unset proxy Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index f733b4ea9b..081134c961 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -253,11 +253,13 @@ jobs: - name: Bootstrap cluster [dhctl-bootstrap] id: dhctl-bootstrap working-directory: ${{ env.SETUP_CLUSTER_TYPE_PATH }} - env: - # Proxy settings will be added to values.yaml if proxyEnabled is true via task render-cluster-config-proxy - HTTP_PROXY: ${{ secrets.BOOTSTRAP_DEV_PROXY }} - HTTPS_PROXY: ${{ secrets.BOOTSTRAP_DEV_PROXY }} run: | + if yq eval '.deckhouse.proxyEnabled' values.yaml; then + export HTTP_PROXY="${{ secrets.BOOTSTRAP_DEV_PROXY }}" + export HTTPS_PROXY="${{ secrets.BOOTSTRAP_DEV_PROXY }}" + echo "Proxy settings - configured" + fi + echo "$HTTP_PROXY - HTTP_PROXY" task dhctl-bootstrap timeout-minutes: 30 - name: Bootstrap cluster [show-connection-info] From 4ec6244ee31aa82530712c9b64bcc04f9f003f89 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 17:25:54 +0300 Subject: [PATCH 05/14] fix condition proxyEnabled Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 2 +- test/dvp-static-cluster/Taskfile.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index 081134c961..c84429d581 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -254,7 +254,7 @@ jobs: id: dhctl-bootstrap working-directory: ${{ env.SETUP_CLUSTER_TYPE_PATH }} run: | - if yq eval '.deckhouse.proxyEnabled' values.yaml; then + if yq eval '.deckhouse.proxyEnabled == true' values.yaml; then export HTTP_PROXY="${{ secrets.BOOTSTRAP_DEV_PROXY }}" export HTTPS_PROXY="${{ secrets.BOOTSTRAP_DEV_PROXY }}" echo "Proxy settings - configured" diff --git a/test/dvp-static-cluster/Taskfile.yaml b/test/dvp-static-cluster/Taskfile.yaml index f239956672..d4efb7feed 100644 --- a/test/dvp-static-cluster/Taskfile.yaml +++ b/test/dvp-static-cluster/Taskfile.yaml @@ -140,7 +140,7 @@ tasks: desc: Add proxy if enabled cmds: - | - if yq eval '.deckhouse.proxyEnabled' values.yaml; then + if yq eval '.deckhouse.proxyEnabled == true' values.yaml; then yq eval --inplace '.proxy.httpProxy = env(HTTP_PROXY) | .proxy.httpsProxy = env(HTTPS_PROXY)' values.yaml fi From c93a4781005e6728e3bb582677bc1a2b76b11ac5 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 17:54:25 +0300 Subject: [PATCH 06/14] rm NodeGroup master if master count 1 Signed-off-by: Nikita Korolev --- .../cluster-config/templates/master-nodes.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/dvp-static-cluster/charts/cluster-config/templates/master-nodes.yaml b/test/dvp-static-cluster/charts/cluster-config/templates/master-nodes.yaml index 191afcd96e..7a90f6c189 100644 --- a/test/dvp-static-cluster/charts/cluster-config/templates/master-nodes.yaml +++ b/test/dvp-static-cluster/charts/cluster-config/templates/master-nodes.yaml @@ -4,6 +4,9 @@ {{- $totalNodes = add $totalNodes .count -}} {{- end -}} +{{- $masterCount := $.Values.instances.masterNodes.count | int -}} +{{- if gt $masterCount 1 -}} + {{- $staticCount := sub $masterCount 1 -}} --- apiVersion: deckhouse.io/v1 kind: NodeGroup @@ -24,21 +27,17 @@ spec: node-role.kubernetes.io/master: "" nodeType: Static staticInstances: - count: {{ .Values.instances.masterNodes.count }} + count: {{ $staticCount }} labelSelector: matchLabels: role: master -{{- range $_, $i := untilStep 0 (.Values.instances.masterNodes.count | int) 1}} +{{- range $_, $i := untilStep 1 $masterCount 1}} {{- $vmName := printf "%s-master-%d" $.Values.storageType $i }} --- apiVersion: deckhouse.io/v1alpha1 kind: StaticInstance metadata: - {{- if eq $i 0 }} - annotations: - static.node.deckhouse.io/skip-bootstrap-phase: "" - {{- end }} name: {{ $vmName }} labels: role: master @@ -48,3 +47,4 @@ spec: kind: SSHCredentials name: mvp-static {{- end }} +{{- end }} From 100b5e43167d9345ceb2de8640b01910f62b7902 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 18:06:08 +0300 Subject: [PATCH 07/14] fix proxy condition Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 4 ++-- test/dvp-static-cluster/Taskfile.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index c84429d581..852b7d6c87 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -254,12 +254,12 @@ jobs: id: dhctl-bootstrap working-directory: ${{ env.SETUP_CLUSTER_TYPE_PATH }} run: | - if yq eval '.deckhouse.proxyEnabled == true' values.yaml; then + if [[ $(yq eval '.deckhouse.proxyEnabled' values.yaml) == true ]]; then export HTTP_PROXY="${{ secrets.BOOTSTRAP_DEV_PROXY }}" export HTTPS_PROXY="${{ secrets.BOOTSTRAP_DEV_PROXY }}" echo "Proxy settings - configured" fi - echo "$HTTP_PROXY - HTTP_PROXY" + task dhctl-bootstrap timeout-minutes: 30 - name: Bootstrap cluster [show-connection-info] diff --git a/test/dvp-static-cluster/Taskfile.yaml b/test/dvp-static-cluster/Taskfile.yaml index d4efb7feed..11759546e3 100644 --- a/test/dvp-static-cluster/Taskfile.yaml +++ b/test/dvp-static-cluster/Taskfile.yaml @@ -140,7 +140,7 @@ tasks: desc: Add proxy if enabled cmds: - | - if yq eval '.deckhouse.proxyEnabled == true' values.yaml; then + if [[ $(yq eval '.deckhouse.proxyEnabled' values.yaml) == true ]]; then yq eval --inplace '.proxy.httpProxy = env(HTTP_PROXY) | .proxy.httpsProxy = env(HTTPS_PROXY)' values.yaml fi From ae9a8d5ee964913194e5f2602dbc49e353cca43c Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 19:46:59 +0300 Subject: [PATCH 08/14] fix for secont network Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 11 +++++++++-- .../charts/infra/templates/_helpers.tpl | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index 852b7d6c87..f2355bb74e 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -259,8 +259,9 @@ jobs: export HTTPS_PROXY="${{ secrets.BOOTSTRAP_DEV_PROXY }}" echo "Proxy settings - configured" fi - + task dhctl-bootstrap + echo "[SUCCESS] Done" timeout-minutes: 30 - name: Bootstrap cluster [show-connection-info] working-directory: ${{ env.SETUP_CLUSTER_TYPE_PATH }} @@ -528,11 +529,17 @@ jobs: done } + echo "[INFO] Wait 30s for reconsilation start for module sdn" + sleep 30 d8_queue + + echo "[INFO] Wait for sdn modules to be ready" + kubectl wait --for=jsonpath='{.status.phase}'=Ready modules sdn --timeout=300s echo "[INFO] Wait for sdn deployments to be ready" kubectl -n d8-sdn wait --for=condition=Available deploy --all --timeout 900s echo "[INFO] Wait for sdn daemonsets to be ready" kubectl -n d8-sdn wait --for=condition=Available daemonsets --all --timeout 900s + echo "[SUCCESS] Done" - name: Configure ClusterNetwork run: | @@ -555,7 +562,7 @@ jobs: type: VLAN vlan: id: ${cnn} - EOF + EOF echo "[INFO] Wait for ClusterNetwork cn-${cnn}-for-e2e-test to be ready" # TODO: remove true before merge diff --git a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl index f16387a549..ce47cac6e1 100644 --- a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl +++ b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl @@ -54,6 +54,11 @@ spec: #cloud-config ssh_pwauth: true package_update: true + network: + version: 2 + ethernets: + eno2: + dhcp4: false packages: - qemu-guest-agent - jq From 45856510b1f3f524a84c4f4dc5f131f83f883b59 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 20:02:51 +0300 Subject: [PATCH 09/14] skip nfs cluster Signed-off-by: Nikita Korolev --- .github/workflows/e2e-matrix.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-matrix.yml b/.github/workflows/e2e-matrix.yml index c116898773..2d136d5ee8 100644 --- a/.github/workflows/e2e-matrix.yml +++ b/.github/workflows/e2e-matrix.yml @@ -360,6 +360,7 @@ jobs: BOOTSTRAP_DEV_PROXY: ${{ secrets.BOOTSTRAP_DEV_PROXY }} e2e-nfs: + if: github.event_name != 'pull_request' name: E2E Pipeline (NFS) needs: - set-vars @@ -388,7 +389,7 @@ jobs: name: End-to-End tests report needs: - e2e-replicated - - e2e-nfs + # - e2e-nfs if: ${{ always()}} env: STORAGE_TYPES: '["replicated", "nfs"]' From a1b0508f3da8d6fff3ea6427ae0181b62dd0aaf6 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 20:08:10 +0300 Subject: [PATCH 10/14] fix helm and yaml formatting Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 2 +- test/dvp-static-cluster/charts/infra/templates/_helpers.tpl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index f2355bb74e..0cf901b123 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -532,7 +532,7 @@ jobs: echo "[INFO] Wait 30s for reconsilation start for module sdn" sleep 30 d8_queue - + echo "[INFO] Wait for sdn modules to be ready" kubectl wait --for=jsonpath='{.status.phase}'=Ready modules sdn --timeout=300s echo "[INFO] Wait for sdn deployments to be ready" diff --git a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl index ce47cac6e1..f95c538d14 100644 --- a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl +++ b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl @@ -116,4 +116,5 @@ spec: {{- end }} {{- end }} {{- end }} +{{- end }} {{- end }} \ No newline at end of file From e0308428d2201a07e23aefde5cb172a67282dd87 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Thu, 2 Apr 2026 20:59:10 +0300 Subject: [PATCH 11/14] fix cloud-init and sdn ds wait Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 4 ++-- test/dvp-static-cluster/charts/infra/templates/_helpers.tpl | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index 0cf901b123..ff5c95c816 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -537,8 +537,8 @@ jobs: kubectl wait --for=jsonpath='{.status.phase}'=Ready modules sdn --timeout=300s echo "[INFO] Wait for sdn deployments to be ready" kubectl -n d8-sdn wait --for=condition=Available deploy --all --timeout 900s - echo "[INFO] Wait for sdn daemonsets to be ready" - kubectl -n d8-sdn wait --for=condition=Available daemonsets --all --timeout 900s + echo "[INFO] Wait for sdn daemonset agent to be ready" + kubectl -n d8-sdn rollout status daemonset agent --timeout=900s echo "[SUCCESS] Done" - name: Configure ClusterNetwork diff --git a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl index f95c538d14..8eb3e5493a 100644 --- a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl +++ b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl @@ -58,7 +58,11 @@ spec: version: 2 ethernets: eno2: + addresses: [] dhcp4: false + dhcp6: false + optional: false + link-local: [] packages: - qemu-guest-agent - jq From 7e6397b50973224db5ca90c37b060f55a54f2c58 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Fri, 3 Apr 2026 10:37:19 +0300 Subject: [PATCH 12/14] wat cn to 30s Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index ff5c95c816..ed76ffb0c0 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -566,7 +566,7 @@ jobs: echo "[INFO] Wait for ClusterNetwork cn-${cnn}-for-e2e-test to be ready" # TODO: remove true before merge - kubectl wait clusternetworks.network.deckhouse.io --for=condition=Ready cn-${cnn}-for-e2e-test --timeout 300s || true + kubectl wait clusternetworks.network.deckhouse.io --for=condition=Ready cn-${cnn}-for-e2e-test --timeout 30s || true done configure-storage: @@ -1283,7 +1283,7 @@ jobs: echo "[INFO] Exit code: $GINKGO_EXIT_CODE" # exit $GINKGO_EXIT_CODE - exit 0 + exit 1 - name: Upload summary test results (junit/xml) uses: actions/upload-artifact@v4 id: e2e-report-artifact From d5029ba3e2d34d050affe89649bb58555ff86fd7 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Fri, 3 Apr 2026 10:38:09 +0300 Subject: [PATCH 13/14] temporary fail e2e step Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 134 ++++++++++---------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index ed76ffb0c0..306d8cd97a 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -1215,73 +1215,73 @@ jobs: STORAGE_CLASS_NAME: ${{ inputs.nested_storageclass_name }} working-directory: ./test/e2e/ run: | - GINKGO_RESULT=$(mktemp -p $RUNNER_TEMP) - DATE=$(date +"%Y-%m-%d") - START_TIME=$(date +"%H:%M:%S") - summary_file_name_junit="e2e_summary_${CSI}_${DATE}.xml" - summary_file_name_json="e2e_summary_${CSI}_${DATE}.json" - - cp -a legacy/testdata /tmp/testdata - - set +e - FOCUS="${{ inputs.e2e_focus_tests }}" - if [ -n "$FOCUS" ]; then - go tool ginkgo \ - --focus="$FOCUS" \ - -v --race --timeout=$TIMEOUT \ - --junit-report=$summary_file_name_junit | tee $GINKGO_RESULT - else - go tool ginkgo \ - -v --race --timeout=$TIMEOUT \ - --junit-report=$summary_file_name_junit | tee $GINKGO_RESULT - fi - GINKGO_EXIT_CODE=$? - set -e - - RESULT=$(sed -e "s/\x1b\[[0-9;]*m//g" $GINKGO_RESULT | grep --color=never -E "FAIL!|SUCCESS!") - if [[ $RESULT == FAIL!* ]]; then - RESULT_STATUS=":x: FAIL!" - elif [[ $RESULT == SUCCESS!* ]]; then - RESULT_STATUS=":white_check_mark: SUCCESS!" - else - RESULT_STATUS=":question: UNKNOWN" - fi - - PASSED=$(echo "$RESULT" | grep -oP "\d+(?= Passed)") - FAILED=$(echo "$RESULT" | grep -oP "\d+(?= Failed)") - PENDING=$(echo "$RESULT" | grep -oP "\d+(?= Pending)") - SKIPPED=$(echo "$RESULT" | grep -oP "\d+(?= Skipped)") - - SUMMARY=$(jq -n \ - --arg csi "$CSI" \ - --arg date "$DATE" \ - --arg startTime "$START_TIME" \ - --arg branch "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \ - --arg status "$RESULT_STATUS" \ - --argjson passed "$PASSED" \ - --argjson failed "$FAILED" \ - --argjson pending "$PENDING" \ - --argjson skipped "$SKIPPED" \ - --arg link "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ - '{ - CSI: $csi, - Date: $date, - StartTime: $startTime, - Branch: $branch, - Status: $status, - Passed: $passed, - Failed: $failed, - Pending: $pending, - Skipped: $skipped, - Link: $link - }' - ) - - echo "$SUMMARY" - echo "summary=$(echo "$SUMMARY" | jq -c .)" >> $GITHUB_OUTPUT - echo $SUMMARY > "${summary_file_name_json}" - - echo "[INFO] Exit code: $GINKGO_EXIT_CODE" + # GINKGO_RESULT=$(mktemp -p $RUNNER_TEMP) + # DATE=$(date +"%Y-%m-%d") + # START_TIME=$(date +"%H:%M:%S") + # summary_file_name_junit="e2e_summary_${CSI}_${DATE}.xml" + # summary_file_name_json="e2e_summary_${CSI}_${DATE}.json" + + # cp -a legacy/testdata /tmp/testdata + + # set +e + # FOCUS="${{ inputs.e2e_focus_tests }}" + # if [ -n "$FOCUS" ]; then + # go tool ginkgo \ + # --focus="$FOCUS" \ + # -v --race --timeout=$TIMEOUT \ + # --junit-report=$summary_file_name_junit | tee $GINKGO_RESULT + # else + # go tool ginkgo \ + # -v --race --timeout=$TIMEOUT \ + # --junit-report=$summary_file_name_junit | tee $GINKGO_RESULT + # fi + # GINKGO_EXIT_CODE=$? + # set -e + + # RESULT=$(sed -e "s/\x1b\[[0-9;]*m//g" $GINKGO_RESULT | grep --color=never -E "FAIL!|SUCCESS!") + # if [[ $RESULT == FAIL!* ]]; then + # RESULT_STATUS=":x: FAIL!" + # elif [[ $RESULT == SUCCESS!* ]]; then + # RESULT_STATUS=":white_check_mark: SUCCESS!" + # else + # RESULT_STATUS=":question: UNKNOWN" + # fi + + # PASSED=$(echo "$RESULT" | grep -oP "\d+(?= Passed)") + # FAILED=$(echo "$RESULT" | grep -oP "\d+(?= Failed)") + # PENDING=$(echo "$RESULT" | grep -oP "\d+(?= Pending)") + # SKIPPED=$(echo "$RESULT" | grep -oP "\d+(?= Skipped)") + + # SUMMARY=$(jq -n \ + # --arg csi "$CSI" \ + # --arg date "$DATE" \ + # --arg startTime "$START_TIME" \ + # --arg branch "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \ + # --arg status "$RESULT_STATUS" \ + # --argjson passed "$PASSED" \ + # --argjson failed "$FAILED" \ + # --argjson pending "$PENDING" \ + # --argjson skipped "$SKIPPED" \ + # --arg link "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ + # '{ + # CSI: $csi, + # Date: $date, + # StartTime: $startTime, + # Branch: $branch, + # Status: $status, + # Passed: $passed, + # Failed: $failed, + # Pending: $pending, + # Skipped: $skipped, + # Link: $link + # }' + # ) + + # echo "$SUMMARY" + # echo "summary=$(echo "$SUMMARY" | jq -c .)" >> $GITHUB_OUTPUT + # echo $SUMMARY > "${summary_file_name_json}" + + # echo "[INFO] Exit code: $GINKGO_EXIT_CODE" # exit $GINKGO_EXIT_CODE exit 1 - name: Upload summary test results (junit/xml) From b1a6f1d6f31b31e46226addcb88039c0dc53bf91 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Fri, 3 Apr 2026 17:15:12 +0300 Subject: [PATCH 14/14] try fix cloud-init Signed-off-by: Nikita Korolev --- .github/workflows/e2e-reusable-pipeline.yml | 49 +++---------------- .../charts/infra/templates/_helpers.tpl | 4 +- 2 files changed, 8 insertions(+), 45 deletions(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index 306d8cd97a..a5f4912b5e 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -494,51 +494,14 @@ jobs: fi - name: Enable SDN run: | + echo "[INFO] Enable SDN" d8 system module enable sdn - - d8_queue_list() { - d8 s queue list | grep -Po '([0-9]+)(?= active)' || echo "[WARNING] Failed to retrieve list queue" - } - - d8_queue() { - local count=90 - local queue_count - - for i in $(seq 1 $count) ; do - queue_count=$(d8_queue_list) - if [ -n "$queue_count" ] && [ "$queue_count" = "0" ]; then - echo "[SUCCESS] Queue is clear" - return 0 - fi - - echo "[INFO] Wait until queues are empty ${i}/${count}" - if (( i % 5 == 0 )); then - echo "[INFO] Show queue list" - d8 s queue list | head -n25 || echo "[WARNING] Failed to retrieve list queue" - echo " " - fi - - if (( i % 10 == 0 )); then - echo "[INFO] deckhouse logs" - echo "::group::📝 deckhouse logs" - d8 s logs | tail -n 100 - echo "::endgroup::" - echo " " - fi - sleep 10 - done - } - - echo "[INFO] Wait 30s for reconsilation start for module sdn" - sleep 30 - d8_queue - - echo "[INFO] Wait for sdn modules to be ready" + echo "[INFO] Wait for sdn modules to be ready, timeout: 300s" kubectl wait --for=jsonpath='{.status.phase}'=Ready modules sdn --timeout=300s - echo "[INFO] Wait for sdn deployments to be ready" - kubectl -n d8-sdn wait --for=condition=Available deploy --all --timeout 900s - echo "[INFO] Wait for sdn daemonset agent to be ready" - kubectl -n d8-sdn rollout status daemonset agent --timeout=900s + echo "[INFO] Wait for sdn deployments to be ready, timeout: 300s" + kubectl -n d8-sdn wait --for=condition=Available deploy --all --timeout 300s + echo "[INFO] Wait for sdn daemonset agent to be ready, timeout: 300s" + kubectl -n d8-sdn rollout status daemonset agent --timeout=300s echo "[SUCCESS] Done" - name: Configure ClusterNetwork diff --git a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl index 8eb3e5493a..34de58e72f 100644 --- a/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl +++ b/test/dvp-static-cluster/charts/infra/templates/_helpers.tpl @@ -58,11 +58,11 @@ spec: version: 2 ethernets: eno2: - addresses: [] dhcp4: false dhcp6: false + addresses: [] + link-local: [ipv6] optional: false - link-local: [] packages: - qemu-guest-agent - jq