-
Notifications
You must be signed in to change notification settings - Fork 254
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
fix lr-lb dnat with multiple distributed gateway ports #227
Conversation
northd/northd.c
Outdated
est_match_p = xasprintf("%s && is_chassis_resident(%s)", | ||
est_match, | ||
od->l3dgw_ports[0]->cr_port->json_key); | ||
if (od->n_l3dgw_ports > 1) { |
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.
What if the VIP is not in any of the LRP's subnets?
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.
Also, we probably need some tests to ensure this behavior doesn't change by accident in the future.
Never mind, I missed the sign off in the commit log but it's already there. Sorry for the noise. |
Signed-off-by: zcq98 <[email protected]>
Signed-off-by: zcq98 <[email protected]>
62a650b
to
1e12432
Compare
hi @dceara,could you help review this ? |
Please target the |
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.
Is it worth mentioning this change in the NEWS file? We didn't support LR LBs with multiple gw ports and with this we will, so it seems like it's a user-visible change.
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1); | ||
VLOG_WARN_RL(&rl, | ||
"No matched LRP's subnet for VIP %s", | ||
lb_vip->vip_str); |
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.
Is your intention to log when no GW port has a subnet matching the VIP? If so, this will log for every port that doesn't match the VIP and that seems wrong to me.
#222
is_chassis_resident and output in “lr_out_undnat” is not set correctly when there are multiple gw ports.
When lr has multiple gw ports, LB VIP should determine is_chassis_resident and outport based on the LRP's subnet to which it belongs.If there is no matching subnet, l3dgw_ports[0] will be used by default.