Skip to content

NoneDriver: Minikube start restarts containerd, hence it kills all my non k8s containers #4541

@marcosdiez

Description

@marcosdiez

I am using version minikube 1.1.1

Whenever I do a

sudo -E minikube start --vm-driver=none --extra-config kubeadm.ignore-preflight-errors=SystemVerification ${EXTRA_DNS_PARAMETER} --logtostderr

I see this:

I0620 13:33:02.265561   22899 exec_runner.go:39] Run: systemctl is-active --quiet service containerd
I0620 13:33:02.279081   22899 exec_runner.go:39] Run: sudo systemctl stop containerd
I0620 13:33:02.361533   22899 exec_runner.go:39] Run: systemctl is-active --quiet service containerd
I0620 13:33:02.381293   22899 exec_runner.go:39] Run: systemctl is-active --quiet service crio
I0620 13:33:02.396272   22899 exec_runner.go:39] Run: sudo systemctl start docker

which I traced to

https://github.com/kubernetes/minikube/blob/master/pkg/minikube/cruntime/docker.go#L78

// Enable idempotently enables Docker on a host
func (r *Docker) Enable() error {
	if err := disableOthers(r, r.Runner); err != nil {
		glog.Warningf("disableOthers: %v", err)
	}
	return r.Runner.Run("sudo systemctl start docker")
}

disableOthers is here by the way: https://github.com/kubernetes/minikube/blob/master/pkg/minikube/cruntime/cruntime.go#L96

What's the rationale for that ?
Why does minikube bother messing with my container daemons in first place ?

Should we just remove disableOthers ? Should we remove it only for the none driver ?
Should we just not restart containerd if docker is > SOME_VERSION ?

Should we just not restart containerd because today everybody uses it, hence it shouldn't just be restarted ?

All the solutions are trivial to implement. Hence I am opening the discussion so I can create the right PR :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions