From: Serge Hallyn <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
To: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org,
"Dan Kegel" <dank-XdDNpL9cdsoAvxtiuMwx3w@public.gmane.org>,
"Stéphane Graber"
<stephane.graber-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
"Daniel Lezcano" <dlezcano-GANU6spQydw@public.gmane.org>,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: uevent when moving nic between network namespaces?
Date: Thu, 11 Oct 2012 22:13:28 -0500 [thread overview]
Message-ID: <20121012031328.GA5472@sergelap> (raw)
Hi,
Dan Kegel (cc:d) found an interesting nuisance relating to upstart
and network interfaces with lxc containers. In particular, when you
start a container, two veths are created. A uevent for their creation
is sent, and so a 'network-interface' upstart job is created for each.
One of the veths is passed into the container. When the container
shuts down, the veth in the init-net-ns gets a net-device-removed
uevent, so the network-interface upstart job goes away. But the veth
in the container doesn't cause a net-device-removed upstart uevent
to be sent. So its network-interface upstart job sticks around.
The details are at:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1065589
I notice that when simply renaming a netdev (sudo ip link set veth1 name
veth2) then udevadm monitor shows:
KERNEL[17945.234850] move /devices/virtual/net/veth2 (net)
UDEV [17945.235758] move /devices/virtual/net/veth2 (net)
but when I do 'sudo ip link set veth2 netns 27689' then 'udevadm
monitor' shows nothing.
When I do
sudo ip link set veth1 netns 32296
(in process 32296) sudo ip link set veth1 name veth2
then, again udevadm monitor shows nothing.
So the question is, should the kernel be sending uevents for
net-device-removed and then net-device-added when a nic is moved
between network namespaces? Or should lxc just fake that?
-serge
next reply other threads:[~2012-10-12 3:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 3:13 Serge Hallyn [this message]
2012-10-12 3:26 ` uevent when moving nic between network namespaces? Eric W. Biederman
[not found] ` <871uh4pdzd.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-10-12 19:18 ` Serge Hallyn
2012-10-12 19:38 ` Eric W. Biederman
[not found] ` <87sj9jmqew.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-10-12 21:56 ` Serge Hallyn
2012-10-12 22:08 ` Eric W. Biederman
[not found] ` <87bog7mjhm.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-10-12 22:17 ` Serge Hallyn
2012-10-12 22:29 ` Eric W. Biederman
[not found] ` <87626fmihz.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-10-13 5:17 ` Serge Hallyn
2012-10-13 5:27 ` Eric W. Biederman
Reply instructions:
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121012031328.GA5472@sergelap \
--to=serge.hallyn-z7wlfzj8ewms+fvcfc7uqw@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=dank-XdDNpL9cdsoAvxtiuMwx3w@public.gmane.org \
--cc=dlezcano-GANU6spQydw@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=stephane.graber-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.