Open plluksie opened 2 years ago
Sorry I've been on vacation -- This is a podman bug AFAICT, kind is not responsible for mounting devices like /dev/bus/...
In general restart support is much better under docker, in the next release it should be pretty robust. This particular issue seems like a bug in podman though, we're not explicitly requesting this path, podman should probably gracefully handle this when mounting devices on restart.
@BenTheElder : you are right - this has nothing to do with kind per se. In fact it goes even deeper than podman. I had a little go at it and it looks like it's crun which is actually performing all these checks. podman simply delegates it to conmon, which in turn executes crun with provided arguments(log attached).
kind-podman-conmon-crun.err.log
Good news: there is a quick work around which allows to keep the cluster intact and still restart it, even if some devices are missing. It's as simple as touching the files in question(these flagged in the console), starting the cluster and removing them again to ensure there is no problem when the actual devices are plugged in.
podman start kind-control-plane
#[ERROR]
sudo touch /dev/bus/usb/003/007 /dev/bus/usb/003/010 ..
podman start kind-control-plane
sudo rm /dev/bus/usb/003/007 /dev/bus/usb/003/010 ..
It may not be 100% reliable as there will be cases where the container may actually need to interact with the device in the scope, but it works for me as I often plug/unplug the docking station and when I work without it.
Kind should not really be used as a production-grade cluster, so recreating it from scratch should not be a big deal. However, in some cases people may be in the middle of something and loosing quite a chunk of time for recreating it from scratch, which is not great. Making it work - even with the workaround above may be quite nice.
I know you've heard that million times before - @BenTheElder you are the guy who literally rewrote the rules for development environments for people working with Kubernetes! Kind is such a game changer I just cannot thank you enough on behalf of countless developers who used to struggle with massive feedback loops on the CI environments when testing the changes on K8s. I know there are alternatives these days, but Kind is still considered as a swiss army knife in my toolbox! Thank you!
Sorry I've still been a bit overloaded returning from vacation and switching roles 😅
Thank you!
That's an interesting workaround, I think you coulud also find where podman is storing the pod spec and alter the mounts, but this feels like something that should be reported back to podman or crun (I can't remember which one decides the device list initially but I think it's actually podman?) as a bug, I'm pretty sure docker will not fail to start the container in this case.
Hello, I encountered error which seems to be related to the fact that I often change docking station and peripherals. It seems that if I'll deploy cluster being connected to one docking station (and set of peripherals):
KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster --config=/home/lsiemiradzki/opt/kind/kind-cluster.yaml
Then I turn it off, move to other docking station (with different set of peripherals) and try starting the main container, I'm getting:Error: unable to start container "containerID": error stat'ing file /dev/bus/usb/003/...
The workaround I'm using is to throw away the control plane container and re-create the cluster. Thanks for any hints.
I checked Known Issues and [Issues] (https://github.com/kubernetes-sigs/kind/issues?q=is%3Aissue+is%3Aopen+%22Error%3A+unable+to+start+container%22), but I haven't found anything similar.
More details: