You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.3 KiB

  1. From d6649c499b8ca4fb0bf93153c2a149c78e8a76f8 Mon Sep 17 00:00:00 2001
  2. From: Willy Tarreau <w@1wt.eu>
  3. Date: Thu, 3 Nov 2016 18:33:25 +0100
  4. Subject: [PATCH 29/31] BUG/MINOR: srv-state: allow to have both CMAINT and
  5. FDRAIN flags
  6. CMAINT indicates that the server was *initially* disabled in the
  7. configuration via the "disabled" keyword. FDRAIN indicates that the
  8. server was switched to the DRAIN state from the CLI or the agent.
  9. This it's perfectly valid to have both of them in the state file,
  10. so the parser must not reject this combination.
  11. This fix must be backported to 1.6.
  12. (cherry picked from commit e1bde1492a30f5036ca58248e50c27a9e116d9cc)
  13. ---
  14. src/server.c | 1 +
  15. 1 file changed, 1 insertion(+)
  16. diff --git a/src/server.c b/src/server.c
  17. index b9e72b7..b0c7bbe 100644
  18. --- a/src/server.c
  19. +++ b/src/server.c
  20. @@ -1961,6 +1961,7 @@ static void srv_update_state(struct server *srv, int version, char **params)
  21. srv_admin_state != SRV_ADMF_IMAINT &&
  22. srv_admin_state != SRV_ADMF_CMAINT &&
  23. srv_admin_state != (SRV_ADMF_CMAINT | SRV_ADMF_FMAINT) &&
  24. + srv_admin_state != (SRV_ADMF_CMAINT | SRV_ADMF_FDRAIN) &&
  25. srv_admin_state != SRV_ADMF_FDRAIN &&
  26. srv_admin_state != SRV_ADMF_IDRAIN)) {
  27. chunk_appendf(msg, ", invalid srv_admin_state value '%s'", params[2]);
  28. --
  29. 2.7.3