diff --git a/pkg/daemon/ovs.go b/pkg/daemon/ovs.go index 43e521df6622..e6d62d803da3 100644 --- a/pkg/daemon/ovs.go +++ b/pkg/daemon/ovs.go @@ -32,6 +32,11 @@ func pingGateway(gw, src string, verbose bool, maxRetry int) error { } pinger.Run() + if pinger.PacketsRecv == 0 { + klog.Warningf("%s network not ready after %d ping, gw %s", src, pinger.PacketsSent, gw) + return pinger.PacketsSent, fmt.Errorf("no packets received from gateway %s", gw) + } + cniConnectivityResult.WithLabelValues(nodeName).Add(float64(pinger.PacketsSent)) if !success { return fmt.Errorf("%s network not ready after %d ping %s", src, maxRetry, gw)