Re: [Lxc-users] lxc container messing with hosts networking

2011-05-16 Thread arkai...@gmail.com
Not sure if I got it right but seems to me that you are speaking about
hardware bridges and not about the software ones we are testing here with
the kvm stuff.

Besides, looks like Serge reported it working properly on his natty-natty
setup, I wonder if it happens the same with the setup I provided.

Thanks

--
Arkaitz


On Mon, May 16, 2011 at 7:41 AM, Jäkel, Guido g.jae...@dnb.de wrote:

 Any hints?


 Dear Arkaitz,

 take a look to the switch and the spanning tree settings for the port. On
 Cisco for instance, there will be a notable connection lag on topologie
 changes if a link isn't configured to use a certain fast option.

 Guido


--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-16 Thread arkai...@gmail.com
On Sat, May 14, 2011 at 4:06 PM, Serge Hallyn serge.hal...@canonical.comwrote:

 Hm, I just did this on natty
  (natty host, natty kvm VM, with a natty container inside that)

 and could actually not reproduce your problem.  Just a normal bridge on
 the kvm VM:

 root@lxc-natty-amd64:~# brctl show
 bridge name bridge id   STP enabled interfaces
 br0 8000.001636dd34bc   no  eth0

 And the lxc container was created with a minimal normal config:

 lxc.network.type=veth
 lxc.network.link=br0
 lxc.network.flags=up



Well, as I said it has to be something from the setup I do because I keep
having those problems even with laptop(natty)-kvm(natty)-host(natty)

I recorded this screencast that shows the issue:
http://www.screencast-o-matic.com/watch/cXhD2hbLM

Thanks

Arkaitz
--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-16 Thread Serge Hallyn
Quoting arkai...@gmail.com (arkai...@gmail.com):
 On Sat, May 14, 2011 at 4:06 PM, Serge Hallyn 
 serge.hal...@canonical.comwrote:
 
  Hm, I just did this on natty
   (natty host, natty kvm VM, with a natty container inside that)
 
  and could actually not reproduce your problem.  Just a normal bridge on
  the kvm VM:
 
  root@lxc-natty-amd64:~# brctl show
  bridge name bridge id   STP enabled interfaces
  br0 8000.001636dd34bc   no  eth0
 
  And the lxc container was created with a minimal normal config:
 
  lxc.network.type=veth
  lxc.network.link=br0
  lxc.network.flags=up
 
 
 
 Well, as I said it has to be something from the setup I do because I keep
 having those problems even with laptop(natty)-kvm(natty)-host(natty)
 
 I recorded this screencast that shows the issue:
 http://www.screencast-o-matic.com/watch/cXhD2hbLM

Got it!

It's the user networking.  When I start a debian vm with libvirt (using the
default tap interfaces) I don't get the hang.  When I start the same vm by
hand using -net user the way you do in your script, I do get the hang.

-serge

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-16 Thread arkai...@gmail.com
On Mon, May 16, 2011 at 6:11 PM, Serge Hallyn serge.hal...@canonical.comwrote:

 Quoting arkai...@gmail.com (arkai...@gmail.com):
  Well, as I said it has to be something from the setup I do because I keep
  having those problems even with laptop(natty)-kvm(natty)-host(natty)
 
  I recorded this screencast that shows the issue:
  http://www.screencast-o-matic.com/watch/cXhD2hbLM

 Got it!

 It's the user networking.  When I start a debian vm with libvirt (using the
 default tap interfaces) I don't get the hang.  When I start the same vm by
 hand using -net user the way you do in your script, I do get the hang.


Nice!  but I don't believe it is just a kvm issue if you are suggesting
this, as it happened to me on a standard debian on a laptop over a wireless
link, br0 to wlan0 etc... and had same hang.

Any ideas what could be causing it? it has to be something on the host
system.

Thanks

Arkaitz
--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-14 Thread arkai...@gmail.com
On Sat, May 14, 2011 at 1:34 AM, Serge Hallyn serge.hal...@canonical.comwrote:

 Immediately I assume that your problem is that the mac addresses
 assigned to your containers are lower than that of the bridge.  The
 bridge always takes on the lowest mac of any of its nics, so it'll
 change its mac address, which will temporarily drop the host's
 network connection if it's also part of that bridge.

 If I'm not mistaken you can specify a macaddr for your container
 using

 lxc.network.hwaddr=$x

 where x is a mac address - just make sure it's higher than the
 host's.


Your diagnosis looks right to me, all the symptoms match with a mac addr
change, and I've seen the br0 mac address change between the 2 ifaces on
some tests.
However, forcing kvm to assign the host a macaddr of 00:... and even seting
that ip to the bridge in the hosts network/interfaces did not seem to solve
the problem, I haven't seen the bridge changing mac addr anymore, but the
20-30 second hang is still there, so I don't know what to think, I've find
few webs in the internet detailing the problem and solving it like that, but
apparently it does not work for me.
So, with a bridge with the lower macaddr I still experiment network hangs
when starting containers, and even worse, when using the network from the
container it hangs as well with a simple apt-get update on my ssh link
laptop-host-guest.

Somehow each time the container uses the network the host networking hangs,
I suspect the guest has no problem with it though I can't see it because my
ssh connection goes through the host and hangs there.

Apart from that, I discovered that lxc.network.hwaddr= sets the internal
macaddr of the container, but not the in-host generated interface that gets
added to the bridge.

Thanks

Arkaitz
--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-14 Thread arkai...@gmail.com
I've setup a web server and do requests each 5 seconds from my laptop.
Then start tcpdump in the host machine and after a while I do lxc-start.

Inspecting later with wireshark, it looks like once the lxc guest finishes
DHCP negotiation and setups the local IP address(10.0.2.17) any request to
the host IP(10.0.2.15) is identified by the system as Unicast to another
host and it sends the packet again trying to forward it, previous to the
lxc guest dhcp it used to identify them as Unicast to us and answered
them.

The hosts br0 doesn't change the MAC at all as I can see it the same through
ifconfig br0 in the kvm console window, besides, I'm setting the hosts eth
mac address to very low so that it does not trigger any bridge mac update.

Any hints?

--
Arkaitz
--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-14 Thread Serge Hallyn
Quoting arkai...@gmail.com (arkai...@gmail.com):
 I've setup a web server and do requests each 5 seconds from my laptop.
 Then start tcpdump in the host machine and after a while I do lxc-start.
 
 Inspecting later with wireshark, it looks like once the lxc guest finishes
 DHCP negotiation and setups the local IP address(10.0.2.17) any request to
 the host IP(10.0.2.15) is identified by the system as Unicast to another
 host and it sends the packet again trying to forward it, previous to the
 lxc guest dhcp it used to identify them as Unicast to us and answered
 them.
 
 The hosts br0 doesn't change the MAC at all as I can see it the same through
 ifconfig br0 in the kvm console window, besides, I'm setting the hosts eth
 mac address to very low so that it does not trigger any bridge mac update.
 
 Any hints?

Make sure stp is on on the bridge inside your kvm guest.

If that doesn't work, I'll just have to try and reproduce, but you'll
probably need someone more network-savvy than me to look into it.

I'll set up a test environment later this weekend.

-serge

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-14 Thread arkai...@gmail.com
On Sat, May 14, 2011 at 2:39 PM, Serge Hallyn serge.hal...@canonical.comwrote:

 Make sure stp is on on the bridge inside your kvm guest.

 If that doesn't work, I'll just have to try and reproduce, but you'll
 probably need someone more network-savvy than me to look into it.

 I'll set up a test environment later this weekend.

 -serge


Tried enabling stp but nothing improved.
I'm trying to come up with a script that automates the env setup, will send
it later on.

Thanks

Arkaitz
--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-14 Thread Serge Hallyn
Quoting arkai...@gmail.com (arkai...@gmail.com):
 On Sat, May 14, 2011 at 2:39 PM, Serge Hallyn 
 serge.hal...@canonical.comwrote:
 
  Make sure stp is on on the bridge inside your kvm guest.
 
  If that doesn't work, I'll just have to try and reproduce, but you'll
  probably need someone more network-savvy than me to look into it.
 
  I'll set up a test environment later this weekend.
 
  -serge
 
 
 Tried enabling stp but nothing improved.
 I'm trying to come up with a script that automates the env setup, will send
 it later on.

Hm, I just did this on natty
  (natty host, natty kvm VM, with a natty container inside that)

and could actually not reproduce your problem.  Just a normal bridge on
the kvm VM:

root@lxc-natty-amd64:~# brctl show
bridge name bridge id   STP enabled interfaces
br0 8000.001636dd34bc   no  eth0

And the lxc container was created with a minimal normal config:

lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up

So I guess I may have to try to reproduce on debian.

-serge

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc container messing with hosts networking

2011-05-14 Thread arkai...@gmail.com
Hi,

 Hm, I just did this on natty
  (natty host, natty kvm VM, with a natty container inside that)

 and could actually not reproduce your problem.  Just a normal bridge on
 the kvm VM:

 root@lxc-natty-amd64:~# brctl show
 bridge name bridge id   STP enabled interfaces
 br0 8000.001636dd34bc   no  eth0

 And the lxc container was created with a minimal normal config:

 lxc.network.type=veth
 lxc.network.link=br0
 lxc.network.flags=up

 So I guess I may have to try to reproduce on debian.


Weird, I doubt is debian only, it has to be something from my setup.
Check  http://pastebin.com/zZXWmCF8  , I created this script 98% automated
that will setup my env so that you see if there is something wrong.
I'm running this on Ubuntu 10.10

Thanks

Arkaitz
--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users