From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: Serge Hallyn <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: "Daniel Lezcano" <dlezcano-GANU6spQydw@public.gmane.org>,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
"Stefan Bader"
<stefan.bader-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
"Stéphane Graber"
<stephane.graber-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
"Dan Kegel" <dank-XdDNpL9cdsoAvxtiuMwx3w@public.gmane.org>,
lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: uevent when moving nic between network namespaces?
Date: Fri, 12 Oct 2012 15:29:44 -0700 [thread overview]
Message-ID: <87626fmihz.fsf@xmission.com> (raw)
In-Reply-To: <20121012221711.GA23227@sergelap> (Serge Hallyn's message of "Fri, 12 Oct 2012 17:17:11 -0500")
Serge Hallyn <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> writes:
> Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org):
>> Serge Hallyn <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> writes:
>>
>> > Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org):
>> >> I am not currently working on a patch for this, but I will be happy to
>> >> review one. At a quick glance it looks like this could just be as
>> >> simple as calling kobject_uevent at the proper time, but testing and
>> >> reading through the relevant code paths is probably a good idea as there
>> >> always seems to be gotchas in that code.
>> >>
>> >> Eric
>> >
>> > This (the simple fix) works for me, actually.
>> >
>> > I do notice the ifdef shouldn't be needed, all the better.
>>
>> Should we have a KOBJ_ADD in the new network namespace or is the
>> KOBJ_MOVE sufficient?
>
> I was wondering about that... the KOBJ_ADD is technically not sufficient
> imo, since a MOVE (for a device which udev/upstart has never seen before)
> doesn't necessarily mean "configure this." So when I pass one end of a
> veth into a running ubuntu container, there is no network-interface or
> network-interface-security upstart job for it, whereas if I do a
> ip link add type veth inside the container, those do get the jobs.
>
> Now, ISTM passing an endpoing into a container is mainly done at
> startup, and upstart will end up configuring it anyway. Nothing is
> really breaking in any of the container usages I've seen because of this.
> But it would definately be cleaner to pass a KOBJ_ADD before the KOBJ_MOVE.
> Otherwise, udev has to guess what the MOVE meant.
>
> If there's no objection, I'll add that (and test it) and send to netdev
> on monday.
Sounds good. Right now I have the suspicion we might want our own
variant on sysfs_move that sends these instead of the move...
But let's confirm things work better with add/remove before we go crazy
on the best way to generate maintainable code.
Eric
next prev parent reply other threads:[~2012-10-12 22:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 3:13 uevent when moving nic between network namespaces? Serge Hallyn
2012-10-12 3:26 ` 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 [this message]
[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=87626fmihz.fsf@xmission.com \
--to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=dank-XdDNpL9cdsoAvxtiuMwx3w@public.gmane.org \
--cc=dlezcano-GANU6spQydw@public.gmane.org \
--cc=lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=stefan.bader-Z7WLFzj8eWMS+FvcfC7Uqw@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox