Skip to content

test(e2e): improve additional network interfaces e2e test reliability#2290

Merged
LopatinDmitr merged 4 commits intomainfrom
fix/test/additional-network-interfaces
Apr 30, 2026
Merged

test(e2e): improve additional network interfaces e2e test reliability#2290
LopatinDmitr merged 4 commits intomainfrom
fix/test/additional-network-interfaces

Conversation

@LopatinDmitr
Copy link
Copy Markdown
Contributor

@LopatinDmitr LopatinDmitr commented Apr 28, 2026

Description

This PR improves the reliability and diagnostics of the VirtualMachineAdditionalNetworkInterfaces E2E test.

Key changes:

  1. Retry logic for SSH commands: Replaced direct SSHCommand calls with checkResultSSHCommand which includes Eventually retry logic. This helps avoid test failures due to transient SSH connectivity issues during VM boot or configuration.
  2. Enhanced Diagnostics: Added automatic dumping of ClusterNetwork and CiliumEndpoint (CEP) resources when tests in the virtualmachineadditionalnetworkinterfaces block fail.

Why do we need it, and what problem does it solve?

  • The E2E tests were occasionally failing due to SSH timeouts or transient errors before the VM was fully ready.
  • Diagnosing network-related failures in E2E was difficult without seeing the state of the underlying network resources (ClusterNetwork, CEP).

What is the expected result?

  • VirtualMachineAdditionalNetworkInterfaces tests are more stable.
  • If a failure occurs, the diagnostic dump contains clusternetwork.yaml and cep.yaml.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: test
type: fix
summary: Improve VirtualMachineAdditionalNetworkInterfaces e2e test reliability and diagnostics.
impact_level: low

@LopatinDmitr LopatinDmitr requested a review from Isteb4k as a code owner April 28, 2026 07:40
@LopatinDmitr LopatinDmitr changed the title test(e2e): add clusternetwork and cep to test case dump fix(test): improve additional network interfaces e2e test reliability Apr 28, 2026
@LopatinDmitr LopatinDmitr added this to the v1.9.0 milestone Apr 28, 2026
@LopatinDmitr LopatinDmitr changed the title fix(test): improve additional network interfaces e2e test reliability test(e2e): improve additional network interfaces e2e test reliability Apr 28, 2026
Comment thread test/e2e/vm/additional_network_interfaces.go Outdated
Comment thread test/e2e/internal/framework/dump.go Outdated
LopatinDmitr and others added 3 commits April 30, 2026 13:08
…s test

Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Enable ClusterNetwork and CiliumEndpoint resource dumping for failed
additional network interface tests to improve diagnostics.

Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Co-authored-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Signed-off-by: Dmitry Lopatin <93423466+LopatinDmitr@users.noreply.github.com>
@LopatinDmitr LopatinDmitr force-pushed the fix/test/additional-network-interfaces branch from f237ce8 to 94abae6 Compare April 30, 2026 10:08
Comment thread test/e2e/internal/framework/dump.go Outdated
@LopatinDmitr LopatinDmitr force-pushed the fix/test/additional-network-interfaces branch from 66bd62e to 6faad49 Compare April 30, 2026 14:42
Use the full Ginkgo test name when deciding whether to dump
ClusterNetwork and CEP resources so truncation of filenames does not
skip the additional network diagnostics.

Refactor the interface name persistence check to use a dedicated retry
helper that reads and parses interface data via ip JSON output.

Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
@LopatinDmitr LopatinDmitr force-pushed the fix/test/additional-network-interfaces branch from 6faad49 to 13bbde9 Compare April 30, 2026 14:49
@LopatinDmitr LopatinDmitr merged commit 698868e into main Apr 30, 2026
27 of 28 checks passed
@LopatinDmitr LopatinDmitr deleted the fix/test/additional-network-interfaces branch April 30, 2026 15:03
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.

2 participants