Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #110469: add missing error handling steps #110607

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -160,7 +160,12 @@ func (cnc *CloudNodeController) Run(stopCh <-chan struct{}) {
// The periodic loop for updateNodeStatus communicates with the APIServer with a worst case complexity
// of O(num_nodes) per cycle. These functions are justified here because these events fire
// very infrequently. DO NOT MODIFY this to perform frequent operations.
go wait.Until(func() { cnc.UpdateNodeStatus(context.TODO()) }, cnc.nodeStatusUpdateFrequency, stopCh)
go wait.Until(func() {
if err := cnc.UpdateNodeStatus(context.TODO()); err != nil {
klog.Errorf("failed to update node status: %v", err)
}
}, cnc.nodeStatusUpdateFrequency, stopCh)

go wait.Until(cnc.runWorker, time.Second, stopCh)

<-stopCh
Expand Down
Expand Up @@ -267,7 +267,9 @@ func (rc *RouteController) reconcile(nodes []*v1.Node, routes []*cloudprovider.R
go func(n *v1.Node) {
defer wg.Done()
klog.Infof("node %v has no routes assigned to it. NodeNetworkUnavailable will be set to true", n.Name)
rc.updateNetworkingCondition(n, false)
if err := rc.updateNetworkingCondition(n, false); err != nil {
klog.Errorf("failed to update networking condition when no nodeRoutes: %v", err)
}
}(node)
continue
}
Expand All @@ -281,7 +283,9 @@ func (rc *RouteController) reconcile(nodes []*v1.Node, routes []*cloudprovider.R
}
go func(n *v1.Node) {
defer wg.Done()
rc.updateNetworkingCondition(n, allRoutesCreated)
if err := rc.updateNetworkingCondition(n, allRoutesCreated); err != nil {
klog.Errorf("failed to update networking condition: %v", err)
}
}(node)
}
wg.Wait()
Expand Down