On 10/30/2015 02:15 AM, Laine Stump wrote:
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(a)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.
yes, change the timeout to 20 seconds is a good way to avoid this issue.
I was trying to figure out why DAD take so long time on my machine.
And thanks a lot for your quick review.
Luyao