Skip to content

feat(eni): add IPStatusInvalid and update status handling for invalid…

5465d9e
Select commit
Loading
Failed to load commit list.
Merged

feat(eni): add IPStatusInvalid and update status handling for invalid… #942

feat(eni): add IPStatusInvalid and update status handling for invalid…
5465d9e
Select commit
Loading
Failed to load commit list.
Cursor / Cursor Bugbot completed Nov 25, 2025 in 4m 3s

Bugbot Review

Bugbot Analysis Progress (4m 5s elapsed)

✅ Gathered PR context (2s)
✅ Analyzed code changes (0s)
✅ Completed bug detection — 1 potential bug found (3m 59s)
✅ Validation and filtering completed (0s)
✅ Posted analysis results — 1 bug reported (3s)
✅ Analysis completed successfully (0s)

Final Result: Bugbot completed review and found 1 potential issue

Request ID: serverGenReqId_5e05d923-cc61-441b-b516-38b5ffbaefd6

Details

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 21

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bug: Invalid IPs assigned in takeover case

The takeover logic assigns IPs to pods without checking the IP status. This allows pods to be assigned IPs with IPStatusInvalid or IPStatusDeleting status, which could be non-functional or in the process of being removed. The normal assignment flow at lines 722 and 767 correctly filters for IPStatusValid, but the takeover case at lines 676-680 and 689-693 lacks this validation, creating an inconsistency that could assign invalid IPs to pods.

pkg/controller/multi-ip/node/pool.go#L675-L680

eniIP, ok := ipv4Map[info.IPv4]
if ok && (eniIP.IP.PodID == "" || eniIP.IP.PodID == podID) {
info.ipv4Ref = eniIP
eniIP.IP.PodID = podID
eniIP.IP.PodUID = info.PodUID
log.Info("assign ip (from pod status)", "pod", podID, "ip", eniIP.IP, "eni", eniIP.NetworkInterface.ID)

pkg/controller/multi-ip/node/pool.go#L688-L693

eniIP, ok := ipv6Map[info.IPv6]
if ok && (eniIP.IP.PodID == "" || eniIP.IP.PodID == podID) {
info.ipv6Ref = eniIP
eniIP.IP.PodID = podID
eniIP.IP.PodUID = info.PodUID
log.Info("assign ip (from pod status)", "pod", podID, "ip", eniIP.IP, "eni", eniIP.NetworkInterface.ID)

Fix in Cursor Fix in Web