Skip to content

ci: fix wireserver and imds test flakes - #4828

Merged
Behzad Mirkhanzadeh (behzad-mir) merged 4 commits into
masterfrom
alew/imds-test-patch
Sep 10, 2026
Merged

ci: fix wireserver and imds test flakes#4828
Behzad Mirkhanzadeh (behzad-mir) merged 4 commits into
masterfrom
alew/imds-test-patch

Conversation

@QxBytes

@QxBytes Alexander (QxBytes) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Reason for Change:

On azure stateless e2e, we have windows nodes and run the imds metadata server sh test. Busybox, the image we use, only runs on linux, but the pod can get scheduled onto a windows node and fails to start up. This PR adds a selector so we only target linux, and also makes the run pod names unique.

Issue Fixed:

Requirements:

Notes:

during wireserver and metadata server pod cleanup, noticed some failures during
deletion of the pod after the command runs. when the deletion times out, we see
"timed out waiting for condition" and the pod remains on the cluster. then, when
we run kubectl run again with the same name, we get an error because the pod still
exists. this change modifies the pod name so it is suffixed by metadata or wireserver
so even if the pod fails to delete, we run the next command with a different
pod name without conflict. if the pod fails to delete but still ran, the result of
the kubectl run is of the inner command, so a bad delete shouldn't fail the test.
@QxBytes Alexander (QxBytes) self-assigned this Sep 2, 2026
Copilot AI lite review requested due to automatic review settings September 2, 2026 16:25
@QxBytes Alexander (QxBytes) added the ci Infra or tooling. label Sep 2, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new $RANDOM-based suffix has low entropy and can still collide in parallel CI runs, undermining the intended pod-name uniqueness.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the network connectivity smoke test to avoid kubectl run pod-name collisions when prior --rm cleanup times out, improving CI reliability for repeated/parallel runs.

Changes:

  • Introduces a per-run suffix used in pod names.
  • Splits the single pod name into two distinct names for wireserver vs metadata checks.
File summaries
File Description
test/network/wireserver_metadata_test.sh Adds a suffix and distinct pod names to prevent kubectl run name conflicts between the wireserver and metadata test invocations
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/network/wireserver_metadata_test.sh
@QxBytes

Copy link
Copy Markdown
Contributor Author

/azp run Azure Container Networking PR

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@jpayne3506 John Payne (jpayne3506) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. If we run into issues again, we should have a proper test start and tear down.

@QxBytes
Alexander (QxBytes) added this pull request to the merge queue Sep 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 2, 2026
@QxBytes

Copy link
Copy Markdown
Contributor Author

/azp run Azure Container Networking PR

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

node restart test may happen before so node might not be ready-- increases time for pod to startup

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new unique naming can mask recurring cleanup failures and lead to accumulating stranded pods without a best-effort cleanup safeguard.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread test/network/wireserver_metadata_test.sh Outdated
Copilot AI review requested due to automatic review settings September 9, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The current suffix uses only $RANDOM, which can still collide across parallel/rerun scenarios and undermines the intended “unique pod name” reliability improvement.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

test/network/wireserver_metadata_test.sh:16

  • Using bash $RANDOM (15-bit) as the sole uniqueness source can still collide across parallel CI jobs or repeated reruns, reintroducing the original "pod already exists" failure mode. Consider incorporating time and PID into the suffix to make collisions practically impossible.
SUFFIX="${RANDOM}"
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread test/network/wireserver_metadata_test.sh Outdated
Copilot AI review requested due to automatic review settings September 9, 2026 22:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are small, align with the stated CI failure mode, and the updated kubectl invocations look correct for Linux-only Busybox scheduling and unique pod naming.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@QxBytes Alexander (QxBytes) changed the title ci: make wireserver and metadata test pod names unique ci: fix wireserver and imds test flakes Sep 9, 2026
@QxBytes

Copy link
Copy Markdown
Contributor Author

/azp run Azure Container Networking PR

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Merged via the queue into master with commit c25aba4 Sep 10, 2026
34 of 37 checks passed
@behzad-mir
Behzad Mirkhanzadeh (behzad-mir) deleted the alew/imds-test-patch branch September 10, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Infra or tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants