-
Notifications
You must be signed in to change notification settings - Fork 3.4k
node: Replace ipv[46]MasqAddrs with Table[NodeAddress] #30457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@dylandreimerink Please take a look and let me know whether you're OK with these incremental changes. I don't think they're entirely taking the loader to the right direction, so if you have a better idea what steps we should take let me know and I'll refactor this. |
/test |
df12459
to
6c3ad04
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Left a few minor comments.
I would like to keep it as it was originally (as bad as it was) and not start changing it now.
Good point, I'll adjust the comments.
Will add comments to explain that default is empty which means the address is taken from the actual device and not overridden by this. |
Yes for this particular hidden option it is assumed that the device exists before the agent starts. We could also just forget this PR and incorporate it into a follow-up that @dylandreimerink is working on that adds the loader reconciliation on device changes? |
6c3ad04
to
17afcf9
Compare
17afcf9
to
a00d084
Compare
A |
f522367
to
a7be16f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new logic looks good to me, besides the above comment.
I'll assume that the function is moved if needed as discussed here #30457 (comment)
a7be16f
to
2dbea5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
2dbea5e
to
00926a5
Compare
/test |
44ed79f
to
2f25197
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2f25197
to
c629a52
Compare
/test |
CI triage (WIP)
Given the amount of redness in these tests I don't think these are just flakes. |
Replace the global map of BPF masquerade addresses with a query to Table[NodeAddress] in the loader's patchHostNetdevDatapath and remove the now unused code around masquerade addresses in pkg/node. Signed-off-by: Jussi Maki <jussi@isovalent.com>
Some setups that use e.g. ECMP may not have addresses assigned to all devices. For BPF masquerading one can use DeriveMasqIPFromDevice to work around this, but we don't have a similar mechanism for the direct routing address. To fix this and retain the semantics of v1.14, add a "wildcard device" (*) to the NodeAddress table that picks suitable fallback addresses from all devices in the system. The criteria (in order) is to prefer public over private, lower scope, lower ifindex and finally lower address. To allow overlapping addresses in the NodeAddress table, use a primary key that combines address with device name. Signed-off-by: Jussi Maki <jussi@isovalent.com>
c629a52
to
f538065
Compare
/test |
Replace the global map of BPF masquerade addresses with a query to Table[NodeAddress] in the loader's patchHostNetdevDatapath and remove the now unused code around masquerade addresses in pkg/node.