Skip to content

Commit c357fdc

Browse files
behzad-mirCopilot
andcommitted
fix: wrap handleCommonOptions error with NetworkNotReadyErrorMsg
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>
1 parent 8be20d0 commit c357fdc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

network/network_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (nm *networkManager) newNetworkImpl(nwInfo *EndpointInfo, extIf *externalIn
116116
err := nm.handleCommonOptions(ifName, nwInfo)
117117
if err != nil {
118118
logger.Error("handleCommonOptions failed with", zap.Error(err))
119-
return nil, err
119+
return nil, errors.Wrap(err, NetworkNotReadyErrorMsg)
120120
}
121121

122122
// Create the network object.

0 commit comments

Comments
 (0)