Skip to content

Conversation

@isaac-dasan
Copy link
Member

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:

Copilot AI review requested due to automatic review settings July 10, 2025 20:34
@isaac-dasan isaac-dasan requested review from a team as code owners July 10, 2025 20:34
@isaac-dasan isaac-dasan requested a review from nairashu July 10, 2025 20:34
Copy link
Contributor

Copilot AI left a 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 netio package, which is required for netio.NewMockNetIO. Please add the appropriate import, e.g., "github.com/Azure/azure-container-networking/netio".
				netioshim:      netio.NewMockNetIO(false, 0),

@isaac-dasan
Copy link
Member Author

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@isaac-dasan
Copy link
Member Author

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@isaac-dasan isaac-dasan force-pushed the isaac/swiftv2/dhcpErrMsgFix branch from 671e436 to 9d7b2be Compare July 11, 2025 01:38
@isaac-dasan
Copy link
Member Author

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@isaac-dasan isaac-dasan enabled auto-merge July 11, 2025 01:40
@isaac-dasan isaac-dasan added this pull request to the merge queue Jul 11, 2025
Merged via the queue into master with commit 0c92e89 Jul 11, 2025
14 of 15 checks passed
@isaac-dasan isaac-dasan deleted the isaac/swiftv2/dhcpErrMsgFix branch July 11, 2025 07:20
isaac-dasan added a commit that referenced this pull request Jul 11, 2025
* 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]>
github-merge-queue bot pushed a commit that referenced this pull request Jul 12, 2025
…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]>
NihaNallappagari pushed a commit to NihaNallappagari/azure-container-networking that referenced this pull request Sep 4, 2025
* 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]>
sivakami-projects pushed a commit that referenced this pull request Oct 23, 2025
* 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]>
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.

5 participants