Skip to content

Commit

Permalink
Fix script execution interval
Browse files Browse the repository at this point in the history
Issue:
------
initial iteration flag was not reset, causing interval
timer never to come into picture and results in execution
of health check continously without waiting for interval

Fix:
----
reset initial flag after first execution and comment out
if condition to check change of status, to allow using
stdout for identifing pipe close and exit

Closes-Bug: 1533604
Related-Bug: 1530539
Change-Id: Id158b5dfb9a0ff7e2560b5a92f4114d38f839456
  • Loading branch information
Prabhjot Singh Sethi committed Jan 13, 2016
1 parent 19e0dbc commit 3f7c9d7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/vnsw/agent/contrail/contrail-vrouter-agent-health-check.py
Expand Up @@ -36,13 +36,14 @@ def start(self):
else:
self.retries_done = 0
# TODO(prabhjot) need to add log for every transaction
if self.initial == True or ret != self.ret:
# TODO(prabhjot) currently script uses failure to
# write to stdout as a mechanism to identify parent
# process close and exit, eventually we should
# restore below line to optimize unneccessary message
# exchange on the stdout pipe
# self.initial = False
# TODO(prabhjot) currently script uses failure to
# write to stdout as a mechanism to identify parent
# process close and exit, eventually we should
# restore below line to optimize unneccessary message
# exchange on the stdout pipe
#if self.initial == True or ret != self.ret:
if True:
self.initial = False
self.ret = ret
if self.ret == 0:
sys.stdout.write("Success\n")
Expand Down

0 comments on commit 3f7c9d7

Please sign in to comment.