From 30512f909d66dff7747ca420872a68ef37910342 Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Fri, 16 Sep 2016 11:16:59 -0700 Subject: [PATCH] Improve error message when kubectl rolling-update fail due to version skew Print the real error message first, the workaround later --- pkg/registry/generic/registry/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/registry/generic/registry/store.go b/pkg/registry/generic/registry/store.go index 9fcff3254a5..289b5c0ebad 100644 --- a/pkg/registry/generic/registry/store.go +++ b/pkg/registry/generic/registry/store.go @@ -280,7 +280,7 @@ func (e *Store) Create(ctx api.Context, obj runtime.Object) (runtime.Object, err if e.QualifiedResource.Resource != "replicationcontrollers" { return nil, err } - *msg = fmt.Sprintf("Note: if you are using \"kubectl rolling-update\" and your kubectl version is older than v1.4.0, your rolling-update has probably failed, though the pods are correctly updated. Please see https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#kubectl-rolling-update for a workaround. : %s", *msg) + *msg = fmt.Sprintf("%s: if you're using \"kubectl rolling-update\" with kubectl version older than v1.4.0, your rolling update has failed, though the pods are correctly updated. Please see https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#kubectl-rolling-update for a workaround", *msg) } return nil, err }