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

Bug 2094039: egressIP: node retrieval failure is not respected, causes panic #1130

Merged
merged 1 commit into from Jun 8, 2022

Commits on Jun 8, 2022

  1. egressIP: node retrieval failure is not respected, causes panic

    Fixes panic seen during checkEgressNodesReachability
    E0606 11:57:34.063567       1 egressip.go:2096] Node:
    huirwang-0606c-m5w24-worker-2-dkjmc reachability changed, but could not
    retrieve node from cache, err: node
    "huirwang-0606c-m5w24-worker-2-dkjmc" not found
    W0606 11:57:34.063658       1 egressip.go:1657] Unable to remove GARP
    configuration on external logical switch port for egress node:
    huirwang-0606c-m5w24-worker-2-dkjmc, err: object not found
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x176626d]
    
    goroutine 487 [running]:
    github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).checkEgressNodesReachability(0xc000171c00)
    	/home/surya/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/egressip.go:2099
    +0x3ed
    created by
    github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).initClusterEgressPolicies
    	/home/surya/go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/egressip.go:1772
    +0xdb
    
    The problem here is that the node retrieval fails since the node has
    already been deleted, instead of respecting that failure we just
    log the error saying node object not found and actually continue
    to use that object further in the code which causes this panic.
    
    Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
    (cherry picked from commit 36176e5)
    tssurya committed Jun 8, 2022
    Copy the full SHA
    f436d25 View commit details
    Browse the repository at this point in the history