fix: wrap handleCommonOptions error with NetworkNotReadyErrorMsg#4411
Open
behzad-mir wants to merge 1 commit into
Open
fix: wrap handleCommonOptions error with NetworkNotReadyErrorMsg#4411behzad-mir wants to merge 1 commit into
behzad-mir wants to merge 1 commit into
Conversation
Wrap the error returned from handleCommonOptions in newNetworkImpl with NetworkNotReadyErrorMsg so kubelet treats transient failures (e.g. ENETUNREACH from route installation) as network-not-ready and retries the ADD call in ~1 second. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Wraps the error returned from handleCommonOptions in newNetworkImpl with the NetworkNotReadyErrorMsg sentinel string so that the CNI plugin surfaces transient network setup failures (e.g., ENETUNREACH during route installation) as "network is not ready" to kubelet, which then retries the CNI ADD call sooner (~1s) instead of treating it as a hard error.
Changes:
- Wrap the error from
handleCommonOptionswithNetworkNotReadyErrorMsginnetwork_linux.go::newNetworkImpl.
isaac-dasan
approved these changes
May 19, 2026
QxBytes
reviewed
Jun 1, 2026
| if err != nil { | ||
| logger.Error("handleCommonOptions failed with", zap.Error(err)) | ||
| return nil, err | ||
| return nil, errors.Wrap(err, NetworkNotReadyErrorMsg) |
Contributor
There was a problem hiding this comment.
Curious how this particular string in the error message changes the behavior of kubelet?
If there is an ADD failure doesn't it already retry?
Also this error message string seems to be used in the context of swiftv2 mtpnc, rather than the vm's networking which applies to all scenarios (even non-swiftv2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wrap the error returned from handleCommonOptions in newNetworkImpl with NetworkNotReadyErrorMsg so kubelet treats transient failures (e.g. ENETUNREACH from route installation) as network-not-ready and retries the ADD call in ~1 second.
Reason for Change:
Issue Fixed:
Requirements:
Notes: