-
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
minikube ssh driver fails with "Failed to restart cri-docker.socket.service: Unit cri-docker.socket.service not found." #18559
Comments
Eh, I just realized this is very similar to this issue: #15413 |
Hi, @spowelljr thank you for your response. The PR you linked seems to address different issue. Problem here is that minikube thinks the target is running openrc and not systemd, so it invokes 'service restart this-n-that' instead of 'systemctl restart this-n-that'. Or am I wrong? |
You seem to be missing some unit files from the cri-dockerd installation, the upstream files are here: https://github.com/Mirantis/cri-dockerd/tree/master/packaging/systemd But minikube seems to still be calling |
The check for systemd is quite simple, it just runs func usesSystemd(r Runner) bool {
_, err := r.RunCmd(exec.Command("systemctl", "--version"))
return err == nil
} The debug log should have the full output, on why that command is failing. |
Yes, the check is simple, and it seems it passes on my setup - I see the command being run, but I don't see any errors to it. Here is the log file from the 'whole run', but from the output of minikube command, with
|
I seem to be wrong about the logging part. Might have to run |
Re: incomplete cri-docker installation, I installed the latest .deb from https://github.com/Mirantis/cri-dockerd/releases Instalation did install those two service files:
|
|
It is theoretically possible to always run the service, but it seemed like a good idea to have it socket-activated. |
I think it is the same bug as in the other issue, with ssh being called before IP is known: The generic/ssh driver isn't getting much love, these days. i.e. normally using the kvm driver would be the default here |
This part is also weird - this is excerpt from /var/log/auth.log, where all 'sudo' commands on the minikube vm are being logged:
So, systemctl is being called to start cri-docker (check the lines with timestamps I'll try to build minikube locally and see if I could learn more (it's been a while since I go-ed, might as well try to get some fu back :D ). I wanted to test/use ssh driver because of zfs volume issue I created a week or two ago. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What Happened?
I wanted to set up minikube on pre-installed kvm machine. I installed ubuntu 22.04 in it, docker (not from snap, but from docker repos), and all the requirements mentioned in the ssh driver manual page.
Here is how I started it: (note that without specifying ssh key minikube fails mid-process, not sure why):
minikube start --driver=ssh --ssh-ip-address=192.168.122.163 --ssh-user=mario --ssh-key=~/.ssh/id_rsa
However, start process fails with:
Exiting due to RUNTIME_ENABLE: Failed to enable container runtime: sudo service cri-docker.socket restart: Process exited with status 5
And, indeed, there is no service unit file for cri-docker.socket. But, minikube is using 'service' command, instead of systemctl. cri-docker service is installed:
The command:
service cri-docker.socket
will runservice
init.d wrapper which will then check if systemd is installed (it is), it will then add .service to the end of the unit (cri-docker.socket in this case), and then run systemctl as follows:systemctl restart cri-docker.socket.service
which does not exist.Attach the log file
I can not get a log file via minikube, but this is excerpt (the end) of the minikube log when started with --alsologtostderr:
Operating System
Ubuntu
Driver
SSH
The text was updated successfully, but these errors were encountered: