-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
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:
root@minikube:~# systemctl status cri-docker.service
● cri-docker.service - CRI Interface for Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/cri-docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/cri-docker.service.d
└─10-cni.conf
Active: active (running) since Mon 2024-04-01 19:13:33 UTC; 4min 50s ago
TriggeredBy: ● cri-docker.socket
Docs: https://docs.mirantis.com
Main PID: 5762 (cri-dockerd)
Tasks: 8
Memory: 8.9M
CPU: 85ms
CGroup: /system.slice/cri-docker.service
└─5762 /usr/bin/cri-dockerd --container-runtime-endpoint fd:// --pod-infra-container-image=registry.k8s.io/pause:3.9 --network-plugin=cni --hairpin-mode=hairpin-veth
The command: service cri-docker.socket will run service 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:
I0401 21:11:41.283081 453000 cruntime.go:279] skipping containerd shutdown because we are bound to it
I0401 21:11:41.283155 453000 ssh_runner.go:195] Run: sudo service crio status
I0401 21:11:41.294571 453000 command_runner.go:130] ! Unit crio.service could not be found.
I0401 21:11:41.295920 453000 ssh_runner.go:195] Run: /bin/bash -c "sudo mkdir -p /etc && printf %s "runtime-endpoint: unix:///var/run/cri-dockerd.sock
" | sudo tee /etc/crictl.yaml"
I0401 21:11:41.309007 453000 command_runner.go:130] > runtime-endpoint: unix:///var/run/cri-dockerd.sock
I0401 21:11:41.309786 453000 ssh_runner.go:195] Run: which cri-dockerd
I0401 21:11:41.312344 453000 command_runner.go:130] > /usr/bin/cri-dockerd
I0401 21:11:41.312409 453000 ssh_runner.go:195] Run: sudo mkdir -p /etc/systemd/system/cri-docker.service.d
I0401 21:11:41.319295 453000 ssh_runner.go:362] scp memory --> /etc/systemd/system/cri-docker.service.d/10-cni.conf (189 bytes)
I0401 21:11:41.334627 453000 docker.go:560] configuring docker to use "cgroupfs" as cgroup driver...
I0401 21:11:41.334706 453000 ssh_runner.go:362] scp memory --> /etc/docker/daemon.json (130 bytes)
I0401 21:11:41.352218 453000 ssh_runner.go:195] Run: sudo service docker restart
I0401 21:11:42.229016 453000 openrc.go:158] restart output:
I0401 21:11:42.229106 453000 ssh_runner.go:195] Run: sudo service cri-docker.socket restart
I0401 21:11:42.245170 453000 command_runner.go:130] ! Failed to restart cri-docker.socket.service: Unit cri-docker.socket.service not found.
I0401 21:11:42.247766 453000 out.go:177]
W0401 21:11:42.249380 453000 out.go:239] ❌ Exiting due to RUNTIME_ENABLE: Failed to enable container runtime: sudo service cri-docker.socket restart: Process exited with status 5
stdout:
stderr:
Failed to restart cri-docker.socket.service: Unit cri-docker.socket.service not found.
Operating System
Ubuntu
Driver
SSH