Skip to content

Commit

Permalink
Make L4 NetLB Cpntroller Healthcheck return error
Browse files Browse the repository at this point in the history
  • Loading branch information
cezarygerard committed Mar 22, 2022
1 parent cc29101 commit 10f1b53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/l4lb/l4netlbcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ func (lc *L4NetLBController) checkHealth() error {
// This indicates that the controller was stuck handling a previous update, or sync function did not get invoked.
syncTimeLatest := lastEnqueueTime.Add(enqueueToSyncDelayThreshold)
if lastSyncTime.After(syncTimeLatest) {
msg := fmt.Sprintf("L4 External LoadBalancer Sync happened at time %v - %v after enqueue time, threshold is %v", lastSyncTime, lastSyncTime.Sub(lastEnqueueTime), enqueueToSyncDelayThreshold)
klog.Error(msg)
return fmt.Errorf("L4 External LoadBalancer Sync happened at time %v - %v after enqueue time, threshold is %v", lastSyncTime, lastSyncTime.Sub(lastEnqueueTime), enqueueToSyncDelayThreshold)
}
return nil
}
Expand Down

0 comments on commit 10f1b53

Please sign in to comment.