Skip to content

Assign EIP only to primary ENI - #636

Merged
antonipp merged 1 commit into
v1.18-ddfrom
ai/eip-only-primary-eni
Nov 12, 2025
Merged

Assign EIP only to primary ENI#636
antonipp merged 1 commit into
v1.18-ddfrom
ai/eip-only-primary-eni

Conversation

@antonipp

Copy link
Copy Markdown
Collaborator

This is a quickfix for the issue which caused secondary ENIs to be assigned Public IPs

The main issue was that there was no check on eni.Number == 0 before assignment.

Another issue was that with first-interface-index: 1, the IPAM reconciliation loop was exiting here for the primary ENI:

return nil

so it was never saving the Public IP:

cilium/pkg/aws/eni/node.go

Lines 653 to 656 in 123b048

// If the primary ENI has a public IP, we store it
if e.Number == 0 && e.PublicIP != "" {
stats.AssignedStaticIP = e.PublicIP
}
. It didn't really impact functionality but cased infinite retries to assign a new Public IP. I just moved the Public IP check further up, before the index check.

@antonipp
antonipp merged commit afebcbc into v1.18-dd Nov 12, 2025
16 of 18 checks passed
@antonipp
antonipp deleted the ai/eip-only-primary-eni branch November 12, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants