Subject: Re: [vserver] /proc/net/dev missing when networknamespaces are active
From: Steve Kieu <msh.computing@gmail.com>
Date: Mon, 25 Jun 2012 09:12:58 +1000
Mon, 25 Jun 2012 09:12:58 +1000
> I investigated this a bit further.
> - The simple trick of bind-mounting a suitable directory on /proc/net
>  works in a very limited way as /proc/net is a symlink to /proc/self/net
>

I think you should never try that. When mount bind you effectively use the
deferent network namespace for the new namespace in teh vserver. Looks like
it works in someway but it will mess up your host network. Use unshare as
you already noted below then you have completely new ns


>
> Atm I assume there is a bug in util-vserver and if it is only using an
> old/obsolete approach to enable the namespaces or a collision between
> /proc/self/net-hiding and namespaces.
>
>

As I said before - it is not the network namespace in the kernel but it is
vserver utils tool. The thing is,  if the vserver forks think layer 2
networking virtualization  *is*  important or not. then they can actively
fix the bug (or not to).

I encountered a strange problem with vserver networking before and really
not happy with the way it is. The problem that when vserver share a bridge
with the host (use bridge because I want that network to be used for kvm as
well) and when a kvm machine using same bridge be turned off - Or some
vserver use the bridge got turned off - the whole bridge lose their
connection - sometimes it is  recovered by itself but most of the time not.
I have to login to the host (in different interface) and do arpping to
manually update mac addr with IP to get it up. not sure why -

The problem is gone away currently with my LXC containers setup.

I do hope that the vserver devs fix the bug so I can use network ns again
with vserver.

Thanks,




> Regards,
>        Adrian
> --
> LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart
> Fon: +49 (7 11) 78 28 50 90 - Fax:  +49 (7 11) 78 28 50 91
> Mail: lihas@lihas.de - Web: http://lihas.de
> Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart
>



-- 
Steve Kieu



I investigated this a bit further.
- The simple trick of bind-mounting a suitable directory on /proc/net
 works in a very limited way as /proc/net is a symlink to /proc/self/net

I think you should never try that. When mount bind you effectively use the deferent network namespace for the new namespace in teh vserver. Looks like it works in someway but it will mess up your host network. Use unshare as you already noted below then you have completely new ns
 

Atm I assume there is a bug in util-vserver and if it is only using an
old/obsolete approach to enable the namespaces or a collision between
/proc/self/net-hiding and namespaces.



As I said before - it is not the network namespace in the kernel but it is vserver utils tool. The thing is,  if the vserver forks think layer 2 networking virtualization  *is*  important or not. then they can actively fix the bug (or not to).

I encountered a strange problem with vserver networking before and really not happy with the way it is. The problem that when vserver share a bridge with the host (use bridge because I want that network to be used for kvm as well) and when a kvm machine using same bridge be turned off - Or some vserver use the bridge got turned off - the whole bridge lose their connection - sometimes it is  recovered by itself but most of the time not. I have to login to the host (in different interface) and do arpping to manually update mac addr with IP to get it up. not sure why -

The problem is gone away currently with my LXC containers setup.

I do hope that the vserver devs fix the bug so I can use network ns again with vserver.

Thanks,


 
Regards,
       Adrian
--
LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart
Fon: +49 (7 11) 78 28 50 90 - Fax:  +49 (7 11) 78 28 50 91
Mail: lihas@lihas.de - Web: http://lihas.de
Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart



--
Steve Kieu