Hi Jens !
Thanks for detailed explanations !
I've looked a bit, why you have this "Proxy is disabled." message,
when"@!PID shutdown sessions server"is issued.
In simply words, for old worker's backend proxies we set the flag
PR_FL_STOPPED during the reload and it's checked in the handler of
"shutdown sessions server" command here
(cli_parse_shutdown_sessions_server):
http://git.haproxy.org/?p=haproxy.git;a=blob;f=src/server.c;h=7d2ba4a12b44a6773f1742f894ba0166ea561cbb;hb=HEAD#l5157
http://git.haproxy.org/?p=haproxy.git;a=blob;f=src/stream.c;h=6e6a54555a82ff37acc4d2c64abf95dee50229e4;hb=HEAD#l4046
If we would check only PR_FL_DISABLED flag in cli_find_server(),this
command would work for your case:
echo '@!75897 shutdown sessions server bck/s1' | socat -t10000 /tmp/msock -
So, all sessions of old worker for the server s1 will be shutdowned,
sessions from other workers will be kept, as expected.
cli_find_server() is used in all CLI command handlers, which manipulates
servers. So, let's discuss this use-case, if there is a willingnessto
have such small feature ?
If there is a willingness, I would need to check other "server"
commands, as with this simple patch below, which unblocks, we probably
break some other cases.
diff --git a/src/server.c b/src/server.c
index 7d2ba4a12..8bbe0c1cb 100644
--- a/src/server.c
+++ b/src/server.c
@@ -5154,7 +5154,7 @@ struct server *cli_find_server(struct appctx
*appctx, char *arg)
return NULL;
}
- if (px->flags & (PR_FL_DISABLED|PR_FL_STOPPED)) {
+ if (px->flags & (PR_FL_DISABLED)) {
cli_err(appctx, "Proxy is disabled.\n");
return NULL;
}
--
Bien cordialement,
Valentine