From aa76cc8d7baf1ec36d1d43e2a0f5f95f7261f6b1 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Sat, 29 Jul 2017 16:45:34 -0700 Subject: [PATCH] fix swallowed error in kubectl rolling_updater --- pkg/kubectl/rolling_updater.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/kubectl/rolling_updater.go b/pkg/kubectl/rolling_updater.go index 3c50e3921ed..94379cd1342 100644 --- a/pkg/kubectl/rolling_updater.go +++ b/pkg/kubectl/rolling_updater.go @@ -749,7 +749,9 @@ func AddDeploymentKeyToReplicationController(oldRc *api.ReplicationController, r // we've finished re-adopting existing pods to the rc. selector = labels.SelectorFromSet(selectorCopy) options = metav1.ListOptions{LabelSelector: selector.String()} - podList, err = podClient.Pods(namespace).List(options) + if podList, err = podClient.Pods(namespace).List(options); err != nil { + return nil, err + } for ix := range podList.Items { pod := &podList.Items[ix] if value, found := pod.Labels[deploymentKey]; !found || value != deploymentValue {