forked from rook/rook
Multus CI failures on master pushes from 2026-04-08 to 2026-06-10 were dominated by a race in setup-multus.sh: 'kubectl wait' was invoked on a pod label selector immediately after 'kubectl create' of a daemonset, and it exits with "error: no matching resources found" when the daemonset controller has not created any pods yet. This caused 9 of the 10 genuine multus flakes across the standalone multus workflow and the canary multus-public-and-cluster job (the two share setup-multus.sh). - setup-multus.sh: wait with 'kubectl rollout status' on the daemonsets instead of 'kubectl wait' on pod label selectors. The daemonset object exists as soon as 'kubectl create' returns, and rollout status correctly waits for all desired pods to be created and become ready. The old selector wait also silently under-waited: pods created after its initial LIST were never waited on at all. The stricter wait revealed that full multi-node convergence can exceed 2 minutes on busy runners, so the wait timeout is raised to 5 minutes (the waits return as soon as the rollouts are ready, so this costs nothing on healthy runs). - Wait for the host-net-config daemonset rollout in both workflows before proceeding; it configures the host routing that the multus public network depends on and was previously not waited on at all. Pin its jonlabelle/network-tools image. - test_multus_connections: retry the osd dump / fs dump network checks for up to 2 minutes. Daemons register their addresses in the mon maps asynchronously after the cluster reports ready; one canary failure (2026-04-29) ran the MDS check at fsmap epoch 1, before any MDS had registered. - Dump cluster state (pods, daemonsets, events, multus logs) when the multus workflow job fails; the workflow previously had no failure diagnostics at all. Also remove the unused NUMBER_OF_COMPUTE_NODES env var from the multus workflow (kind-config.yaml creates 3 workers; nothing consumes it). Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
128 lines
4.8 KiB
YAML
128 lines
4.8 KiB
YAML
name: Multus integration tests
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
branches:
|
|
- master
|
|
- release-*
|
|
pull_request:
|
|
paths:
|
|
- cmd/rook/userfacing/**
|
|
- pkg/daemon/multus/**
|
|
- .github/workflows/multus.yaml
|
|
- tests/scripts/multus/**
|
|
|
|
defaults:
|
|
run:
|
|
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
|
|
shell: bash --noprofile --norc -eo pipefail -x {0}
|
|
|
|
# cancel the in-progress workflow when PR is refreshed.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-validation-tool:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: true
|
|
if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')"
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go version
|
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
|
with:
|
|
go-version: "1.26"
|
|
|
|
- name: Create KinD Cluster
|
|
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
|
|
with:
|
|
config: tests/scripts/multus/kind-config.yaml
|
|
cluster_name: kind
|
|
|
|
- name: consider (pre-job) debugging
|
|
uses: ./.github/workflows/tmate_debug
|
|
with:
|
|
use-tmate: ${{ secrets.USE_TMATE }}
|
|
debug-ci: ${{ contains(github.event.pull_request.labels.*.name, 'debug-ci') }}
|
|
|
|
- name: Setup multus
|
|
run: ./tests/scripts/multus/setup-multus.sh
|
|
|
|
- name: Set up multus prerequisite host routing
|
|
run: |
|
|
kubectl create -f tests/scripts/multus/host-cfg-ds.yaml
|
|
kubectl rollout status daemonset/host-net-config --timeout=120s
|
|
|
|
- name: Install public and cluster NADs in default namespace
|
|
run: kubectl create -f tests/scripts/multus/default-public-cluster-nads.yaml
|
|
|
|
- name: Quickly build Rook binary
|
|
id: build
|
|
run: go build -tags=ceph_preview -o rook cmd/rook/*.go
|
|
|
|
- name: Run CLI validation test
|
|
run: ./tests/scripts/multus/test-110-cli.sh
|
|
|
|
- name: Label kind nodes for stretch cluster tests
|
|
id: label
|
|
# tests that require labels are independent from previous tests
|
|
if: steps.build.outcome == 'success' && !cancelled()
|
|
run: ./tests/scripts/multus/test-200-stretch-label-nodes.sh
|
|
# nodes are purposefully not tainted yet for overlap test
|
|
|
|
- name: Run stretch cluster overlap test
|
|
id: overlap
|
|
# independent from other tests as long as nodes are labeled
|
|
if: steps.label.outcome == 'success' && !cancelled()
|
|
run: ./tests/scripts/multus/test-210-stretch-overlap.sh
|
|
|
|
- name: Run cleanup test
|
|
# cleanup relies on overlap test to be successful
|
|
if: steps.overlap.outcome == 'success' && !cancelled()
|
|
run: ./tests/scripts/multus/test-211-stretch-cleanup.sh
|
|
|
|
- name: Taint kind nodes for remaining stretch cluster tests
|
|
id: taint
|
|
# tests that require taints+labels are independent from previous tests
|
|
if: steps.label.outcome == 'success' && !cancelled()
|
|
run: ./tests/scripts/multus/test-200-stretch-taint-nodes.sh
|
|
|
|
- name: Run stretch cluster test with public and cluster networks
|
|
# independent from other tests as long as nodes are tainted and labeled
|
|
if: steps.taint.outcome == 'success' && !cancelled()
|
|
run: ./tests/scripts/multus/test-220-stretch-pub-and-cluster.sh
|
|
|
|
- name: Run stretch cluster test with public network only
|
|
# independent from other tests as long as nodes are tainted and labeled
|
|
if: steps.taint.outcome == 'success' && !cancelled()
|
|
run: ./tests/scripts/multus/test-230-stretch-pub-only.sh
|
|
|
|
- name: Run stretch cluster test with cluster network only
|
|
# independent from other tests as long as nodes are tainted and labeled
|
|
if: steps.taint.outcome == 'success' && !cancelled()
|
|
run: ./tests/scripts/multus/test-240-stretch-cluster-only.sh
|
|
|
|
- name: dump cluster state on failure
|
|
if: failure()
|
|
run: |
|
|
kubectl get nodes -o wide || true
|
|
kubectl get pods -A -o wide || true
|
|
kubectl -n kube-system describe daemonset kube-multus-ds install-cni-plugins whereabouts || true
|
|
kubectl get events -A --sort-by=.lastTimestamp | tail -60 || true
|
|
kubectl -n kube-system logs -l name=multus --all-containers --tail=30 || true
|
|
|
|
- name: consider (post-job) debugging
|
|
uses: ./.github/workflows/upterm_debug
|
|
with:
|
|
debug-ci: ${{ contains(github.event.pull_request.labels.*.name, 'debug-ci') }}
|