Skip to content

Commit

Permalink
Merge "There are instances where discovery to db takes more time and …
Browse files Browse the repository at this point in the history
…discovery reports either the subscriber or publisher as down. but since all clients have other mechanism to detect server connection breaks and transition back up, it is safe to give more timeout [increased to 30] and change hc_max_miss accordingly" into R3.1
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Oct 21, 2016
2 parents 647c1b8 + ba651dc commit 37da0c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/discovery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _query(self):
try:
self.stats['request'] += 1
r = requests.post(
self.url, data=self.post_body, headers=self._headers, timeout=5)
self.url, data=self.post_body, headers=self._headers, timeout=30)
if r.status_code == 200:
break
self.inc_stats('sc_%d' % r.status_code)
Expand Down Expand Up @@ -316,7 +316,7 @@ def _publish_int(self, service, data, oper_state = 'up', msg = ''):
try:
self.inc_pub_stats(service, 'request')
r = requests.post(
self.puburl, data=json.dumps(payload), headers=self._headers, timeout=5)
self.puburl, data=json.dumps(payload), headers=self._headers, timeout=30)
if r.status_code != 200:
self.inc_pub_stats(service, 'sc_%d' % r.status_code)
emsg = 'Status Code ' + str(r.status_code)
Expand Down
2 changes: 1 addition & 1 deletion src/discovery/disc_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
HC_INTERVAL = 5

# Expire published info after successive heartbeat miss
HC_MAX_MISS = 5
HC_MAX_MISS = 7

0 comments on commit 37da0c1

Please sign in to comment.