Merge pull request #7786 from afbjorklund/service-enable
Enable docker and kubelet units after adding thempull/7793/head
commit
31f7f0f679
|
@ -786,6 +786,9 @@ func startKubeletIfRequired(runner command.Runner, sm sysinit.Manager) error {
|
|||
return errors.Wrap(err, "starting kubelet")
|
||||
}
|
||||
|
||||
if err := sm.Enable("kubelet"); err != nil {
|
||||
return err
|
||||
}
|
||||
return sm.Start("kubelet")
|
||||
}
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ func updateUnit(p provision.SSHCommander, name string, content string, dst strin
|
|||
if _, err := p.SSHCommand(fmt.Sprintf("sudo mkdir -p %s && printf %%s \"%s\" | sudo tee %s.new", path.Dir(dst), content, dst)); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := p.SSHCommand(fmt.Sprintf("sudo diff -u %s %s.new || { sudo mv %s.new %s; sudo systemctl -f daemon-reload && sudo sudo systemctl -f restart %s; }", dst, dst, dst, dst, name)); err != nil {
|
||||
if _, err := p.SSHCommand(fmt.Sprintf("sudo diff -u %s %s.new || { sudo mv %s.new %s; sudo systemctl -f daemon-reload && sudo systemctl -f enable %s && sudo systemctl -f restart %s; }", dst, dst, dst, dst, name, name)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue