From 9d64921653c9444974c4600b747135c6e09433d8 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Fri, 11 Jun 2021 16:09:57 -0700 Subject: [PATCH] more debug stuff --- pkg/minikube/cluster/pause.go | 2 +- pkg/minikube/sysinit/systemd.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/cluster/pause.go b/pkg/minikube/cluster/pause.go index c675260986..799e9fa99f 100644 --- a/pkg/minikube/cluster/pause.go +++ b/pkg/minikube/cluster/pause.go @@ -47,7 +47,7 @@ func pause(cr cruntime.Manager, r command.Runner, namespaces []string) ([]string // Disable the kubelet so it does not attempt to restart paused pods sm := sysinit.New(r) - klog.Info("kubelet running: %v", sm.Active("kubelet")) + klog.Info("kubelet running: ", sm.Active("kubelet")) if err := sm.DisableNow("kubelet"); err != nil { return ids, errors.Wrap(err, "kubelet disable --now") diff --git a/pkg/minikube/sysinit/systemd.go b/pkg/minikube/sysinit/systemd.go index 51985d5571..e358edff8f 100644 --- a/pkg/minikube/sysinit/systemd.go +++ b/pkg/minikube/sysinit/systemd.go @@ -42,6 +42,8 @@ func (s *Systemd) daemonReload() error { // Active checks if a service is running func (s *Systemd) Active(svc string) bool { + _, _ = s.r.RunCmd(exec.Command("sudo", "systemctl", "is-enabled", svc)) + _, _ = s.r.RunCmd(exec.Command("sudo", "systemctl", "status", svc)) _, err := s.r.RunCmd(exec.Command("sudo", "systemctl", "is-active", "--quiet", "service", svc)) return err == nil }