From 84300e781c61515660383582887b73b8ab7bb26e Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Tue, 31 Jul 2018 14:07:22 +0300 Subject: [PATCH] kubeadm: fix ImagePullCheck output ImagePullCheck outputs "pulling " line even if image already exists and is not pulled. Fixed the output to reflect the reality. ImagePullCheck now outputs either "pulling " or "image exists". --- cmd/kubeadm/app/preflight/checks.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/preflight/checks.go b/cmd/kubeadm/app/preflight/checks.go index 1912344fe2c..9dbafd4ae47 100644 --- a/cmd/kubeadm/app/preflight/checks.go +++ b/cmd/kubeadm/app/preflight/checks.go @@ -829,14 +829,15 @@ func (ImagePullCheck) Name() string { // Check pulls images required by kubeadm. This is a mutating check func (ipc ImagePullCheck) Check() (warnings, errors []error) { for _, image := range ipc.imageList { - glog.V(1).Infoln("pulling ", image) ret, err := ipc.runtime.ImageExists(image) if ret && err == nil { + glog.V(1).Infof("image exists: %s", image) continue } if err != nil { errors = append(errors, fmt.Errorf("failed to check if image %s exists: %v", image, err)) } + glog.V(1).Infof("pulling %s", image) if err := ipc.runtime.PullImage(image); err != nil { errors = append(errors, fmt.Errorf("failed to pull image %s: %v", image, err)) }