[WORKER] Fix logic to find unplanned restarts

The logic to determine if HAProxy was restarted outside of the
worker's control was incorrect due to missing parenthesis.

Change-Id: I416ec7113491583646e033038a3b9e7cf58a6174
This commit is contained in:
David Shrewsbury
2013-12-03 10:28:01 -05:00
parent 38fcbbd88c
commit 9b0284aa09

View File

@@ -249,7 +249,8 @@ class UbuntuServices(services_base.ServicesBase):
# was restarted outside of the worker's control, so we have no choice
# but to zero the values to avoid overcharging on usage.
if (unrpt_tcp_bo == 0 and unrpt_http_bo == 0) and \
(prev_tcp_bo > current_tcp_bo) or (prev_http_bo > current_http_bo):
((prev_tcp_bo > current_tcp_bo) or
(prev_http_bo > current_http_bo)):
LOG.warn("Forced reset of HAProxy statistics")
prev_tcp_bo = 0
prev_http_bo = 0