Restart docker if we've changed the daemon config

pull/7815/head
Priya Wadhwa 2020-04-24 14:05:35 -07:00
parent 29dc41e5ab
commit 1825546757
1 changed files with 2 additions and 0 deletions

View File

@ -114,6 +114,7 @@ func (r *Docker) Enable(disOthers, forceSystemd bool) error {
if err := r.forceSystemd(); err != nil {
return err
}
return r.Init.Restart("docker")
}
return r.Init.Start("docker")
@ -282,6 +283,7 @@ func (r *Docker) SystemLogCmd(len int) string {
// ForceSystemd forces the docker daemon to use systemd as cgroup manager
func (r *Docker) forceSystemd() error {
glog.Infof("Forcing docker to use systemd as cgroup manager...")
daemonConfig := `{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",