-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop docker daemon, when running cri-o #3211
Conversation
The minikube.iso starts every runtime, by default
Might be running an alternative container runtime
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: afbjorklund If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Note that cri-o will fail to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have a couple of nits. But otherwise it looks good, and it is important - currently containerd doesn't even work as it clashes on 10010 port with cri-o.
fmt.Println("Stopping extra container runtimes...") | ||
|
||
containerRuntime := viper.GetString(containerRuntime) | ||
if config.VMDriver != "none" && containerRuntime != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we combine the `config.VMDriver != "none" ifs into one?
After stopping any runtimes that aren't being used, if we're using containerd then we need to restart it. This is because it competes with cri-o to listen on port 10010, causing a necesary plugin to not be installed. After stopping cri-o, we need to restart containerd so that the plugin is installed. I also added some preflight checks when using alternative runtimes. kubeadm checks to make sure the Docker service is running, so I disabled that. It also checks if a few ports are available; these are ports that containerd uses, so I also added them to the ignore list. This should finish the work started in kubernetes#3211, which stopped alternative runtimes but didn't restart containerd. I was able to run "minikube start" with containerd locally with this change.
After stopping any runtimes that aren't being used, if we're using containerd then we need to restart it. This is because it competes with cri-o to listen on port 10010, causing a necesary plugin to not be installed. After stopping cri-o, we need to restart containerd so that the plugin is installed. I also added some preflight checks when using alternative runtimes. kubeadm checks to make sure the Docker service is running, so I disabled that. It also checks if a few ports are available; these are ports that containerd uses, so I also added them to the ignore list. This should finish the work started in kubernetes#3211, which stopped alternative runtimes but didn't restart containerd. I was able to run "minikube start" with containerd locally with this change.
After stopping any runtimes that aren't being used, if we're using containerd then we need to restart it. This is because it competes with cri-o to listen on port 10010, causing a necesary plugin to not be installed. After stopping cri-o, we need to restart containerd so that the plugin is installed. I also added some preflight checks when using alternative runtimes. kubeadm checks to make sure the Docker service is running, so I disabled that. It also checks if a few ports are available; these are ports that containerd uses, so I also added them to the ignore list. This should finish the work started in #3211, which stopped alternative runtimes but didn't restart containerd. I was able to run "minikube start" with containerd locally with this change.
Stop the docker daemon, when running an alternative container runtime (and vice-versa)
Remove the output from docker-env, since there is nothing responding on port 2376 anyway
Cannot connect to the Docker daemon at tcp://*:2376. Is the docker daemon running?
But as long as we are using docker machine, it will always be started (by the provisioner)
Closes #3068