Skip to content

Commit

Permalink
subnet: fix deleting lr policy on node deletion (kubeovn#3178)
Browse files Browse the repository at this point in the history
Signed-off-by: 张祖建 <[email protected]>
  • Loading branch information
zhangzujian committed Sep 1, 2023
1 parent b9b8c78 commit 2abd478
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/controller/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1173,8 +1173,9 @@ func (c *Controller) deletePolicyRouteForNode(nodeName string) error {
}
}
}
} else {
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 2abd478

Please sign in to comment.