Skip to content
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

ID_* device properties not available when listing devices in a Docker container #225

Open
p4l1ly opened this issue Jan 21, 2017 · 5 comments

Comments

@p4l1ly
Copy link

p4l1ly commented Jan 21, 2017

When I run udevadm monitor --environment in a docker container, I can see devices appearing and dissappearing when plugging and unplugging a USB device. With pyudev.Monitor.from_netlink(ctx).poll() I do not get anything. Am I doing something wrong? Or could it be some kind of bug in this library? Or does libudev not support working in such a complicated environment and I'd have to use udevadm directly for this? Thank you.

@p4l1ly
Copy link
Author

p4l1ly commented Jan 21, 2017

if someone would be interested in a very simple implementation of the library described in the third question, here's my repo https://github.com/p4l1ly/python-udevadm-monitor

@p4l1ly
Copy link
Author

p4l1ly commented Jan 21, 2017

OK have found the root of the problem... I'm listening to udev events, in the container I get only the kernel events.

@p4l1ly
Copy link
Author

p4l1ly commented Jan 21, 2017

But list_devices has another problem when running in docker container. udevadm and pyudev.Monitor shows all the attributes, but list_devices shows the devices without ID_ attributes.

@p4l1ly
Copy link
Author

p4l1ly commented Jan 22, 2017

OK, it's the same as with udevadm... udevadm monitor works in a docker container, udevadm info does not. See my answer to this post http://stackoverflow.com/questions/41753218/udevadm-does-not-show-all-attributes-inside-a-docker-container/41778750#41778750

@mulkieran
Copy link
Contributor

Thanks for the info. I'm going to call this a libudev bug, at least provisionally.

@mulkieran mulkieran changed the title pyudev.Monitor in docker container ID_* device properties not available when listing devices in a Docker container Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants