From 37f37fd504a8a2d02370e5f6e03c9589d3410031 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 13 Oct 2020 15:45:46 -0700 Subject: [PATCH 1/8] resolve conflict --- .../bootstrapper/bsutil/kverify/kubelet.go | 60 +++++++++++++++++++ .../bootstrapper/bsutil/kverify/kverify.go | 8 ++- .../bsutil/kverify/system_pods.go | 18 +++--- pkg/minikube/bootstrapper/kubeadm/kubeadm.go | 23 ++++++- pkg/minikube/node/start.go | 2 +- site/content/en/docs/commands/start.md | 2 +- 6 files changed, 96 insertions(+), 17 deletions(-) create mode 100644 pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go new file mode 100644 index 000000000000..e3c5b2f8ae0e --- /dev/null +++ b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go @@ -0,0 +1,60 @@ +/* +Copyright 2020 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package kverify verifies a running Kubernetes cluster is healthy +package kverify + +import ( + "fmt" + "time" + + "github.com/docker/machine/libmachine/state" + "k8s.io/klog/v2" + "k8s.io/minikube/pkg/minikube/command" + "k8s.io/minikube/pkg/minikube/sysinit" + "k8s.io/minikube/pkg/util/retry" +) + +// KubeletStatus checks the kubelet status +func KubeletStatus(cr command.Runner) state.State { + klog.Infof("Checking kubelet status ...") + active := sysinit.New(cr).Active("kubelet") + if active { + return state.Running + } + return state.Stopped +} + +// WaitForKubelet will wait for Kubelet service to be running ... +func WaitForKubelet(cr command.Runner, timeout time.Duration) error { + pStart := time.Now() + klog.Infof("waiting for kubelet to be running ....") + kr := func() error { + if st := KubeletStatus(cr); st != state.Running { + return fmt.Errorf("status %s", st) + } + return nil + } + + if err := retry.Local(kr, timeout); err != nil { + return fmt.Errorf("not running: %s", err) + } + + klog.Infof("duration metric: took %s WaitForKubelet to finish.", time.Since(pStart)) + + return nil + +} diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/kverify.go b/pkg/minikube/bootstrapper/bsutil/kverify/kverify.go index 1cac68a2cf2d..76a976e36ad3 100644 --- a/pkg/minikube/bootstrapper/bsutil/kverify/kverify.go +++ b/pkg/minikube/bootstrapper/bsutil/kverify/kverify.go @@ -35,6 +35,8 @@ const ( AppsRunningKey = "apps_running" // NodeReadyKey is the name used in the flags for waiting for the node status to be ready NodeReadyKey = "node_ready" + // NodeReadyKey is the name used in the flags for waiting for the node status to be ready + KubeletKey = "kubelet" ) // vars related to the --wait flag @@ -42,13 +44,13 @@ var ( // DefaultComponents is map of the the default components to wait for DefaultComponents = map[string]bool{APIServerWaitKey: true, SystemPodsWaitKey: true} // NoWaitComponents is map of componets to wait for if specified 'none' or 'false' - NoComponents = map[string]bool{APIServerWaitKey: false, SystemPodsWaitKey: false, DefaultSAWaitKey: false, AppsRunningKey: false, NodeReadyKey: false} + NoComponents = map[string]bool{APIServerWaitKey: false, SystemPodsWaitKey: false, DefaultSAWaitKey: false, AppsRunningKey: false, NodeReadyKey: false, KubeletKey: false} // AllComponents is map for waiting for all components. - AllComponents = map[string]bool{APIServerWaitKey: true, SystemPodsWaitKey: true, DefaultSAWaitKey: true, AppsRunningKey: true} + AllComponents = map[string]bool{APIServerWaitKey: true, SystemPodsWaitKey: true, DefaultSAWaitKey: true, AppsRunningKey: true, KubeletKey: true} // DefaultWaitList is list of all default components to wait for. only names to be used for start flags. DefaultWaitList = []string{APIServerWaitKey, SystemPodsWaitKey} // AllComponentsList list of all valid components keys to wait for. only names to be used used for start flags. - AllComponentsList = []string{APIServerWaitKey, SystemPodsWaitKey, DefaultSAWaitKey, AppsRunningKey, NodeReadyKey} + AllComponentsList = []string{APIServerWaitKey, SystemPodsWaitKey, DefaultSAWaitKey, AppsRunningKey, NodeReadyKey, KubeletKey} // AppsRunningList running list are valid k8s-app components to wait for them to be running AppsRunningList = []string{ "kube-dns", // coredns diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/system_pods.go b/pkg/minikube/bootstrapper/bsutil/kverify/system_pods.go index a331f35c18a2..094fd39536f1 100644 --- a/pkg/minikube/bootstrapper/bsutil/kverify/system_pods.go +++ b/pkg/minikube/bootstrapper/bsutil/kverify/system_pods.go @@ -22,7 +22,14 @@ import ( "strings" "time" +<<<<<<< HEAD "github.com/docker/machine/libmachine/state" +||||||| parent of a1b34164f (ensure kubelet is running and wait for it) + "github.com/docker/machine/libmachine/state" + "github.com/golang/glog" +======= + "github.com/golang/glog" +>>>>>>> a1b34164f (ensure kubelet is running and wait for it) "github.com/pkg/errors" core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -34,7 +41,6 @@ import ( "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/cruntime" "k8s.io/minikube/pkg/minikube/logs" - "k8s.io/minikube/pkg/minikube/sysinit" "k8s.io/minikube/pkg/util/retry" ) @@ -156,12 +162,4 @@ func announceProblems(r cruntime.Manager, bs bootstrapper.Bootstrapper, cfg conf } } -// KubeletStatus checks the kubelet status -func KubeletStatus(cr command.Runner) state.State { - klog.Infof("Checking kubelet status ...") - active := sysinit.New(cr).Active("kubelet") - if active { - return state.Running - } - return state.Stopped -} + diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 72756f1d5419..594666d00d5a 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -392,10 +392,13 @@ func (k *Bootstrapper) client(ip string, port int) (*kubernetes.Clientset, error // WaitForNode blocks until the node appears to be healthy func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, timeout time.Duration) error { start := time.Now() - register.Reg.SetStep(register.VerifyingKubernetes) out.T(style.HealthCheck, "Verifying Kubernetes components...") - + // regardless if waiting or not, we make sure it is not stopped + // to solve corner cases when a container is hibernated and once coming back kubelet not running. + if err := k.ensureKubeletStarted(); err != nil { + klog.Warningf("Couldn't ensure kubelet is started this might cause issues: %v", err) + } // TODO: #7706: for better performance we could use k.client inside minikube to avoid asking for external IP:PORT cp, err := config.PrimaryControlPlane(&cfg) if err != nil { @@ -455,6 +458,12 @@ func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, time } } } + if cfg.VerifyComponents[kverify.KubeletKey] { + if err := kverify.WaitForKubelet(k.c, timeout); err != nil { + return errors.Wrap(err, "waiting for kubelet") + } + + } if cfg.VerifyComponents[kverify.NodeReadyKey] { if err := kverify.WaitForNodeReady(client, timeout); err != nil { @@ -471,6 +480,16 @@ func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, time return nil } +// ensureKubeletStarted will start kubelet if whatever reason it is stopped. +func (k *Bootstrapper) ensureKubeletStarted() error { + fmt.Println("inside ensureKubeletStarted") + if kverify.KubeletStatus(k.c) != state.Running { + fmt.Println("kubelet was not running for some reason , starting it...") + return sysinit.New(k.c).Start("kubelet") + } + return nil +} + // needsReconfigure returns whether or not the cluster needs to be reconfigured func (k *Bootstrapper) needsReconfigure(conf string, hostname string, port int, client *kubernetes.Clientset, version string) bool { if rr, err := k.c.RunCmd(exec.Command("sudo", "diff", "-u", conf, conf+".new")); err != nil { diff --git a/pkg/minikube/node/start.go b/pkg/minikube/node/start.go index b2753f9cf9aa..6df0b0588fcc 100644 --- a/pkg/minikube/node/start.go +++ b/pkg/minikube/node/start.go @@ -196,7 +196,7 @@ func Start(starter Starter, apiServer bool) (*kubeconfig.Settings, error) { } } - klog.Infof("Will wait %s for node ...", waitTimeout) + klog.Infof("Will wait %s for node up to ", viper.GetDuration(waitTimeout)) if err := bs.WaitForNode(*starter.Cfg, *starter.Node, viper.GetDuration(waitTimeout)); err != nil { return nil, errors.Wrapf(err, "wait %s for node", viper.GetDuration(waitTimeout)) } diff --git a/site/content/en/docs/commands/start.md b/site/content/en/docs/commands/start.md index ec69092d85fd..43c6c5108135 100644 --- a/site/content/en/docs/commands/start.md +++ b/site/content/en/docs/commands/start.md @@ -90,7 +90,7 @@ minikube start [flags] --uuid string Provide VM UUID to restore MAC address (hyperkit driver only) --vm Filter to use only VM Drivers --vm-driver driver DEPRECATED, use driver instead. - --wait strings comma separated list of Kubernetes components to verify and wait for after starting a cluster. defaults to "apiserver,system_pods", available options: "apiserver,system_pods,default_sa,apps_running,node_ready" . other acceptable values are 'all' or 'none', 'true' and 'false' (default [apiserver,system_pods]) + --wait strings comma separated list of Kubernetes components to verify and wait for after starting a cluster. defaults to "apiserver,system_pods", available options: "apiserver,system_pods,default_sa,apps_running,node_ready,kubelet" . other acceptable values are 'all' or 'none', 'true' and 'false' (default [apiserver,system_pods]) --wait-timeout duration max time to wait per Kubernetes or host to be healthy. (default 6m0s) ``` From ad83c7226f114eccdc2b1982f21ca14225315274 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Mon, 12 Oct 2020 20:24:50 -0700 Subject: [PATCH 2/8] better log --- pkg/minikube/bootstrapper/kubeadm/kubeadm.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 594666d00d5a..782cd0d6a332 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -482,9 +482,8 @@ func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, time // ensureKubeletStarted will start kubelet if whatever reason it is stopped. func (k *Bootstrapper) ensureKubeletStarted() error { - fmt.Println("inside ensureKubeletStarted") - if kverify.KubeletStatus(k.c) != state.Running { - fmt.Println("kubelet was not running for some reason , starting it...") + if st := kverify.KubeletStatus(k.c); st != state.Running { + glog.Warningf("surprisingly kubelet service status was %s!. will try start it... this a known issue https://github.com/kubernetes/minikube/issues/9458", st) return sysinit.New(k.c).Start("kubelet") } return nil From 63c4468fd564f7c13f83844b747043c20b3d7405 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 13 Oct 2020 16:01:59 -0700 Subject: [PATCH 3/8] address review comments --- cmd/minikube/cmd/status.go | 3 +-- pkg/drivers/none/none.go | 2 +- .../bootstrapper/bsutil/kverify/kubelet.go | 11 ++++++----- pkg/minikube/bootstrapper/kubeadm/kubeadm.go | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/minikube/cmd/status.go b/cmd/minikube/cmd/status.go index 3ebd1c4221d3..468973a379b6 100644 --- a/cmd/minikube/cmd/status.go +++ b/cmd/minikube/cmd/status.go @@ -345,8 +345,7 @@ func nodeStatus(api libmachine.API, cc config.ClusterConfig, n config.Node) (*St st.Host = codeNames[InsufficientStorage] } - stk := kverify.KubeletStatus(cr) - klog.Infof("%s kubelet status = %s", name, stk) + stk := kverify.ServiceStatus(cr, "kubelet") st.Kubelet = stk.String() // Early exit for worker nodes diff --git a/pkg/drivers/none/none.go b/pkg/drivers/none/none.go index c7164f257980..6ad1dcca48e9 100644 --- a/pkg/drivers/none/none.go +++ b/pkg/drivers/none/none.go @@ -142,7 +142,7 @@ func (d *Driver) GetState() (state.State, error) { return state.Running, nil } - return kverify.KubeletStatus(d.exec), nil + return kverify.ServiceStatus(d.exec, "kubelet"), nil } // Kill stops a host forcefully, including any containers that we are managing. diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go index e3c5b2f8ae0e..ada218d7d7e7 100644 --- a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go +++ b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go @@ -28,13 +28,14 @@ import ( "k8s.io/minikube/pkg/util/retry" ) -// KubeletStatus checks the kubelet status -func KubeletStatus(cr command.Runner) state.State { - klog.Infof("Checking kubelet status ...") - active := sysinit.New(cr).Active("kubelet") +// ServiceStatus checks the kubelet status +func ServiceStatus(cr command.Runner, svc string) state.State { + active := sysinit.New(cr).Active(svc) if active { + klog.Infof("%s status = running", svc) return state.Running } + klog.Infof("%s status = not running", svc) return state.Stopped } @@ -43,7 +44,7 @@ func WaitForKubelet(cr command.Runner, timeout time.Duration) error { pStart := time.Now() klog.Infof("waiting for kubelet to be running ....") kr := func() error { - if st := KubeletStatus(cr); st != state.Running { + if st := ServiceStatus(cr); st != state.Running { return fmt.Errorf("status %s", st) } return nil diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 782cd0d6a332..3f9e9b30f801 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -394,9 +394,9 @@ func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, time start := time.Now() register.Reg.SetStep(register.VerifyingKubernetes) out.T(style.HealthCheck, "Verifying Kubernetes components...") - // regardless if waiting or not, we make sure it is not stopped + // regardless if waiting is set or not, we will make sure kubelet is not stopped // to solve corner cases when a container is hibernated and once coming back kubelet not running. - if err := k.ensureKubeletStarted(); err != nil { + if err := k.ensureServiceStarted("kubelet"); err != nil { klog.Warningf("Couldn't ensure kubelet is started this might cause issues: %v", err) } // TODO: #7706: for better performance we could use k.client inside minikube to avoid asking for external IP:PORT @@ -480,11 +480,11 @@ func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, time return nil } -// ensureKubeletStarted will start kubelet if whatever reason it is stopped. -func (k *Bootstrapper) ensureKubeletStarted() error { - if st := kverify.KubeletStatus(k.c); st != state.Running { - glog.Warningf("surprisingly kubelet service status was %s!. will try start it... this a known issue https://github.com/kubernetes/minikube/issues/9458", st) - return sysinit.New(k.c).Start("kubelet") +// ensureKubeletStarted will start a systemd or init.d service if it is not running. +func (k *Bootstrapper) ensureServiceStarted(svc string) error { + if st := kverify.ServiceStatus(k.c, svc); st != state.Running { + klog.Warningf("surprisingly %q service status was %s!. will try start it, could be related to this issue https://github.com/kubernetes/minikube/issues/9458", svc, st) + return sysinit.New(k.c).Start(svc) } return nil } From 7b9fbd88d388e6323086d8be5b8415e255e53441 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 13 Oct 2020 16:03:53 -0700 Subject: [PATCH 4/8] fix comment --- pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go index ada218d7d7e7..ef2323bac51f 100644 --- a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go +++ b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go @@ -28,7 +28,7 @@ import ( "k8s.io/minikube/pkg/util/retry" ) -// ServiceStatus checks the kubelet status +// ServiceStatus checks the status of a systemd or init.d service func ServiceStatus(cr command.Runner, svc string) state.State { active := sysinit.New(cr).Active(svc) if active { From f3a1dec0f226a6e7d88eb8149b3573f69d7348e6 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 13 Oct 2020 16:08:40 -0700 Subject: [PATCH 5/8] merge conf --- pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go | 10 ++++------ .../bootstrapper/bsutil/kverify/system_pods.go | 10 ---------- pkg/minikube/bootstrapper/kubeadm/kubeadm.go | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go index ef2323bac51f..6cf6c96b7039 100644 --- a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go +++ b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go @@ -32,19 +32,17 @@ import ( func ServiceStatus(cr command.Runner, svc string) state.State { active := sysinit.New(cr).Active(svc) if active { - klog.Infof("%s status = running", svc) return state.Running } - klog.Infof("%s status = not running", svc) return state.Stopped } -// WaitForKubelet will wait for Kubelet service to be running ... -func WaitForKubelet(cr command.Runner, timeout time.Duration) error { +// WaitForService will wait for a systemd or init.d service to be running on the node... +func WaitForService(cr command.Runner, svc string, timeout time.Duration) error { pStart := time.Now() klog.Infof("waiting for kubelet to be running ....") kr := func() error { - if st := ServiceStatus(cr); st != state.Running { + if st := ServiceStatus(cr, svc); st != state.Running { return fmt.Errorf("status %s", st) } return nil @@ -54,7 +52,7 @@ func WaitForKubelet(cr command.Runner, timeout time.Duration) error { return fmt.Errorf("not running: %s", err) } - klog.Infof("duration metric: took %s WaitForKubelet to finish.", time.Since(pStart)) + klog.Infof("duration metric: took %s WaitForService to finish.", time.Since(pStart)) return nil diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/system_pods.go b/pkg/minikube/bootstrapper/bsutil/kverify/system_pods.go index 094fd39536f1..740586b80308 100644 --- a/pkg/minikube/bootstrapper/bsutil/kverify/system_pods.go +++ b/pkg/minikube/bootstrapper/bsutil/kverify/system_pods.go @@ -22,14 +22,6 @@ import ( "strings" "time" -<<<<<<< HEAD - "github.com/docker/machine/libmachine/state" -||||||| parent of a1b34164f (ensure kubelet is running and wait for it) - "github.com/docker/machine/libmachine/state" - "github.com/golang/glog" -======= - "github.com/golang/glog" ->>>>>>> a1b34164f (ensure kubelet is running and wait for it) "github.com/pkg/errors" core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -161,5 +153,3 @@ func announceProblems(r cruntime.Manager, bs bootstrapper.Bootstrapper, cfg conf time.Sleep(kconst.APICallRetryInterval * 15) } } - - diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 3f9e9b30f801..10dafae76dd5 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -459,7 +459,7 @@ func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, time } } if cfg.VerifyComponents[kverify.KubeletKey] { - if err := kverify.WaitForKubelet(k.c, timeout); err != nil { + if err := kverify.WaitForService(k.c, "kubelet", timeout); err != nil { return errors.Wrap(err, "waiting for kubelet") } From 566679e2f29d97b8916c60f2817da9ea640e72b6 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 13 Oct 2020 16:11:11 -0700 Subject: [PATCH 6/8] lint --- pkg/minikube/bootstrapper/kubeadm/kubeadm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 10dafae76dd5..9bc36222c84d 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -483,7 +483,7 @@ func (k *Bootstrapper) WaitForNode(cfg config.ClusterConfig, n config.Node, time // ensureKubeletStarted will start a systemd or init.d service if it is not running. func (k *Bootstrapper) ensureServiceStarted(svc string) error { if st := kverify.ServiceStatus(k.c, svc); st != state.Running { - klog.Warningf("surprisingly %q service status was %s!. will try start it, could be related to this issue https://github.com/kubernetes/minikube/issues/9458", svc, st) + klog.Warningf("surprisingly %q service status was %s!. will try to start it, could be related to this issue https://github.com/kubernetes/minikube/issues/9458", svc, st) return sysinit.New(k.c).Start(svc) } return nil From cba6bb6f535b813c2127524f06f7a664e9bbfd02 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 13 Oct 2020 16:19:13 -0700 Subject: [PATCH 7/8] improve comments --- pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go index 6cf6c96b7039..352ee7cf9c3e 100644 --- a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go +++ b/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go @@ -37,10 +37,11 @@ func ServiceStatus(cr command.Runner, svc string) state.State { return state.Stopped } -// WaitForService will wait for a systemd or init.d service to be running on the node... +// WaitForService will wait for a "systemd" or "init.d" service to be running on the node... +// not to be confused with Kubernetes Services func WaitForService(cr command.Runner, svc string, timeout time.Duration) error { pStart := time.Now() - klog.Infof("waiting for kubelet to be running ....") + klog.Infof("waiting for %s service to be running ....", svc) kr := func() error { if st := ServiceStatus(cr, svc); st != state.Running { return fmt.Errorf("status %s", st) @@ -52,7 +53,7 @@ func WaitForService(cr command.Runner, svc string, timeout time.Duration) error return fmt.Errorf("not running: %s", err) } - klog.Infof("duration metric: took %s WaitForService to finish.", time.Since(pStart)) + klog.Infof("duration metric: took %s WaitForService to wait for %s.", time.Since(pStart), svc) return nil From 359cc82793c9c51f86d3c5c0d05f15291ab49202 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 14 Oct 2020 15:44:18 -0700 Subject: [PATCH 8/8] change file name --- .../bootstrapper/bsutil/kverify/{kubelet.go => system_svc.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pkg/minikube/bootstrapper/bsutil/kverify/{kubelet.go => system_svc.go} (100%) diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go b/pkg/minikube/bootstrapper/bsutil/kverify/system_svc.go similarity index 100% rename from pkg/minikube/bootstrapper/bsutil/kverify/kubelet.go rename to pkg/minikube/bootstrapper/bsutil/kverify/system_svc.go