fix(cluster): continue IP confirmation after a per-item error#408
fix(cluster): continue IP confirmation after a per-item error#408neyy91 wants to merge 1 commit into
Conversation
The IP confirmation loop bailed out with break on the first failed GetIPAddressStatus call, even though the surrounding comment states the error is non-fatal and the remaining results are still valid. A single transient error therefore left every subsequent reservation unconfirmed, leaving its endpoints pending indefinitely and leaking the IP quota. Skip only the failed item so the rest of the reservations are still confirmed.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughIn ChangesIP Confirmation Error Handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
The IP confirmation loop in
inventoryService.runCheck(cluster/inventory.go) calledbreakon the first failedGetIPAddressStatus, aborting the whole pass - even though the comment right above it states the error is non-fatal and "The other results retrieved in this code are still valid". This changes it tocontinueso only the failed item is skipped.Why
A single transient IP-operator error left every reservation after the failing one unconfirmed. Their endpoints stay counted as pending indefinitely, so the provider's IP quota leaks and is never reclaimed for those leases — the code did the opposite of what its own comment intends.
Testing
Added
Test_runCheck_IPConfirmContinuesAfterError: three allocated, unconfirmed reservations where the firstGetIPAddressStatuserrors and the other two succeed; it asserts both later reservations are still confirmed. Fails onbreak, passes oncontinue