Skip to content

Commit

Permalink
Merge "alarmgen should exit if we see a too-many-files error. Closes-…
Browse files Browse the repository at this point in the history
…Bug:1656444"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jan 25, 2017
2 parents 80a7dcb + 38d2bc4 commit 1b9fb14
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/opserver/partition_handler.py
Expand Up @@ -18,6 +18,7 @@
from pysandesh.util import UTCTimestampUsec
import select
import redis
import errno
from collections import namedtuple

PartInfo = namedtuple("PartInfo",["ip_address","instance_id","acq_time","port"])
Expand Down Expand Up @@ -637,6 +638,10 @@ def _run(self):
self.stop_partition()
self._failed = True
pause = True
if hasattr(ex,'errno'):
# This is an unrecoverable error
if ex.errno == errno.EMFILE:
raise SystemExit(1)

self._logger.error("Stopping %s pcount %d" % (self._topic, pcount))
partdb = self.stop_partition()
Expand Down

0 comments on commit 1b9fb14

Please sign in to comment.