]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: new srv_admin flag: SRV_ADMF_RMAINT
authorBaptiste Assmann <bedis9@gmail.com>
Wed, 2 Nov 2016 20:31:27 +0000 (21:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 9 Nov 2016 14:23:16 +0000 (15:23 +0100)
This flag has to be set when an IP address resolution fails (either
using libc at start up or using HAProxy's runtime resolver). This will
automatically trigger the administrative status "MAINT", through the
global mask SRV_ADMF_MAINT.

doc/management.txt
include/types/server.h

index 27b7551a24c08e75cd958e0f8424142b3e2d89c5..4aaed2e7958a5bb3e41e87593a5bf256c37c5f20 100644 (file)
@@ -1886,6 +1886,9 @@ show servers state [<backend>]
                                     0x10 = SRV_ADMF_IDRAIN
                                       The server has inherited the drain status
                                       from a tracked server.
+                                    0x20 = SRV_ADMF_RMAINT
+                                      The server is in maintenance because of an
+                                      IP address resolution failure.
      srv_uweight:                 User visible server's weight.
      srv_iweight:                 Server's initial weight.
      srv_time_since_last_change:  Time since last operational change.
index 19da2ad9b720bae9d3061fcedfa87089d61807da..57971a2eb2a5c38d094e1e8e599bccbc03689e69 100644 (file)
@@ -76,11 +76,12 @@ enum srv_state {
 enum srv_admin {
        SRV_ADMF_FMAINT    = 0x01,        /* the server was explicitly forced into maintenance */
        SRV_ADMF_IMAINT    = 0x02,        /* the server has inherited the maintenance status from a tracked server */
-       SRV_ADMF_MAINT     = 0x03,        /* mask to check if any maintenance flag is present */
+       SRV_ADMF_MAINT     = 0x23,        /* mask to check if any maintenance flag is present */
        SRV_ADMF_CMAINT    = 0x04,        /* the server is in maintenance because of the configuration */
        SRV_ADMF_FDRAIN    = 0x08,        /* the server was explicitly forced into drain state */
        SRV_ADMF_IDRAIN    = 0x10,        /* the server has inherited the drain status from a tracked server */
        SRV_ADMF_DRAIN     = 0x18,        /* mask to check if any drain flag is present */
+       SRV_ADMF_RMAINT    = 0x20,        /* the server is down because of an IP address resolution failure */
 };
 
 /* server-state-file version */