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

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

 



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@xxxxxxxxxx>
---
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?

>From 559f9dbd72e7ca8c252134b87a6d0f57b4b2227b Mon Sep 17 00:00:00 2001
From: Laine Stump <laine@xxxxxxxxx>
Date: Thu, 29 Oct 2015 14:09:59 -0400
Subject: [PATCH] util: set max wait for IPv6 DAD to 20 seconds

This was originally set to 5 seconds, but times of 5.5 to 7 seconds
were experienced. Since it's an arbitrary number intended to prevent
an infinite hang, having it a bit too high won't hurt anything, and 20
seconds looks to be adequate (i.e. I think/hope we don't need to make
it tunable in libvirtd.conf)
---
 src/util/virnetdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index b84437e..7bb7b15 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -96,7 +96,7 @@ VIR_LOG_INIT("util.netdev");
 # define FEATURE_BIT_IS_SET(blocks, index, field)        \
     (FEATURE_WORD(blocks, index, field) & FEATURE_FIELD_FLAG(index))
 #endif
-#define VIR_DAD_WAIT_TIMEOUT 5 /* seconds */
+#define VIR_DAD_WAIT_TIMEOUT 20 /* seconds */
 
 typedef enum {
     VIR_MCAST_TYPE_INDEX_TOKEN,
-- 
2.4.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]