All of lore.kernel.org
 help / color / mirror / Atom feed
* Namespaces and devices
@ 2010-05-21 16:27 Martín Ferrari
  2010-05-23 14:04 ` Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Martín Ferrari @ 2010-05-21 16:27 UTC (permalink / raw)
  To: netdev; +Cc: Mathieu Lacage

Hi,

Sorry if this is a dumb question, but I couldn't find any
documentation that matches the current behaviour... So I don't know if
what I see is what is intended, or if it's a bug.

I would like to know what is the exact behaviour re. devices when a
netns is destroyed, and which kind of devices can be moved.

According to http://lxc.sourceforge.net/network/configuration.php,
devices assigned to a netns should move to the main netns when the
former is destroyed. What I see is that the devices are deleted, at
least for veth and dummy devices. I also see a bug I previously
reported that caused an oops in some cases.

Also, I have read somewhere (now I cannot find it) that supposedly, I
should be able to move real devices to a netns, but I always get
Invalid argument errors.

Thanks.

-- 
Martín Ferrari

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Namespaces and devices
  2010-05-21 16:27 Namespaces and devices Martín Ferrari
@ 2010-05-23 14:04 ` Daniel Lezcano
  2010-05-25  9:56   ` Martín Ferrari
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Lezcano @ 2010-05-23 14:04 UTC (permalink / raw)
  To: Martín Ferrari; +Cc: netdev, Mathieu Lacage

On 05/21/2010 06:27 PM, Martín Ferrari wrote:
> Hi,
>
> Sorry if this is a dumb question, but I couldn't find any
> documentation that matches the current behaviour... So I don't know if
> what I see is what is intended, or if it's a bug.
>
> I would like to know what is the exact behaviour re. devices when a
> netns is destroyed, and which kind of devices can be moved.
>
> According to http://lxc.sourceforge.net/network/configuration.php,
> devices assigned to a netns should move to the main netns when the
> former is destroyed. What I see is that the devices are deleted, at
> least for veth and dummy devices. I also see a bug I previously
> reported that caused an oops in some cases.
>    

The documentation on this website is a bit out dated. That was the 
initial behavior but was changed as the following.

All the virtual devices are destroyed with the network namespace. The 
destroyable virtual devices are identified when they have the dellink 
ops defined. If you can do the 'ip link del' command on this device, 
then this device type will be destroyed by a netns.

About the oops,  was the it "kernel panic when using 
netns+bridges+tc(netem)" ?

> Also, I have read somewhere (now I cannot find it) that supposedly, I
> should be able to move real devices to a netns, but I always get
> Invalid argument errors.

Yes, that was previously the case with the proof of concept, because 
sysfs per namespace was enabled. But this feature is not merged upstream 
yet (but is on the way), so physical devices are not movable across 
namespaces.

Hope that helps
   -- Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Namespaces and devices
  2010-05-23 14:04 ` Daniel Lezcano
@ 2010-05-25  9:56   ` Martín Ferrari
  2010-05-25 10:14     ` Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Martín Ferrari @ 2010-05-25  9:56 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: netdev, Mathieu Lacage

Hi Daniel,

On Sun, May 23, 2010 at 16:04, Daniel Lezcano <daniel.lezcano@free.fr> wrote:

> The documentation on this website is a bit out dated. That was the initial
> behavior but was changed as the following.
>
> All the virtual devices are destroyed with the network namespace. The
> destroyable virtual devices are identified when they have the dellink ops
> defined. If you can do the 'ip link del' command on this device, then this
> device type will be destroyed by a netns.

Fair enough, thanks for the explanation.

> About the oops,  was the it "kernel panic when using
> netns+bridges+tc(netem)" ?

No, this is a different issue. Probably it got lost in the noise of
the thread, but it is here:
http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/694830/focus=158583
(it is my second mail in that thread)

>> Also, I have read somewhere (now I cannot find it) that supposedly, I
>> should be able to move real devices to a netns, but I always get
>> Invalid argument errors.
>
> Yes, that was previously the case with the proof of concept, because sysfs
> per namespace was enabled. But this feature is not merged upstream yet (but
> is on the way), so physical devices are not movable across namespaces.

OK. The plan is for them to return to netns 1 automatically at destroy?

Thanks!
-- 
Martín Ferrari

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Namespaces and devices
  2010-05-25  9:56   ` Martín Ferrari
@ 2010-05-25 10:14     ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2010-05-25 10:14 UTC (permalink / raw)
  To: Martín Ferrari; +Cc: netdev, Mathieu Lacage

On 05/25/2010 11:56 AM, Martín Ferrari wrote:
> Hi Daniel,
>
> On Sun, May 23, 2010 at 16:04, Daniel Lezcano<daniel.lezcano@free.fr>  wrote:
>
>    
>> The documentation on this website is a bit out dated. That was the initial
>> behavior but was changed as the following.
>>
>> All the virtual devices are destroyed with the network namespace. The
>> destroyable virtual devices are identified when they have the dellink ops
>> defined. If you can do the 'ip link del' command on this device, then this
>> device type will be destroyed by a netns.
>>      
> Fair enough, thanks for the explanation.
>    

You are welcome ;)

>> About the oops,  was the it "kernel panic when using
>> netns+bridges+tc(netem)" ?
>>      
> No, this is a different issue. Probably it got lost in the noise of
> the thread, but it is here:
> http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/694830/focus=158583
> (it is my second mail in that thread)

Ok, I was able to reproduce it easily. If I have spare time this week, I 
will look at the oops.

>>> Also, I have read somewhere (now I cannot find it) that supposedly, I
>>> should be able to move real devices to a netns, but I always get
>>> Invalid argument errors.
>>>        
>> Yes, that was previously the case with the proof of concept, because sysfs
>> per namespace was enabled. But this feature is not merged upstream yet (but
>> is on the way), so physical devices are not movable across namespaces.
>>      
> OK. The plan is for them to return to netns 1 automatically at destroy?
>    

Yes, this is the plan.

Thanks
   -- Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-25 10:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 16:27 Namespaces and devices Martín Ferrari
2010-05-23 14:04 ` Daniel Lezcano
2010-05-25  9:56   ` Martín Ferrari
2010-05-25 10:14     ` Daniel Lezcano

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.