> Currently if I run ifupdown in a second network namespace it will try > to use the same /run/network/ifstate state file of the main instance, > so it does not actually work at all. > > I see two possible implementations: > > - support configuring the state file name in /etc/network/interfaces > (since iproute allows to bind mount namespace-specific files in /etc, > and a new interfaces file may be needed anyway) > > - make ifupdown automatically detect when it is run in a network > namespace and use /run/network/ifstate.$NAMESPACE
Interesting. I think it would not be too hard to have ifup use a different ifstate file if it's running in a different network namespace. However, it becomes more difficult if, for example, you have two eth0 interfaces in different namespaces, but also configured differently. Then your first possibility is the easiest one. But then you could also mount a private /run/network tmpfs? ifstate.* is already in use now for per-interface locks, but of course another separator could be used. There is the a related bug, #651919, which also asks for namespace support, but turnned around: ifupdown is run in the default namespace, but creates interfaces in a different namespace. Less elegant maybe, on the other hand it will work better during boot? -- Met vriendelijke groet / with kind regards, Guus Sliepen <g...@debian.org>
signature.asc
Description: Digital signature