Log systemctl output from status/start kubelet

Follow on to #2716
This commit is contained in:
Justin Santa Barbara 2017-06-15 23:18:34 -04:00
parent b14231d3f5
commit 5862c60e84
1 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,7 @@ func enableKubelet() error {
glog.V(2).Infof("ensuring that kubelet systemd service is running")
cmd := exec.Command("systemctl", "status", "--no-block", "kubelet")
output, err := cmd.CombinedOutput()
glog.V(2).Infof("'systemctl status kubelet' output:\n%s", string(output))
if err == nil {
glog.V(2).Infof("kubelet systemd service already running")
return nil
@ -167,5 +168,6 @@ func enableKubelet() error {
if err != nil {
return fmt.Errorf("error starting kubelet: %v\nOutput: %s", err, output)
}
glog.V(2).Infof("'systemctl start kubelet' output:\n%s", string(output))
return nil
}