Skip to content

Commit

Permalink
Fixed contrail-analytics unavailablity issue
Browse files Browse the repository at this point in the history
contrail-svc-monitor uses the uve status if the query
is succeed to the contrail-analytics. Otherwise it is
better to continue with last known state of agents and vrouters

Change-Id: I3b4c896a8834f5fef71ff4262dc09dc62cee36bc
Closes-bug: #1696593
  • Loading branch information
ymariappan authored and Yuvaraja Mariappan committed Jun 8, 2017
1 parent ba3def3 commit adf5c2e
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -111,8 +111,8 @@ def query_uve(self, filter_string):
for values in response['value']:
response_dict[values['name']] = values['value']
except Exception as e:
pass
return response_dict
return False, response_dict
return True, response_dict

def vrouters_running(self):
# get az host list
Expand All @@ -122,8 +122,12 @@ def vrouters_running(self):
self._analytics = self.get_analytics_client()
if not self._analytics:
return
agents_status = self.query_uve("*?cfilt=NodeStatus:process_status")
vrouters_mode = self.query_uve("*?cfilt=VrouterAgent:mode")
query_status, agents_status = self.query_uve("*?cfilt=NodeStatus:process_status")
if not query_status:
return
query_status, vrouters_mode = self.query_uve("*?cfilt=VrouterAgent:mode")
if not query_status:
return

for vr in VirtualRouterSM.values():
if az_vrs and vr.name not in az_vrs:
Expand Down

0 comments on commit adf5c2e

Please sign in to comment.