Le 26/06/2019 à 21:03, Alexander Aring a écrit : > This patch adds a state file for each generated namespace to ensure the > namespace is mounted. There exists no way to tell another programm that > the namespace is mounted when iproute is creating one. An example > application would be an inotify watcher to use the generated namespace > when it's discovers one. In this case we cannot use the generated > namespace file in /var/run/netns in the time when it's not mounted yet. > A primitiv approach is to generate another file after the mount > systemcall was done. In my case inotify waits until the mount statefile > is generated to be sure that iproute2 did a mount bind. We (at 6WIND) already hit this problem. The solution was: if setns() fails, wait a bit and retry the setns() and continue this loop with a predefined timeout. netns may be created by other app than iproute2, it would be nice to find a generic solution. David Howells was working on a mount notification mechanism: https://lwn.net/Articles/760714/ https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=notifications I don't know what is the status of this series. Regards, Nicolas