1
0
mirror of http://git.haproxy.org/git/haproxy.git/ synced 2025-03-25 04:17:42 +00:00
haproxy/src
Willy Tarreau 757478e900 BUG/MEDIUM: servers: properly propagate the maintenance states during startup
Right now there is an issue with the way the maintenance flags are
propagated upon startup. They are not propagate, just copied from the
tracked server. This implies that depending on the server's order, some
tracking servers may not be marked down. For example this configuration
does not work as expected :

        server s1 1.1.1.1:8000 track s2
        server s2 1.1.1.1:8000 track s3
        server s3 1.1.1.1:8000 track s4
        server s4 wtap:8000 check inter 1s disabled

It results in s1/s2 being up, and s3/s4 being down, while all of them
should be down.

The only clean way to process this is to run through all "root" servers
(those not tracking any other server), and to propagate their state down
to all their trackers. This is the same algorithm used to propagate the
state changes. It has to be done both to compute the IDRAIN flag and the
IMAINT flag. However, doing so requires that tracking servers are not
marked as inherited maintenance anymore while parsing the configuration
(and given that it is wrong, better drop it).

This fix also addresses another side effect of the bug above which is
that the IDRAIN/IMAINT flags are stored in the state files, and if
restored while the tracked server doesn't have the equivalent flag,
the servers may end up in a situation where it's impossible to remove
these flags. For example in the configuration above, after removing
"disabled" on server s4, the other servers would have remained down,
and not anymore with this fix. Similarly, the combination of IMAINT
or IDRAIN with their respective forced modes was not accepted on
reload, which is wrong as well.

This bug has been present at least since 1.5, maybe even 1.4 (it came
with tracking support). The fix needs to be backported there, though
the srv-state parts are irrelevant.

This commit relies on previous patch to silence warnings on startup.
2016-11-07 14:31:52 +01:00
..
51d.c BUILD/MAJOR:updated 51d Trie implementation to incorperate latest update to 51Degrees.c 2016-08-24 20:29:31 +02:00
acl.c MINOR: acl: Add predefined METH_DELETE, METH_PUT 2016-04-12 11:44:09 +02:00
applet.c
arg.c
auth.c
backend.c MINOR: server: do not emit warnings/logs/alerts on server state changes at boot 2016-11-07 14:31:45 +01:00
base64.c
buffer.c
cfgparse.c BUG/MEDIUM: servers: properly propagate the maintenance states during startup 2016-11-07 14:31:52 +01:00
channel.c BUG/MEDIUM: channel: fix inconsistent handling of 4GB-1 transfers 2016-05-04 15:26:37 +02:00
checks.c MAJOR: check: find out which port to use for health check at run time 2016-09-11 08:12:13 +02:00
chunk.c CLEANUP: fixed some usages of realloc leading to memory leak 2016-06-29 10:45:18 +02:00
compression.c BUILD: compression: remove a warning when no compression lib is used 2016-08-10 21:17:06 +02:00
connection.c CLEANUP: connection: using internal struct to hold source and dest port. 2016-07-05 14:43:05 +02:00
da.c
dns.c BUG/MEDIUM: dns: don't randomly crash on out-of-memory 2016-10-01 09:23:04 +02:00
dumpstats.c MINOR: stats: Escape equals sign on socket dump 2016-10-25 22:15:22 +02:00
ev_epoll.c
ev_kqueue.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00
ev_poll.c BUILD: poll: remove unused hap_fd_isset() which causes a warning with clang 2016-08-10 21:23:48 +02:00
ev_select.c
fd.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00
filters.c BUG/MEDIUM: filters: Fix data filtering when data are modified 2016-06-21 18:53:08 +02:00
flt_http_comp.c OPTIM: http: move all http character classs tables into a single one 2016-11-05 15:58:08 +01:00
flt_trace.c MEDIUM: filters: Add pre and post analyzer callbacks 2016-05-18 15:11:54 +02:00
freq_ctr.c
frontend.c MINOR: Add fe_req_rate sample fetch 2016-10-03 16:08:09 +02:00
haproxy-systemd-wrapper.c BUG/MEDIUM: systemd-wrapper: return correct exit codes 2016-11-03 20:34:20 +01:00
haproxy.c BUG/MEDIUM: servers: properly propagate the maintenance states during startup 2016-11-07 14:31:52 +01:00
hash.c
hdr_idx.c
hlua_fcn.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00
hlua.c BUG/MEDIUM: lua: somme HTTP manipulation functions are called without valid requests 2016-08-03 00:06:13 +02:00
i386-linux-vsys.c
lb_chash.c MEDIUM: server: Implement bounded-load hash algorithm 2016-10-25 20:21:32 +02:00
lb_fas.c
lb_fwlc.c
lb_fwrr.c
lb_map.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00
listener.c MINOR: listener: add the "accept-netscaler-cip" option to the "bind" keyword 2016-06-20 23:02:47 +02:00
log.c MEDIUM: log: Decompose %Tq in %Th %Ti %TR 2016-08-23 15:18:08 +02:00
lru.c
mailers.c
map.c
memory.c
namespace.c CLEANUP: uniformize last argument of malloc/calloc 2016-04-03 14:17:42 +02:00
pattern.c
payload.c BUG/MINOR: payload: fix SSLv2 version parser 2016-08-30 14:47:57 +02:00
peers.c MINOR: peers: remove the pointer to the stream 2016-10-31 20:07:01 +01:00
pipe.c
proto_http.c OPTIM: http: optimize lookup of comma and quote in header values 2016-11-05 18:23:38 +01:00
proto_tcp.c MEDIUM: tcp: add registration and processing of TCP L5 rules 2016-10-21 18:19:24 +02:00
proto_udp.c CLEANUP: fix inconsistency between fd->iocb, proto->accept and accept() 2016-04-14 11:18:22 +02:00
proto_uxst.c
protocol.c BUILD: protocol: fix some build errors on OpenBSD 2016-08-10 19:31:58 +02:00
proxy.c MEDIUM: tcp: add registration and processing of TCP L5 rules 2016-10-21 18:19:24 +02:00
queue.c MINOR: proxy: add 'served' field to proxy, equal to total of all servers' 2016-10-25 20:21:32 +02:00
raw_sock.c
rbtree.c
regex.c CLEANUP: uniformize last argument of malloc/calloc 2016-04-03 14:17:42 +02:00
sample.c OPTIM: http: move all http character classs tables into a single one 2016-11-05 15:58:08 +01:00
server.c BUG/MEDIUM: servers: properly propagate the maintenance states during startup 2016-11-07 14:31:52 +01:00
session.c MEDIUM: tcp: add registration and processing of TCP L5 rules 2016-10-21 18:19:24 +02:00
shctx.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00
signal.c MEDIUM: unblock signals on startup. 2016-04-20 10:53:12 +02:00
ssl_sock.c BUG/MINOR: ssl: prevent multiple entries for the same certificate 2016-10-24 19:13:12 +02:00
standard.c CLEANUP: tools: make ipcpy() preserve the original port 2016-11-05 13:56:04 +01:00
stick_table.c MEDIUM: tcp: add registration and processing of TCP L5 rules 2016-10-21 18:19:24 +02:00
stream_interface.c
stream.c MINOR: proxy: add 'served' field to proxy, equal to total of all servers' 2016-10-25 20:21:32 +02:00
task.c
time.c
trace.c BUG/MEDIUM: trace.c: rdtsc() is defined in two files 2016-04-09 22:27:01 +02:00
uri_auth.c CLEANUP: uniformize last argument of malloc/calloc 2016-04-03 14:17:42 +02:00
vars.c MEDIUM: tcp: add registration and processing of TCP L5 rules 2016-10-21 18:19:24 +02:00
xxhash.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00