ci: make wireserver and metadata test pod names unique - #4828
ci: make wireserver and metadata test pod names unique#4828Alexander (QxBytes) wants to merge 3 commits into
Conversation
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.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 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.
|
/azp run Azure Container Networking PR |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
John Payne (jpayne3506)
left a comment
There was a problem hiding this comment.
lgtm. If we run into issues again, we should have a proper test start and tear down.
a84fd63
|
/azp run Azure Container Networking PR |
|
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
a84fd63 to
6df462c
Compare
There was a problem hiding this comment.
🟡 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
| 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" |
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: