Skip to content

Commit

Permalink
fix: gateway route should stay still when node is pingable (#2015)
Browse files Browse the repository at this point in the history
  • Loading branch information
lut777 authored Nov 4, 2022
1 parent 898247c commit b714e05
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions pkg/controller/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,16 +688,13 @@ func (c *Controller) checkGatewayReady() error {
pinger.Interval = 1 * time.Second

success := false

pinger.OnRecv = func(p *goping.Packet) {
success = true
pinger.Stop()
}
pinger.Run()

if !nodeReady(node) {
success = false
}

if !success {
klog.Warningf("failed to ping ovn0 %s or node %v is not ready", ip, node.Name)
if exist {
Expand Down
1 change: 0 additions & 1 deletion pkg/controller/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,6 @@ func (c *Controller) reconcileGateway(subnet *kubeovnv1.Subnet) error {
if newActivateNode == "" {
klog.Warningf("all subnet %s gws are not ready", subnet.Name)
subnet.Status.ActivateGateway = newActivateNode
subnet.Status.NotReady("NoReadyGateway", "")
bytes, err := subnet.Status.Bytes()
if err != nil {
return err
Expand Down

0 comments on commit b714e05

Please sign in to comment.