runtime-tools icon indicating copy to clipboard operation
runtime-tools copied to clipboard

Annoying warning about multiple USB devices using the same Major, Minor and Type

Open saschagrunert opened this issue 5 years ago • 4 comments

If I run podman in privileged mode (mounts the devices from /dev), then I get the following warnings:

> sudo ./bin/podman run --privileged alpine
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.

These originate from this part of the runtime-tools: https://github.com/opencontainers/runtime-tools/blob/095789df6c2bc53a9dd4464cda8c22616d66e0d6/generate/generate.go#L1498-L1500

The main reason behind this is that I have VirtualBox installed which creates some virtual devices in /dev/vboxusb:

{Path:/dev/vboxusb/001/002 Type:c Major:189 Minor:1 FileMode:-rw-rw---- UID:0xc00076b6b0 GID:0xc00076b6b4}
{Path:/dev/vboxusb/001/003 Type:c Major:189 Minor:2 FileMode:-rw-rw---- UID:0xc00076b74c GID:0xc00076b750}
{Path:/dev/vboxusb/001/004 Type:c Major:189 Minor:3 FileMode:-rw-rw---- UID:0xc00076b7ec GID:0xc00076b7f0}
...

I did not take my time to check out how the Type, Major and Minor are set within the VirtualBox sources, but in the end the behavior should be fine since the device does not exist in reality, right? I could imagine that VirtualBox uses these devices to forward from real interfaces into the virtual machine.

Nevertheless, what do we want to do with the warning? As a user, I cannot do anything in that particular case so either we remove it, make it optional or exclude vboxusb devices. WDYT?

Refers to: https://github.com/containers/libpod/issues/3200

saschagrunert avatar May 31 '19 07:05 saschagrunert

@mrunalp PTAL

rhatdan avatar Jun 02 '19 03:06 rhatdan

So this one's been bugging me for a while, but I only just checked the cause:

b 253 0 /dev/dm-0
b 253 0 /dev/mapper/storage-storage
b 253 1 /dev/dm-1
b 253 1 /dev/mapper/storage-space

… a totally legitimate (AFAIK?) duplication of type, major, and minor which shouldn't in this case be generating a (spurious) warning.

srcshelton avatar Apr 26 '21 22:04 srcshelton

Also affects Ceph: https://tracker.ceph.com/issues/51668

sebastian-philipp avatar Jul 14 '21 11:07 sebastian-philipp

Any news on this?

tyler92 avatar Dec 15 '22 06:12 tyler92