Bug 2099843

Summary: unit test fails: should ensure SNATs towards egressIP and nodeIP are correctly configured during egressIP re-assignment
Product: OpenShift Container Platform Reporter: Tim Rozet <trozet>
Component: NetworkingAssignee: Patryk Diak <pdiak>
Networking sub component: ovn-kubernetes QA Contact: Anurag saxena <anusaxen>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: high    
Priority: unspecified CC: ffernand, pdiak
Version: 4.10Keywords: Triaged
Target Milestone: ---   
Target Release: 4.10.z   
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: 2022-11-08 14:35:02 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:
Bug Depends On: 2100502    
Bug Blocks:    

Description Tim Rozet 2022-06-21 19:39:39 UTC
Description of problem:
This test is currently failing in 4.10 with the following output:

   the extra elements were
        <[]*nbdb.LogicalRouterPolicy | len:2, cap:2>: [
            {
                UUID: "c168be9b-7c43-4fcc-972c-af284cc43f2b",
                Action: "reroute",
                ExternalIDs: {"name": "egressip"},
                Match: "ip4.src == 10.128.0.15",
                Nexthop: nil,
                Nexthops: [],
                Options: nil,
                Priority: 100,
            },
            {
                UUID: "d062a239-6da0-45ed-b661-0170ca5ca0f3",
                Action: "reroute",
                ExternalIDs: {"name": "egressip"},
                Match: "ip4.src == 10.128.0.16",
                Nexthop: nil,
                Nexthops: [],
                Options: nil,
                Priority: 100,
            },
        ]

It looks like the nexthops are just being removed, rather than the entire logical route policy being deleted:

2022/06/21 15:19:33 cache: "caller"={"file":"cache.go","line":684} "level"=5 "msg"="updating row" "uuid"="ed99a05c-c2e4-4b2a-a95f-ddca4a2f6e14" "table"="Logical_Router_Policy" "old"="&{UUID:ed99a05c-c2e4-4b2a-a95f-ddca4a2f6e14 Action:reroute ExternalIDs:map[name:egressip] Match:ip4.src == 10.128.0.15 Nexthop:<nil> Nexthops:[100.64.0.2] Options:map[] Priority:100}" "new"="&{UUID:ed99a05c-c2e4-4b2a-a95f-ddca4a2f6e14 Action:reroute ExternalIDs:map[name:egressip] Match:ip4.src == 10.128.0.15 Nexthop:<nil> Nexthops:[] Options:map[] Priority:100}"

Does not happen in 4.11, so 4.10 is missing some logic to determine if we should remove nexthop or delete the entire policy.