mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 08:09:58 +00:00
add missing error handling steps
This commit is contained in:
parent
1d98b2e8b3
commit
af26d11190
@ -165,7 +165,7 @@ func (cnc *CloudNodeController) Run(stopCh <-chan struct{}) {
|
|||||||
// very infrequently. DO NOT MODIFY this to perform frequent operations.
|
// very infrequently. DO NOT MODIFY this to perform frequent operations.
|
||||||
go wait.Until(func() {
|
go wait.Until(func() {
|
||||||
if err := cnc.UpdateNodeStatus(context.TODO()); err != nil {
|
if err := cnc.UpdateNodeStatus(context.TODO()); err != nil {
|
||||||
klog.Errorf("failed to update node status")
|
klog.Errorf("failed to update node status: %v", err)
|
||||||
}
|
}
|
||||||
}, cnc.nodeStatusUpdateFrequency, stopCh)
|
}, cnc.nodeStatusUpdateFrequency, stopCh)
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ func (rc *RouteController) reconcile(ctx context.Context, nodes []*v1.Node, rout
|
|||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
klog.Infof("node %v has no routes assigned to it. NodeNetworkUnavailable will be set to true", n.Name)
|
klog.Infof("node %v has no routes assigned to it. NodeNetworkUnavailable will be set to true", n.Name)
|
||||||
if err := rc.updateNetworkingCondition(n, false); err != nil {
|
if err := rc.updateNetworkingCondition(n, false); err != nil {
|
||||||
klog.Errorf("failed to update networking condition when no nodeRoutes")
|
klog.Errorf("failed to update networking condition when no nodeRoutes: %v", err)
|
||||||
}
|
}
|
||||||
}(node)
|
}(node)
|
||||||
continue
|
continue
|
||||||
@ -285,7 +285,7 @@ func (rc *RouteController) reconcile(ctx context.Context, nodes []*v1.Node, rout
|
|||||||
go func(n *v1.Node) {
|
go func(n *v1.Node) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if err := rc.updateNetworkingCondition(n, allRoutesCreated); err != nil {
|
if err := rc.updateNetworkingCondition(n, allRoutesCreated); err != nil {
|
||||||
klog.Errorf("failed to update networking condition")
|
klog.Errorf("failed to update networking condition: %v", err)
|
||||||
}
|
}
|
||||||
}(node)
|
}(node)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user