OCPBUGS-115005: add polling timeout for Azure NIC updates - #265
OCPBUGS-115005: add polling timeout for Azure NIC updates#265Ultimate-etamitlU wants to merge 1 commit into
Conversation
The waitForCompletion function used context.TODO() with no timeout when polling Azure NIC update operations. This means each operation can block indefinitely while holding the per-node mutex, serializing all subsequent IP assignments for that node. On clusters with many EgressIPs per node (e.g. 250+), this causes cascading delays of 10+ minutes during upgrades when IPs are reassigned. Add a 2-minute polling timeout (defaultAzurePollingTimeout) to bound individual operations. This aligns with the AWS provider which uses a 1-minute timeout via PollUntilContextTimeout. The Azure timeout is set higher to account for Azure NIC updates involving more API roundtrips (7-8 vs 2 for AWS) and the SDK's default polling interval (~30s). Signed-off-by: Parikshit Khedekar <pkhedeka@redhat.com> Assisted-By: Claude Opus 4.6
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@Ultimate-etamitlU: This pull request references Jira Issue OCPBUGS-115005, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (core-networking-bot@redhat.com), skipping review request. The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. Summary by CodeRabbit
WalkthroughAzure NIC update polling now stops after two minutes. ChangesAzure NIC polling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR adds a bounded timeout to Azure NIC update polling without any identified merge-blocking risk; it is merge-ready after normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. Full details: Stable And Deterministic Test NamesExplanation The pull request changes only Full details: Test Structure And QualityExplanation PASS: The pull request changes only Full details: Microshift Test CompatibilityExplanation PASS: The pull request changes only Full details: Single Node Openshift (Sno) Test CompatibilityExplanation PASS: The pull request changes only Full details: Topology-Aware Scheduling CompatibilityExplanation PASS: The pull request changes only Full details: Ote Binary Stdout ContractExplanation PASS: The pull request changes only Full details: Ipv6 And Disconnected Network Test CompatibilityExplanation PASS: The pull request changes only Full details: No-Weak-CryptoExplanation PASS: The pull request changes only pkg/cloudprovider/azure.go. The added code defines a timeout, creates a context, polls Azure, and wraps an error. It adds no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom cryptography, or secret/token comparison. Full details: Container-PrivilegesExplanation PASS: The pull request changes only Full details: No-Sensitive-Data-In-LogsExplanation PASS: The pull request adds no logging statements and adds no sensitive values to error text. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ultimate-etamitlU The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@Ultimate-etamitlU: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
defaultAzurePollingTimeout) towaitForCompletion()for Azure NIC update operationscontext.TODO()with no timeout, allowing a single stalled operation to hold the per-node mutex indefinitelyDetails
The Azure SDK's
PollUntilDonehas no built-in timeout — it polls at a default 30s interval until a terminal state or context cancellation. The 2-minute timeout was validated against these SDK defaults: it allows ~4 poll cycles, which is generous for a single IP add/remove operation. This aligns with the AWS provider which uses a 1-minute timeout viaPollUntilContextTimeout.The timeout bounds how long the per-node mutex is held per operation. If the operation hasn't completed within 2 minutes, the controller returns an error and can retry, releasing the mutex for other queued IP operations on the same node.
Test plan
go test ./...)waitForCompletiontakes a real Azure SDKruntime.Pollerand no Azure mock infrastructure exists in the repo. The change adds a stdlibcontext.WithTimeoutto an existing call path.