Re: setting virtual interface in container
Roy Marples
Wed Nov 11 09:11:41 2020
On 10/11/2020 23:15, msg board wrote:
Thank you. Adding --nodev works. but why was it needed and what did it do that
it worked now - if you can please explain.
Basically udev loves to rename interfaces. It can only do this if the interface
is down.
dhcpcd doesn't really care that much about the interface name and when a new one
arrives or dhcpcd is just starting it will bring it up. It *has* to so it can work.
This of course is a race.
To solve this, dhcpcd ships with a udev plugin that listens to udev to announce
when an interface is ready to be used. Sadly this doesn't seem to work in any
container or network namespace. We have code to detect a namespace, but not a
container.
What's more, it's not dhcpcd's job to know this either. dhcpcd knows it has
connected to udev and udev is running, so we rely on udev doing the right thing.
But it does not.
It might be that I'm doing something wrong, but no-one has helped so far.
https://roy.marples.name/cgit/dhcpcd.git/tree/src/dev/udev.c
Roy
On Tue, Nov 10, 2020 at 2:38 PM Roy Marples <roy@xxxxxxxxxxxx
<mailto:roy@xxxxxxxxxxxx>> wrote:
Archive administrator: postmaster@marples.name