Skip to content

Commit

Permalink
subnet: fix deleting lr policy on node deletion (#3178)
Browse files Browse the repository at this point in the history
Signed-off-by: 张祖建 <zhangzujian.7@gmail.com>
  • Loading branch information
zhangzujian committed Sep 1, 2023
1 parent eb9bcd5 commit cb80f8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/node.go
Expand Up @@ -1199,9 +1199,9 @@ func (c *Controller) deletePolicyRouteForNode(nodeName string) error {
}
}
}
} else {
klog.Infof("delete policy route for centralized subnet %s", subnet.Name)
if err := c.deletePolicyRouteForCentralizedSubnet(subnet); err != nil {
} else if subnet.Status.ActivateGateway == nodeName {
klog.Infof("reconcile ovn route for centralized subnet %s", subnet.Name)
if err := c.reconcileOvnRoute(subnet); err != nil {
klog.Errorf("failed to delete policy route for centralized subnet %s, %v", subnet.Name, err)
return err
}
Expand Down

0 comments on commit cb80f8d

Please sign in to comment.