Skip to content

Commit

Permalink
fix: gc not exist node error
Browse files Browse the repository at this point in the history
```bash
failed to list static route  , ovn-nbctl: nexthop=: argument does not end in ... followed by a value
```
  • Loading branch information
oilbeater committed Mar 2, 2021
1 parent 8bd4460 commit 08b95e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,9 @@ func (c Client) DeleteStaticRoute(cidr, router string) error {
}

func (c Client) DeleteStaticRouteByNextHop(nextHop string) error {
if nextHop == "" {
return nil
}
output, err := c.ovnNbCommand("--format=csv", "--no-heading", "--data=bare", "--columns=ip_prefix", "find", "Logical_Router_Static_Route", fmt.Sprintf("nexthop=%s", nextHop))
if err != nil {
klog.Errorf("failed to list static route %s, %v", nextHop, err)
Expand Down

0 comments on commit 08b95e7

Please sign in to comment.