]> git.kaiwu.me - haproxy.git/commit
[MEDIUM] Implement "track [<backend>/]<server>"
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Mon, 18 Feb 2008 00:26:35 +0000 (01:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 27 Feb 2008 09:39:53 +0000 (10:39 +0100)
commitc8b16fc94885adbf7b0146b847ce50530eab9e40
tree19b5047efc022f4b4f90ffe43390a606aa848c84
parentf14358bd1ad4f7c9fd32c3900ac3a2848bed1b9a
[MEDIUM] Implement "track [<backend>/]<server>"

This patch implements ability to set the current state of one server
by tracking another one. It:
 - adds two variables: *tracknext, *tracked to struct server
 - implements findserver(), similar to findproxy()
 - adds "track" keyword accepting both "proxy/server" and "server" (assuming current proxy)
 - verifies if both checks and tracking is not enabled at the same time
 - changes set_server_down() to notify tracking server
 - creates set_server_up(), set_server_disabled(), set_server_enabled() by
   moving the code from process_chk() and adding notifications
 - changes stats to show a name of tracked server instead of Chk/Dwn/Dwntime(html)
   or by adding new variable (csv)

Changes from the previuos version:
 - it is possibile to track independently of the declaration order
 - one extra comma bug is fixed
 - new condition to check if there is no disable-on-404 inconsistency
TODO
doc/configuration.txt
include/proto/proxy.h
include/types/server.h
src/cfgparse.c
src/checks.c
src/dumpstats.c
src/proxy.c