New patch submitted by Saggi Mizrahi (smizrahi(a)redhat.com)
You can review this change at:
http://gerrit.usersys.redhat.com/754
commit a1b7ee72d7d8649717fefd807386809c067fc632
Author: Saggi Mizrahi <smizrahi(a)redhat.com>
Date: Thu Jul 28 10:14:01 2011 +0300
BZ#726045 mask OSError in case domain sampling fails
Change-Id: Ic7a0bd47f8624a5f74930692b1a21a221e862804
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 1ddc3db..878ce20 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -91,11 +91,9 @@ class StatsThread(threading.Thread):
def run(self):
while self._statsletrun:
try:
- delay = 0
if self._domain is None:
self._domain = SDF.produce(self._sdUUID)
stats, code = self._statsfunc(self._domain)
- delay = self._domain.getReadDelay()
except se.StorageException, e:
self.log.error("Unexpected error", exc_info=True)
code = e.code
@@ -103,6 +101,15 @@ class StatsThread(threading.Thread):
self.log.error("Unexpected error", exc_info=True)
code = 200
+ delay = 0
+ try:
+ # This is handled seperatly because in case of this kind
+ # of failure we don't want to print stack trace
+ delay = self._domain.getReadDelay()
+ except Exception, e:
+ self.log.error("Could not figure out delay for domain `%s`
(%s)", self._sdUUID, e)
+ code = 200
+
if code != 0:
self._domain = None