]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG/MEDIUM: server: move the maintenance bits out of the server state
authorWilly Tarreau <w@1wt.eu>
Tue, 13 May 2014 17:44:56 +0000 (19:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 May 2014 09:27:00 +0000 (11:27 +0200)
commit2012521d7bb417b9048b4f15df0dd9d8178c46e4
treefdf6d09f57500b85b6899319b9dc8cb63694f94c
parentc93cd16b6c9d4033aff7991f5ba0745005fa4caf
REORG/MEDIUM: server: move the maintenance bits out of the server state

Now we introduce srv->admin and srv->prev_admin which are bitfields
containing one bit per source of administrative status (maintenance only
for now). For the sake of backwards compatibility we implement a single
source (ADMF_FMAINT) but the code already checks any source (ADMF_MAINT)
where the STF_MAINTAIN bit was previously checked. This will later allow
us to add ADMF_IMAINT for maintenance mode inherited from tracked servers.

Along doing these changes, it appeared that some places will need to be
revisited when implementing the inherited bit, this concerns all those
modifying the ADMF_FMAINT bit (enable/disable actions on the CLI or stats
page), and the checks to report "via" on the stats page. But currently
the code is harmless.
include/proto/backend.h
include/types/server.h
src/backend.c
src/cfgparse.c
src/checks.c
src/dumpstats.c
src/server.c