Skip to content

Commit

Permalink
Merge "Handle redis restart in alarm-gen"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Mar 17, 2016
2 parents 8d262cc + 23a1002 commit 578840b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/opserver/alarmgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def handle_resource_check(self, part, current_inst, msgs):

def reconnect_agg_uve(self, lredis):
self._logger.error("Connected to Redis for Agg")
lredis.ping()
lredis.set(self._moduleid+':'+self._instance_id, True)
for pp in self._workers.keys():
self._workers[pp].reset_acq_time()
self._workers[pp].kill(\
Expand Down Expand Up @@ -606,6 +606,10 @@ def run_uve_processing(self):
password=self._conf.redis_password(),
db=7)
self.reconnect_agg_uve(lredis)
else:
if not lredis.exists(self._moduleid+':'+self._instance_id):
self._logger.error('Identified redis restart')
self.reconnect_agg_uve(lredis)
gevs = {}
pendingset = {}
for part in self._uveq.keys():
Expand Down

0 comments on commit 578840b

Please sign in to comment.