未验证 提交 3f4ff5b0 编写于 作者: M Medya Ghazizadeh 提交者: GitHub

Merge pull request #10374 from medyagh/docker_running_containerd

disable dockerd for container runtime
......@@ -557,7 +557,7 @@ func TestDisable(t *testing.T) {
runtime string
want []string
}{
{"docker", []string{"sudo", "systemctl", "stop", "-f", "docker"}},
{"docker", []string{"sudo", "systemctl", "stop", "-f", "docker.socket", "sudo", "systemctl", "stop", "-f", "docker"}},
{"crio", []string{"sudo", "systemctl", "stop", "-f", "crio"}},
{"containerd", []string{"sudo", "systemctl", "stop", "-f", "containerd"}},
}
......
......@@ -137,6 +137,10 @@ func (r *Docker) Restart() error {
// Disable idempotently disables Docker on a host
func (r *Docker) Disable() error {
// because #10373
if err := r.Init.ForceStop("docker.socket"); err != nil {
klog.ErrorS(err, "Failed to stop", "service", "docker.socket")
}
return r.Init.ForceStop("docker")
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册