Skip to content

Conversation

@isaac-dasan
Copy link
Member

@isaac-dasan isaac-dasan commented Jul 4, 2025

update network error msg to match kubelet expectations

cherry pick from master of this

Requirements:

Notes:

Copilot AI review requested due to automatic review settings July 4, 2025 00:25
@isaac-dasan isaac-dasan requested a review from a team as a code owner July 4, 2025 00:25
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 updates the network readiness error message so that kubelet will recognize it and retry faster, aligning with upstream expectations.

  • Prefixes the existing mtpnc-not-ready error with “network is not ready”
  • Adds an inline comment linking to the kubelet source that checks for this string
  • (Unit tests and documentation updates included in the cherry-picked PR)
Comments suppressed due to low confidence (2)

cns/middlewares/k8sSwiftV2.go:22

  • Ensure there is a unit test that specifically asserts this error message starts with "network is not ready", so kubelet will detect and retry as intended.
errMTPNCNotReady = errors.New("network is not ready - mtpnc is not ready") 

cns/middlewares/k8sSwiftV2.go:22

  • [nitpick] The variable name errMTPNCNotReady now covers network readiness; consider renaming it to errNetworkNotReady or similar to better reflect its scope.
errMTPNCNotReady = errors.New("network is not ready - mtpnc is not ready") 
@santhoshmprabhu
Copy link
Contributor

@isaac-dasan I can see that this PR is a cherry-pick and the diff is tiny, but we have been talking about having all changes being under UT coverage, could we please add one? One approach that works pretty well for all fixes is to add an assertion that fails without your fix, but passes with the fix.

santhoshmprabhu
santhoshmprabhu previously approved these changes Jul 4, 2025
Copy link
Contributor

@santhoshmprabhu santhoshmprabhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UT will be added when we cherry pick #3776 to 1.6.

miguelgoms
miguelgoms previously approved these changes Jul 8, 2025
@isaac-dasan isaac-dasan dismissed stale reviews from miguelgoms and santhoshmprabhu via 00d66ee July 11, 2025 16:23
@isaac-dasan isaac-dasan requested a review from a team as a code owner July 11, 2025 16:23
@isaac-dasan isaac-dasan requested a review from rejain456 July 11, 2025 16:23
@isaac-dasan
Copy link
Member Author

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).
update network error msg to match kubelet expectations Signed-off-by: GitHub <noreply@github.com>
…3776) squash commit to prevent github CLA issue Signed-off-by: GitHub <noreply@github.com>
@isaac-dasan isaac-dasan force-pushed the isaac/1-6cherrypick/mtpncerrormessage branch from 00d66ee to 6da6ad6 Compare July 11, 2025 16:44
@isaac-dasan isaac-dasan changed the title fix: update network error msg to match kubelet expectations (#3768) perf: cherry-pick: update error message for MTPNC not found and not ready in CNS (#3776), (#3768) Jul 11, 2025
@isaac-dasan isaac-dasan changed the title perf: cherry-pick: update error message for MTPNC not found and not ready in CNS (#3776), (#3768) [backport] - (#3776)(#3768) perf: update error message for MTPNC not found and not ready in CNS Jul 11, 2025
@isaac-dasan
Copy link
Member Author

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).
@rbtr rbtr enabled auto-merge July 11, 2025 17:40
@rbtr rbtr added this pull request to the merge queue Jul 11, 2025
Merged via the queue into release/v1.6 with commit 75e1f71 Jul 11, 2025
10 of 15 checks passed
@rbtr rbtr deleted the isaac/1-6cherrypick/mtpncerrormessage branch July 11, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

7 participants