balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
969 stars 116 forks source link

Unreliable udev behaviour in containers with hotplugged storage devices #1225

Open CameronDiver opened 6 years ago

CameronDiver commented 6 years ago

Running a privileged container with UDEV=on and hotplugging a storage device does not result in the device files being created.

Without UDEV=on, the device files aren't created at all.

With UDEV=on, the "root" device file (e.g. /dev/sda) is created, but any partition device files are not (e.g. /dev/sda1)

The device is not visible blkid, but watching udevadm monitor does show the device being detected.

Front logo Front conversations

memory commented 6 years ago

n.b. I did a little more hunting around and can now confirm:

So if you're looking for a timeline for the regression: there you go. :)

memory commented 6 years ago

Actually I may have spoken too soon there: 2.13.6r1's behavior seems to be...inconsistent. :(

memory commented 6 years ago

another data point: udev events / usb devices do appear to still work as expected if and only if I run with ENV INITSYSTEM on inside the container.

shaunmulligan commented 5 years ago

@memory and @CameronDiver is there a simple reproduction of this issue? I want to try test this against our new base images, e.g.: balenalib/raspberrypi3-debian since there we have udevd running in a network namespace, which seems to have improved things across the board for other udev related issues. So a simple test case would be great to run on those images.