Skip to content

Commit

Permalink
fix(linux_networking.go): add better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
aauren committed Oct 7, 2023
1 parent 7ce09a6 commit 9f23cf5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/controllers/proxy/linux_networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ func (ln *linuxNetworking) ipvsAddFWMarkService(svcs []*ipvs.Service, fwMark uin

err := ln.ipvsUpdateService(svc)
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to update persistence flags for service %s due to %v",
ipvsServiceString(svc), err)
}
klog.V(2).Infof("Updated persistence/session-affinity for service: %s",
ipvsServiceString(svc))
Expand All @@ -323,7 +324,8 @@ func (ln *linuxNetworking) ipvsAddFWMarkService(svcs []*ipvs.Service, fwMark uin

err := ln.ipvsUpdateService(svc)
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to update scheduler flags for service %s due to %v",
ipvsServiceString(svc), err)
}
klog.V(2).Infof("Updated scheduler flags for service: %s", ipvsServiceString(svc))
}
Expand All @@ -332,7 +334,8 @@ func (ln *linuxNetworking) ipvsAddFWMarkService(svcs []*ipvs.Service, fwMark uin
svc.SchedName = scheduler
err := ln.ipvsUpdateService(svc)
if err != nil {
return nil, fmt.Errorf("failed to update the scheduler for the service due to %v", err)
return nil, fmt.Errorf("failed to update the scheduler for the service %s due to %v",
ipvsServiceString(svc), err)
}
klog.V(2).Infof("Updated schedule for the service: %s", ipvsServiceString(svc))
}
Expand Down

0 comments on commit 9f23cf5

Please sign in to comment.