Skip to content

Commit

Permalink
fix: do not gc learned routes
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Aug 31, 2020
1 parent edb4039 commit 78ab9b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/controller/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ func (c *Controller) gcPortGroup() error {
}

func (c *Controller) gcStaticRoute() error {
klog.Infof("start to gc static routes")
routes, err := c.ovnClient.ListStaticRoute()
if err != nil {
klog.Errorf("failed to list static route %v", err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ type StaticRoute struct {
}

func (c Client) ListStaticRoute() ([]StaticRoute, error) {
output, err := c.ovnNbCommand("--format=csv", "--no-heading", "--data=bare", "--columns=ip_prefix,nexthop,policy", "list", "Logical_Router_Static_Route")
output, err := c.ovnNbCommand("--format=csv", "--no-heading", "--data=bare", "--columns=ip_prefix,nexthop,policy", "find", "Logical_Router_Static_Route", "external_ids{=}{}")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 78ab9b1

Please sign in to comment.