Skip to content

fix(test): wait for iperf server migration before continuity checks#2649

Open
nevermarine wants to merge 1 commit into
mainfrom
fix/test/iperf-migration-wait
Open

fix(test): wait for iperf server migration before continuity checks#2649
nevermarine wants to merge 1 commit into
mainfrom
fix/test/iperf-migration-wait

Conversation

@nevermarine

@nevermarine nevermarine commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

What & why

The post-upgrade release smoke test panicked with a nil-pointer dereference:

runtime error: invalid memory address or nil pointer dereference
release.getIPerfClientReport(...) test/e2e/release/iperf.go:145
release.(*currentReleaseSmokeTest).verifyIPerfContinuityAfterUpgrade(...) test/e2e/release/current_release_smoke.go:207

Root cause: getIPerfClientReport dereferences iperfServer.Status.MigrationState (a *VirtualMachineMigrationState). verifyIPerfContinuityAfterUpgrade fetched the iperf-server VM immediately, but the post-upgrade workload update live-migrates the VM asynchronously — the migration can start several minutes after the module becomes Ready. At the time of the check MigrationState was still nil, causing the panic. The test never waited for the migration to happen.

This assertion is test-only and was added recently (#2617); it is not a product regression.

Fix (test-only)

  • Add waitForIPerfServerMigration in test/e2e/release/iperf.go (styled like waitForIPerfServerToStart) that polls the iperf-server VirtualMachine via f.Clients.VirtClient() until Status.MigrationState != nil, Result == MigrationResultSucceeded, and both StartTimestamp/EndTimestamp are non-zero. Uses framework.MaxTimeout / framework.PollingInterval.
  • verifyIPerfContinuityAfterUpgrade now waits for the migration (new By(...) step) and passes the fully-populated VM to getIPerfClientReport.
  • Defense-in-depth: getIPerfClientReport gets an explicit Expect(...MigrationState).NotTo(BeNil(), ...) guard so a future regression fails with a clear message instead of a panic.

Verification

  • go build ./release/... and go vet ./release/... pass.
  • golangci-lint fmt ./release/... (gofumpt/gci/goimports) reports no changes. Note: golangci-lint run currently panics in this environment due to a Go toolchain vs linter version mismatch (Go 1.26 vs linter built with Go 1.25) during package type-checking — unrelated to this change.
section: test
type: fix
summary: "Wait for the iperf server live migration before running the release smoke continuity checks to avoid a nil-pointer panic."
impact_level: low

verifyIPerfContinuityAfterUpgrade fetched the iperf-server VM immediately,
but the post-upgrade workload migration is asynchronous and may start
several minutes after the module becomes Ready. Status.MigrationState was
still nil, so getIPerfClientReport panicked dereferencing it. Wait for the
live migration to succeed before reading MigrationState, and guard the
dereference so a future regression fails with a clear message.

Signed-off-by: Maksim Fedotov <maksim.fedotov@flant.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant