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.

43 lines
1.7 KiB

  1. From bfb8f885955efa1ef90f79595f16a01e30fd0dcf Mon Sep 17 00:00:00 2001
  2. From: Simon Horman <horms@verge.net.au>
  3. Date: Thu, 26 Feb 2015 11:26:17 +0900
  4. Subject: [PATCH 3/9] BUG/MEDIUM: Do not consider an agent check as failed on
  5. L7 error
  6. As failure to connect to the agent check is not sufficient to mark it as
  7. failed it stands to reason that an L7 error shouldn't either.
  8. Without this fix if an L7 error occurs, for example of connectivity to the
  9. agent is lost immediately after establishing a connection to it, then the
  10. agent check will be considered to have failed and thus may end up with zero
  11. health. Once this has occurred if the primary health check also reaches
  12. zero health, which is likely if connectivity to the server is lost, then
  13. the server will be marked as down and not be marked as up again until a
  14. successful agent check occurs regardless of the success of any primary
  15. health checks.
  16. This behaviour is not correct as a failed agent check should never cause a
  17. server to be marked as down or by extension continue to be marked as down.
  18. Signed-off-by: Simon Horman <horms@verge.net.au>
  19. (cherry picked from commit eaabd52e29a29187f9829fe727028a6ca530cbf9)
  20. ---
  21. src/checks.c | 2 +-
  22. 1 file changed, 1 insertion(+), 1 deletion(-)
  23. diff --git a/src/checks.c b/src/checks.c
  24. index b9048da..71debb6 100644
  25. --- a/src/checks.c
  26. +++ b/src/checks.c
  27. @@ -246,7 +246,7 @@ static void set_server_check_status(struct check *check, short status, const cha
  28. * cause the server to be marked down.
  29. */
  30. if ((!(check->state & CHK_ST_AGENT) ||
  31. - (check->status >= HCHK_STATUS_L7TOUT)) &&
  32. + (check->status >= HCHK_STATUS_L57DATA)) &&
  33. (check->health >= check->rise)) {
  34. s->counters.failed_checks++;
  35. report = 1;
  36. --
  37. 2.0.5