MEDIUM: server: allow to remove servers at runtime except non purgeable
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 23 Aug 2021 12:10:51 +0000 (14:10 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 25 Aug 2021 13:53:54 +0000 (15:53 +0200)
commit14c3c5c1216cc8cb7b421135dc44d658a748bc11
tree7c50d6df7222138e2d12304f9de0dbb303d4c9b6
parent86f3707d14c2feccbdaa89bd395622cdca4d4b34
MEDIUM: server: allow to remove servers at runtime except non purgeable

Relax the condition on "delete server" CLI handler to be able to remove
all servers, even non dynamic, except if they are flagged as non
purgeable.

This change is necessary to extend the use cases for dynamic servers
with reload. It's expected that each dynamic server created via the CLI
is manually commited in the haproxy configuration by the user. Dynamic
servers will be present on reload only if they are present in the
configuration file. This means that non-dynamic servers must be allowed
to be removable at runtime.

The dynamic servers removal reg-test has been updated and renamed to
reflect its purpose. A new test is present to check that non-purgeable
servers cannot be removed.
doc/management.txt
reg-tests/server/cli_delete_dynamic_server.vtc [new file with mode: 0644]
reg-tests/server/cli_delete_server.vtc
reg-tests/server/get_srv_stats.lua [new file with mode: 0644]
src/server.c