[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.


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...


> 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.


Attachment: run.sh
Description: Bourne shell script

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]