-
Notifications
You must be signed in to change notification settings - Fork 260
perf: dhcp err msg in network swiftv2 code path #3793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR standardizes error messages in the DHCP and Swift V2 code paths to use kubelet.NetworkNotReadyErrorMsg so that the kubelet will retry with a faster backoff. It also updates tests to expect the new message and bumps Kubernetes module versions.
- Wrap DHCP discovery failures with the standard
NetworkNotReadyErrorMsg - Update Swift V2 middleware errors and tests to include
NetworkNotReadyErrorMsg - Bump k8s dependencies and update the devcontainer Go version
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| network/secondary_endpoint_linux_test.go | Add a DHCP-failure mock and update tests to expect NetworkNotReadyErrorMsg |
| network/secondary_endpoint_client_linux.go | Wrap DHCP error with kubelet.NetworkNotReadyErrorMsg |
| go.mod | Bump k8s.io and k8s.io/kubernetes dependencies |
| cns/middlewares/k8sSwiftV2_linux_test.go | Update tests to assert on NetworkNotReadyErrorMsg |
| cns/middlewares/k8sSwiftV2.go | Change Swift V2 error constants to use NetworkNotReadyErrorMsg |
| .devcontainer/devcontainer.json | Update Go feature to version 1.23.2 |
Comments suppressed due to low confidence (1)
network/secondary_endpoint_linux_test.go:382
- Missing import for the
netiopackage, which is required fornetio.NewMockNetIO. Please add the appropriate import, e.g.,"github.com/Azure/azure-container-networking/netio".
netioshim: netio.NewMockNetIO(false, 0),
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: GitHub <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Isaac <[email protected]>
671e436 to
9d7b2be
Compare
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* fix: dhcp error message to include kubelet err msg Signed-off-by: GitHub <[email protected]> * Update network/secondary_endpoint_client_linux.go Co-authored-by: Copilot <[email protected]> Signed-off-by: Isaac <[email protected]> --------- Signed-off-by: GitHub <[email protected]> Signed-off-by: Isaac <[email protected]> Co-authored-by: Copilot <[email protected]>
…3821) perf: dhcp err msg in network swiftv2 code path (#3793) * fix: dhcp error message to include kubelet err msg * Update network/secondary_endpoint_client_linux.go --------- Signed-off-by: GitHub <[email protected]> Signed-off-by: Isaac <[email protected]> Co-authored-by: Copilot <[email protected]>
* fix: dhcp error message to include kubelet err msg Signed-off-by: GitHub <[email protected]> * Update network/secondary_endpoint_client_linux.go Co-authored-by: Copilot <[email protected]> Signed-off-by: Isaac <[email protected]> --------- Signed-off-by: GitHub <[email protected]> Signed-off-by: Isaac <[email protected]> Co-authored-by: Copilot <[email protected]>
* fix: dhcp error message to include kubelet err msg Signed-off-by: GitHub <[email protected]> * Update network/secondary_endpoint_client_linux.go Co-authored-by: Copilot <[email protected]> Signed-off-by: Isaac <[email protected]> --------- Signed-off-by: GitHub <[email protected]> Signed-off-by: Isaac <[email protected]> Co-authored-by: Copilot <[email protected]>
Reason for Change:
The particular error message "network is not ready" will make kubelet retry with faster backOffInterval than default error messages.
https://github.com/kubernetes/kubernetes/blob/efd2a0d1f514be96a2f012fc3cb40f7c872b4e67/pkg/kubelet/pod_workers.go#L1495C2-L1501C3
Notes: