[libvirt] [PATCH] util: set error if DAD is not finished

Laine Stump laine at laine.org
Thu Oct 29 18:15:06 UTC 2015

On 10/29/2015 08:32 AM, Maxim Perevedentsev wrote:
> On 10/29/2015 12:47 PM, Luyao Huang wrote:
>> If DAD not finished in 5 seconds, user will get an
>> unknown error like this:
>>   # virsh net-start ipv6
>>   error: Failed to start network ipv6
>>   error: An error occurred, but the cause is unknown
>> Call virReportError to set an error.
>> Signed-off-by: Luyao Huang <lhuang at redhat.com>
>> ---
>> I found the DAD will take 7 seconds
>> on my machine, and i cannot create a network which
>> use ipv6 now :( . Can we offer a way allow user to change this
>> timeout ? maybe add a configuration file option in
>> libvirtd.conf.
> Could you please send the related records of your sysctl -a?
> Max DAD timeout should be
> rand() % net.ipv6.conf.default.router_solicitation_delay + 
> net.ipv6.conf.default.dad_transmits * 
> net.ipv6.neigh.default.retrans_time_ms
> I wonder whether my calculations were faulty or it is your specific 
> configuration.

On my system, these are set to 1, 1, and 1000, and I've found that DAD 
takes something between 5.7 and 6.8 seconds to complete (it was at the 
lower end with a single IP address, and at the high end with 70 IP 
addresses (or also with 20 IPs, so I don't think it's going to get 
substantially higher). (Too bad I didn't do this *before* I pushed, 
rather than relying on a successful build and reports of proper 
operation on your system :-/)

Based on that, I think it makes sense to push a patch that sets the 
timeout to 20 seconds (and push Luyao's patch ragardless). Since the 
timeout is meant to catch an "infinite" wait, I think 20 seconds is 
okay; I don't want to add yet another tunable parameter unless we really 
need to.

I'm pushing Luyao's patch now, but will wait for an ACK to push the 
patch I've attached here. Anyone?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-util-set-max-wait-for-IPv6-DAD-to-20-seconds.patch
Type: text/x-patch
Size: 1079 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151029/0c01732d/attachment-0001.bin>

More information about the libvir-list mailing list