From 686408bb6ccf5d8f3a21877c9a3ba120e09fd88f Mon Sep 17 00:00:00 2001 From: Baptiste Assmann Date: Fri, 18 Aug 2017 10:15:42 +0200 Subject: [PATCH] MINOR: dns: default "hold obsolete" timeout set to 0 The "hold obsolete" timer is used to prevent HAProxy from moving a server to an other IP or from considering the server as DOWN if the IP currently affected to this server has not been seen for this period of time in DNS responses. That said, historically, HAProxy used to update servers as soon as the IP has disappeared from the response. Current default timeout break this historical behavior and may change HAProxy's behavior when people will upgrade to 1.8. This patch changes the default value to 0 to keep backward compatibility. --- doc/configuration.txt | 2 +- src/cfgparse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 8aafbe3ce..66c932597 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -11734,7 +11734,7 @@ hold answer was in . It follows the HAProxy time format. is in milliseconds by default. - Default value is 10s for "valid" and 30s for others. + Default value is 10s for "valid", 0s for "obsolete" and 30s for others. Note: since the name resolution is triggered by the health checks, a new resolution is triggered after modulo the parameter of diff --git a/src/cfgparse.c b/src/cfgparse.c index eebd72c11..ee249794f 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2169,7 +2169,7 @@ int cfg_parse_resolvers(const char *file, int linenum, char **args, int kwm) curr_resolvers->hold.other = 30000; curr_resolvers->hold.refused = 30000; curr_resolvers->hold.timeout = 30000; - curr_resolvers->hold.obsolete = 30000; + curr_resolvers->hold.obsolete = 0; /* default hold period for valid is 10s */ curr_resolvers->hold.valid = 10000; curr_resolvers->timeout.retry = 1000;