Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 1924750

Summary: Need ability to specify lb_force_snat per egress interface
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Tim Rozet <trozet>
Component: OVNAssignee: OVN Team <ovnteam>
Status: CLOSED DUPLICATE QA Contact: Jianlin Shi <jishi>
Severity: high Docs Contact:
Priority: unspecified    
Version: RHEL 8.0CC: ctrautma, dcbw, dceara, nusiddiq
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-01 16:04:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Rozet 2021-02-03 14:46:40 UTC
Description of problem:
In ovn-kubernetes we are moving to a network topology where host-> k8s service (load balancer) is handled by openflow in our shared gateway bridge, rather than using multiple interfaces attached to bridges in OVN. This simplifies our deployment and allows for more OVS offload capabilities. The topology looks like this:

          (shared gw bridge)
host -------br-ex---------------172.0.18.2 OVN GR 100.64.0.2-----<rest of OVN>
              |
             eth0

Assume the OVN GR has a load balancer on it for services, 10.1.1.1 VIP. The OVN GR has lb_force_snat=100.64.0.2

Normally if traffic comes from outside (eth0) into br-ex and is destined for 10.1.1.1 it will be load balanced to a back end pod. That usually results in the packet getting passed to "rest of OVN" and the packet is SNAT'ed to 100.64.0.2, so that if the packet is sent to another node via geneve, it will return to the original node to be unSNAT'ed.

However, in the case where we want to access the service from the host, and the endpoint to the load balancer is on the host or on another node, we will see this behavior:
1. host sends packet into br-ex, which gets forwarded into OVN GR destined for 10.1.1.1
2. GR LB load-balances to another service on the host or another node, hairpins the traffic back out towards br-ex
3. SNATs to 100.64.0.2

Now the host sees the 100.64.0.2 IP address of an internal subnet in OVN, when really that subnet should never be exposed. The desired behavior here is to bind the force_snat to a particular interface. This would allow the SNAT to change depending on which interface the packet egresses on. This is more deterministic than taking any packet in a networking pipeline and always SNAT'ing it to the same thing. My current thought is we could specify something like

lb_force_snat="interface1, interface2", where the interfaces must exist and have ip addresses on them to take effect as an alternative to providing a single ip address.

Comment 1 Dan Williams 2021-03-01 01:51:02 UTC
Numan, this is fixed in 20.12.0-21 I think, right?

Comment 2 Numan Siddique 2021-03-01 06:07:09 UTC
Yes. But a different approach has been used to address this issue - lb_force_snat_ip=router_ip
and the BZ for that is - https://bugzilla.redhat.com/show_bug.cgi?id=1931319

I'll mark this BZ as duplicate of 1931319 ?

Comment 3 Dan Williams 2021-03-01 16:04:09 UTC

*** This bug has been marked as a duplicate of bug 1931319 ***