From c02db0562da1050e330df09a012ca1aba2230024 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 11 Oct 2016 15:33:11 -0700 Subject: [PATCH] cluster: better upgrade logging --- pkg/cluster/upgrade.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/upgrade.go b/pkg/cluster/upgrade.go index 00c91d2..f550f33 100644 --- a/pkg/cluster/upgrade.go +++ b/pkg/cluster/upgrade.go @@ -9,16 +9,17 @@ import ( ) func (c *Cluster) upgradeOneMember(m *etcdutil.Member) error { - logrus.Infof("upgrading an member: %v", m.Name) pod, err := c.kclient.Pods(c.namespace).Get(m.Name) if err != nil { return fmt.Errorf("fail to get pod (%s): %v", m.Name, err) } + logrus.Infof("upgrading the etcd member %v from %s to %s", m.Name, k8sutil.GetEtcdVersion(pod), c.spec.Version) pod.Spec.Containers[0].Image = k8sutil.MakeEtcdImage(c.spec.Version) k8sutil.SetEtcdVersion(pod, c.spec.Version) _, err = c.kclient.Pods(c.namespace).Update(pod) if err != nil { - return fmt.Errorf("fail to update pod (%s): %v", m.Name, err) + return fmt.Errorf("fail to update the etcd member (%s): %v", m.Name, err) } + logrus.Infof("finished upgrading the etcd member %v", m.Name) return nil }