On 07/05/2013 06:22 PM, Richard Weinberger wrote: > Am 05.07.2013 03:36, schrieb Gao feng: >> On 07/05/2013 04:45 AM, Richard Weinberger wrote: >>> Hi, >>> >>> Am 03.07.2013 12:04, schrieb Gao feng: >>>> Hi, >>>> On 07/01/2013 03:45 PM, Richard Weinberger wrote: >>>>> Hi! >>>>> >>>>> If you have multiple LXC containers with networking and the autostart feature enabled libvirtd fails to >>>>> up some veth interfaces on the host side. >>>>> >>>>> Most of the time only the first veth device is in state up, all others are down. >>>>> >>>>> Reproducing is easy. >>>>> 1. Define a few containers (5 in my case) >>>>> 2. Run "virsh autostart ..." on each one. >>>>> 3. stop/start libvirtd >>>>> >>>>> You'll observe that all containers are running, but "ip a" will report on the host >>>>> side that not all veth devices are up and are not usable within the containers. >>>>> >>>>> This is not userns related, just retested with libvirt of today. >>>> >>>> I can not reproduce this problem on my test bed... >>> >>> Strange. >>> >>>> maybe you should wait some seconds for the starting of these containers. >>> >>> Please see the attached shell script. Using it I'm able to trigger the issue on all of >>> my test machines. >>> run.sh creates six very minimal containers and enables autostart. Then it kills and restarts libvirtd. >>> After the script is done you'll see that only one or two veth devices are up. >>> >>> On the over hand, if I start them manually using a command like this one: >>> for cfg in a b c d e f ; do /opt/libvirt/bin/virsh -c lxc:/// start test-$cfg ; done >>> All veths are always up. >>> >> >> >> I still can not reproduce even use your script. >> >> [root@Donkey-I5 Desktop]# ./run.sh >> Domain test-a defined from container_a.conf >> >> Domain test-a marked as autostarted >> >> Domain test-b defined from container_b.conf >> >> Domain test-b marked as autostarted >> >> Domain test-c defined from container_c.conf >> >> Domain test-c marked as autostarted >> >> Domain test-d defined from container_d.conf >> >> Domain test-d marked as autostarted >> >> Domain test-e defined from container_e.conf >> >> Domain test-e marked as autostarted >> >> Domain test-f defined from container_f.conf >> >> Domain test-f marked as autostarted >> >> 2013-07-05 01:26:47.155+0000: 27163: info : libvirt version: 1.1.0 >> 2013-07-05 01:26:47.155+0000: 27163: debug : virLogParseOutputs:1334 : outputs=1:file:/home/gaofeng/libvirtd.log >> waiting a bit.... >> 167: veth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 >> 169: veth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 >> 171: veth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 >> 173: veth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 >> 175: veth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 >> 177: veth5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 >> >> >> Can you post your libvirt debug log? > > Please see attached file. > > 43: veth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 > 45: veth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 > 47: veth2: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000 > 49: veth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 > 51: veth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr0 state UP qlen 1000 > 53: veth5: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 100 > strange, I can not see veth related error message from your log. seems like all of the veth devices of host had been up but for some reasons they become down. can you also show me the bridge information on your host? brctl show virbr0 and your default net configuration virsh -c lxc:/// net-dumpxml default and your dmesg Thanks! -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list