Skip to content

Commit

Permalink
Exiting alarmgen with errorcode, so it will automatically restart.
Browse files Browse the repository at this point in the history
Closes-Bug:1648338

Change-Id: I1d7bf76271bc53625a396d214684f87e1062ca5e
  • Loading branch information
anishmehta committed Jan 25, 2017
1 parent 4cd71c7 commit 6f270be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/opserver/alarmgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def update_tab_alarms_timer(tab, uv, nm, curr_index, timeout_val,
[timeout_val]:
self._logger.error("Timer error for (%s,%s,%s)" % \
(tab, uv, nm))
raise SystemExit
raise SystemExit(1)
AlarmStateMachine.tab_alarms_timer[timeout_val].add\
((asm.tab, asm.uv, asm.nm))

Expand Down Expand Up @@ -703,7 +703,7 @@ def libpart_cb(self, part_list):
self._logger.error('Partition Del : %s' % str(oldset-newset))
if not self.partition_change(oldset-newset, False):
self._logger.error('Partition Del : %s failed!' % str(oldset-newset))
raise SystemExit
raise SystemExit(1)

self._logger.error('Partition Del done: %s' % str(oldset-newset))

Expand All @@ -715,7 +715,7 @@ def libpart_cb(self, part_list):
self._logger.error('Partition List failed %s %s' % \
(str(newset),str(oldset)))
except SystemExit:
raise SystemExit
raise SystemExit(1)

self._logger.error('Partition List done : new %s old %s' % \
(str(newset),str(oldset)))
Expand Down Expand Up @@ -866,7 +866,7 @@ def send_agg_uve(self, redish, inst, part, acq_time, rows):
"""
if not redish:
self._logger.error("No redis handle")
raise SystemExit
raise SystemExit(1)
old_acq_time = redish.hget("AGPARTS:%s" % inst, part)
if old_acq_time is None:
self._logger.error("Agg %s part %d new" % (inst, part))
Expand Down Expand Up @@ -931,7 +931,7 @@ def send_agg_uve(self, redish, inst, part, acq_time, rows):

if retry:
self._logger.error("Agg unexpected rows %s" % str(rows))
raise SystemExit
raise SystemExit(1)

def send_alarm_update(self, tab, uk):
ustruct = None
Expand Down Expand Up @@ -1126,7 +1126,7 @@ def run_uve_processing(self):
messag = template.format(type(ex).__name__, ex.args)
self._logger.error("%s : traceback %s" % \
(messag, traceback.format_exc()))
raise SystemExit
raise SystemExit(1)
if (curr - prev) < 1:
gevent.sleep(1 - (curr - prev))
self._logger.info("UVE Done")
Expand Down

0 comments on commit 6f270be

Please sign in to comment.