From: Nicolas Dichtel <firstname.lastname@example.org>
To: Alexander Aring <email@example.com>, firstname.lastname@example.org
Cc: email@example.com, firstname.lastname@example.org,
David Howells <email@example.com>
Subject: Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns
Date: Thu, 27 Jun 2019 14:08:08 +0200 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
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
David Howells was working on a mount notification mechanism:
I don't know what is the status of this series.
next prev parent reply other threads:[~2019-06-27 12:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 19:03 [RFC iproute2 0/1] iproute2 netns mount race issue and solution? Alexander Aring
2019-06-26 19:03 ` [RFC iproute2 1/1] ip: netns: add mounted state file for each netns Alexander Aring
2019-06-27 12:08 ` Nicolas Dichtel [this message]
2019-06-28 16:26 ` David Howells
2019-06-28 17:06 ` Matteo Croce
2019-06-29 21:45 ` Matteo Croce
2019-07-01 12:34 ` Nicolas Dichtel
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).