more debug stuff
parent
78a07e71bb
commit
9d64921653
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue