diff --git a/pkg/controller/subnet.go b/pkg/controller/subnet.go index 999fae60d31..a805f99eb4e 100644 --- a/pkg/controller/subnet.go +++ b/pkg/controller/subnet.go @@ -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)