BUG/MEDIUM: dns/server: fix incomatibility between SRV resolution and server state file
Server state file has no indication that a server is currently managed
by a DNS SRV resolution.
And thus, both feature (DNS SRV resolution and server state), when used
together, does not provide the expected behavior: a smooth experience...
This patch introduce the "SRV record name" in the server state file and
loads and applies it if found and wherever required.
This patch applies to haproxy-dev branch only. For backport, a specific patch
is provided for 1.8.
diff --git a/include/types/server.h b/include/types/server.h
index 8825928..8adc29b 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -126,10 +126,11 @@
"bk_f_forced_id " \
"srv_f_forced_id " \
"srv_fqdn " \
- "srv_port"
+ "srv_port " \
+ "srvrecord"
-#define SRV_STATE_FILE_MAX_FIELDS 19
-#define SRV_STATE_FILE_NB_FIELDS_VERSION_1 18
+#define SRV_STATE_FILE_MAX_FIELDS 20
+#define SRV_STATE_FILE_NB_FIELDS_VERSION_1 19
#define SRV_STATE_LINE_MAXLEN 512
/* server flags -- 32 bits */