Skip to content

Commit

Permalink
add gateway check after update subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Jan 19, 2022
1 parent 0670995 commit fdcc833
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ func (c *Controller) reconcileGateway(subnet *kubeovnv1.Subnet) error {
}

// check if activateGateway still ready
if subnet.Status.ActivateGateway != "" {
if subnet.Status.ActivateGateway != "" && util.GatewayContains(subnet.Spec.GatewayNode, subnet.Status.ActivateGateway) {
node, err := c.nodesLister.Get(subnet.Status.ActivateGateway)
if err == nil && nodeReady(node) {
klog.Infof("subnet %s uses the old activate gw %s", subnet.Name, node.Name)
Expand Down

0 comments on commit fdcc833

Please sign in to comment.