This is interesting since the bug was fixed in 1.6-dev2.

https://github.com/haproxy/haproxy/commit/4cd477f3721f6a3fe7cf55ae729388bf7f279331

There are two curious conditions in the code:

if (s->admin & SRV_ADMF_MAINT)
    return;

if (s->state == SRV_ST_STARTING || s->state == SRV_ST_RUNNING)
    return;

Basically, if the server is in maintenance mode or is still starting, it
bails out. But that should preclude the UP logging you see. Can you
confirm the server in question isn't in maintenance mode? I might try to
reproduce this with gdb running to debug.

-- 
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to haproxy in Ubuntu.
https://bugs.launchpad.net/bugs/1582708

Title:
  HAproxy 1.6.3 mail alerts on DOWN but not UP

Status in haproxy package in Ubuntu:
  New

Bug description:
  This has plagued since I upgraded to Xenial beta and HAProxy 1.6.x
  (latest is .3).  For some reason, HAProxy will mail alerts when the
  state changes to DOWN, but not when the state changes back to UP. I
  get mails for DOWN, so the mailer settings are correct, so this must
  be something in HAProxy that's not quite right.

  This is on a fully updated Xenial

  Kernel: 4.4.0-22-generic
  Description:    Ubuntu 16.04 LTS
  Release:        16.04

  
  DOWN Alert:
  May 16 15:52:44 caesar haproxy[957]: Server lc-db-cluster/qa-db is DOWN, 
reason: Layer7 wrong status, code: 503, info: "Service Unavailable", check 
duration: 9ms. 1 active and 0 backup servers left. 0 sessions active, 0 
requeued, 0 remaining in queue.

  DOWN Mail:
  May 16 15:52:45 caesar postfix/smtp[1366]: 9D5CC1E0419: 
to=<[email protected]>, relay=smtp.sendgrid.net[167.89.121.145]:587, 
delay=0.94, delays=0.08/0.03/0.67/0.16, dsn=2.0.0, status=sent (250 Ok: queued 
as ab6lg_ZkT6arW6MD-zLMlw)

  UP Alert:
  May 16 15:55:32 caesar haproxy[957]: Server lc-db-cluster/qa-db is UP, 
reason: Layer7 check passed, code: 200, info: "OK", check duration: 9ms. 2 
active and 0 backup servers online. 0 sessions requeued, 0 total in queue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1582708/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-ha
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help   : https://help.launchpad.net/ListHelp

Reply via email to