Skip to content

ci: make wireserver and metadata test pod names unique - #4828

Open
Alexander (QxBytes) wants to merge 3 commits into
masterfrom
alew/imds-test-patch
Open

ci: make wireserver and metadata test pod names unique#4828
Alexander (QxBytes) wants to merge 3 commits into
masterfrom
alew/imds-test-patch

Conversation

@QxBytes

Copy link
Copy Markdown
Contributor

Reason for Change:

(from commit message):
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.

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 on lines +14 to +16
SUFFIX="${RANDOM}"

kubectl run "$POD_NAME-wireserver-${SUFFIX}" -it --rm --image busybox --restart Never --pod-running-timeout=5m "${OVERRIDES[@]}" -- wget --timeout=3 --header=Metadata:true "http://168.63.129.16/machine/plugins?comp=nmagent&type=getinterfaceinfov1"
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.

5 participants