kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.24k stars 4.87k forks source link

Failed to restart minikube after laptop resume from suspend due to device remapping #19379

Closed malthe closed 1 month ago

malthe commented 1 month ago

What Happened?

On Ubuntu 22.04:

First, start a new minikube and stop it.

$ minikube start --driver=podman --container-runtime=containerd
$ minikube stop

Now, suspend machine, resume and then restart minikube:

$ minikube start --driver=podman --container-runtime=containerd

We get an error:

Error: unable to start container "<redacted>": error stat'ing file `/dev/bus/usb/001/014`:
No such file or directory: OCI runtime attempted to invoke a command that was not found

The immediate reason for this is that upon resume from suspend, USB devices have been given new identifiers.

Attach the log file

W0805 14:56:44.497019 269406 out.go:239] 😿 Failed to start podman container. Running "minikube delete" may fix it: driver start: start: podman start minikube: exit status 125 stdout:

stderr: Error: unable to start container "": error stat'ing file /dev/bus/usb/001/014: No such file or directory: OCI runtime attempted to invoke a command that was not found

I0805 14:56:44.507332 269406 out.go:177] W0805 14:56:44.508622 269406 out.go:239] ❌ Exiting due to GUEST_PROVISION: error provisioning guest: Failed to start host: driver start: start: podman start minikube: exit status 125 stdout:

stderr: Error: unable to start container "": error stat'ing file /dev/bus/usb/001/014: No such file or directory: OCI runtime attempted to invoke a command that was not found

W0805 14:56:44.508648 269406 out.go:239] W0805 14:56:44.509380 269406 out.go:239] ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ 😿 If the above advice does not help, please let us know: │ │ 👉 https://github.com/kubernetes/minikube/issues/new/choose │ │ │ │ Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. │ │ │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ I0805 14:56:44.510683 269406 out.go:177]

Operating System

Ubuntu

Driver

Podman

malthe commented 1 month ago

Seems like this is fixed in a more recent podman release: https://github.com/containers/podman/issues/4900.

malthe commented 1 month ago

I was able to install podman version 4.3.1 on Ubuntu 22.04 using the following method:

https://gist.github.com/shvchk/05ed652ada5a28d076a4d0471c2bb18d

This resolves the issue.