[NEW PATCH] Related to BZ#723579 - OOP Handlers shouldn't print to stdout on failure (via gerrit-bot)
Saggi Mizrahi
smizrahi at redhat.com
Thu Sep 8 08:32:05 UTC 2011
New patch submitted by Saggi Mizrahi (smizrahi at redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/914
commit d4f812f405a7d74e4b576a187807edc9c21847b1
Author: Saggi Mizrahi <smizrahi at redhat.com>
Date: Thu Sep 8 11:27:26 2011 +0300
Related to BZ#723579 - OOP Handlers shouldn't print to stdout on failure
Change-Id: I7373f2f463252c8ce6302b123b5d60166aa40d48
diff --git a/vdsm/storage/processPool.py b/vdsm/storage/processPool.py
index 2a2d364..74079bc 100644
--- a/vdsm/storage/processPool.py
+++ b/vdsm/storage/processPool.py
@@ -176,22 +176,27 @@ def _helperMainLoop(pipe, lifeLine, parentLifelineFD):
poller.register(lifeLine, 0) # Only SIGERR\SIGHUP
poller.register(pipe.fileno(), select.EPOLLIN | select.EPOLLPRI)
- while True:
+ try:
+ while True:
- for (fd, event) in poller.poll():
- # If something happened in lifeLine, it means that papa is gone
- # and we should go as well
- if fd == lifeLine or event in (select.EPOLLHUP, select.EPOLLERR):
- return
-
- func, args, kwargs = pipe.recv()
- res = err = None
- try:
- res = func(*args, **kwargs)
- except KeyboardInterrupt as ex:
- err = ex
- except Exception as ex:
- err = ex
+ for (fd, event) in poller.poll():
+ # If something happened in lifeLine, it means that papa is gone
+ # and we should go as well
+ if fd == lifeLine or event in (select.EPOLLHUP, select.EPOLLERR):
+ return
- pipe.send((res, err))
+ func, args, kwargs = pipe.recv()
+ res = err = None
+ try:
+ res = func(*args, **kwargs)
+ except KeyboardInterrupt as ex:
+ err = ex
+ except Exception as ex:
+ err = ex
+
+ pipe.send((res, err))
+ except:
+ # If for some reason communication with the host failed crash silently
+ # There is no logging in oop and VDSM will handle it.
+ pass
More information about the vdsm-patches
mailing list