Skip to content
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

[release-4.10] Bug 2105657: Fix egressIP object deletion if the node is deleted first #1228

Merged
merged 4 commits into from
Nov 4, 2022

Commits on Nov 2, 2022

  1. gatewayCleanup doesn't delete rtoj* ports

    Currently gatewayCleanup doesn't delete rtoj-* ports
    which is fine since it deletes the router and probably
    on the OVN side the ports on the router are also removed
    as they are dependent on the router. However from a testing
    perspective its nice to have the gatewayCleanup remove these
    ports explictly just like multiJoinSwitchGatewayCleanup does.
    
    Corresponding gatewayCleanup unit tests are also updated.
    
    We also add a unit test to egressip testing where we test
    reassignment upon egress node deletion, specifically where
    the node has already gotten deleted by the node watcher. This
    test uncovers a bug we have in egressIP code where the
    reassignment will not be successful and will fail with the error
    
    E0608 09:42:53.781497  971577 obj_retry.go:1513] Failed to delete resource object node1 of type *factory.egressNode, error: Re-assignment for EgressIP: egressip failed, unable to update object, err: unable to retrieve gateway IP for node: node1, protocol is IPv6: false, err: attempt at finding node gateway router network information failed, err: unable to find router port rtoj-GR_node1: object not found
    
    Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
    (cherry picked from commit 9d0aebe)
    (cherry picked from commit 2100d49)
    
     Conflicts:
    	go-controller/pkg/ovn/gateway_cleanup.go
    
    Conflict because libovsdbops.DeleteLogicalRouterPorts(oc.nbClient,
    &logicalRouter, &logicalRouterPort) doesn't exist in 4.10 since we are missing
    openshift@8b14898#diff-5d62dde13a2856ea3d4b324968dbaeed261fcb74cb3b81909edf40a6634fa1f4R161 {libovsdb-refactor-cleanup-4.11}
    tssurya committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    a667037 View commit details
    Browse the repository at this point in the history
  2. libovsdb-cleanup: Carry DeleteNextHopFromLogicalRouterPoliciesWithPre…

    …dicate
    
    Partial pick of
    openshift@4e3c26a#diff-5d62dde13a2856ea3d4b324968dbaeed261fcb74cb3b81909edf40a6634fa1f4
    from 4e3c26a.
    Had to bring in the code required to do
    DeleteNextHopFromLogicalRouterPoliciesWithPredicate
    
    Signed-off-by: Jaime Caamaño Ruiz <jcaamano@redhat.com>
    tssurya committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    159c52b View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. Fix egressIP object deletion if the node is deleted first

    There are a few instances in egressIP code where we shouldn't
    fail hard if objects are not found, example if a node gets
    deleted before egressIP watcher takes action. In this case,
    we can log a warning saying objects couldn't be deleted and
    move on since its technically not an error if the object was
    deleted by some other code path.
    
    In oder to ensure we don't leave behind stale reroute policy
    entries, we also add the logic of removing policies that have
    nexthop == joinIP of the node that's getting deleted into the
    gateway cleanup code.
    
    Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
    (cherry picked from commit 95ab759)
    (cherry picked from commit 95486d9)
    
     Conflicts:
    	go-controller/pkg/ovn/egressip.go
    	go-controller/pkg/util/net.go
    
    Conflicts because EIP retry code is absent in 4.10
    Note: Brought in the chnages done in retry code for
    getGatewayRouterJoinIP since they made more sense that way.
    tssurya committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    badec68 View commit details
    Browse the repository at this point in the history
  2. SkipTest:should not do anyting for user defined status updates

    Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
    (cherry picked from commit 35b4793)
    (cherry picked from commit 619748b)
    tssurya committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    eea899a View commit details
    Browse the repository at this point in the history