Skip to content

Commit

Permalink
update centralize subnet gatewayNode until gw is ready (#1814)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Aug 16, 2022
1 parent 7103aae commit a6403f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/controller/subnet.go
Expand Up @@ -976,8 +976,10 @@ func (c *Controller) reconcileGateway(subnet *kubeovnv1.Subnet) error {
if err != nil {
return err
}
_, err = c.config.KubeOvnClient.KubeovnV1().Subnets().Patch(context.Background(), subnet.Name, types.MergePatchType, bytes, metav1.PatchOptions{}, "status")
return err
if _, err = c.config.KubeOvnClient.KubeovnV1().Subnets().Patch(context.Background(), subnet.Name, types.MergePatchType, bytes, metav1.PatchOptions{}, "status"); err != nil {
klog.Errorf("failed to patch subnet %s NoReadyGateway status: %v", subnet.Name, err)
}
return fmt.Errorf("all subnet %s gws are not ready", subnet.Name)
}

nextHop := getNextHopByTunnelIP(nodeTunlIPAddr)
Expand Down

0 comments on commit a6403f0

Please sign in to comment.