diff --git a/pkg/minikube/cruntime/cruntime_test.go b/pkg/minikube/cruntime/cruntime_test.go index 11acd37c1330b2c1a1ace6b5bbaa3ab04980a82b..461809e56894f7c94aa54cbeb94125cfe2180414 100644 --- a/pkg/minikube/cruntime/cruntime_test.go +++ b/pkg/minikube/cruntime/cruntime_test.go @@ -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"}}, } diff --git a/pkg/minikube/cruntime/docker.go b/pkg/minikube/cruntime/docker.go index 9513d1530de2195196a862d475574f4fdb8ae971..dddb1a0e72549f7ea6f0ecdbe2602172af2c4ff1 100644 --- a/pkg/minikube/cruntime/docker.go +++ b/pkg/minikube/cruntime/docker.go @@ -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") }