Yaniv Bronhaim has uploaded a new change for review.

Change subject: Catching remoteError in vdsm on multiprocessing failure
......................................................................

Catching remoteError in vdsm on multiprocessing failure

In rhel version of python multiprocessing package, when the manager
restarted we must reconnect it, otherwise RemoteError is raised.
This patch reconnect to supervdsm when the error is occurred and call
the method again.

Change-Id: Ib2f9cab9e4d138063ebe0f2f3214b4e0b053a364
Signed-off-by: Yaniv Bronhaim <[email protected]>
---
M vdsm/supervdsm.py
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/17066/1

diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py
index 5bfe29b..9c826b0 100644
--- a/vdsm/supervdsm.py
+++ b/vdsm/supervdsm.py
@@ -20,7 +20,7 @@
 #
 
 import os
-from multiprocessing.managers import BaseManager
+from multiprocessing.managers import BaseManager, RemoteError
 import logging
 import threading
 from vdsm import constants, utils
@@ -46,7 +46,13 @@
         callMethod = lambda: \
             getattr(self._supervdsmProxy._svdsm, self._funcName)(*args,
                                                                  **kwargs)
-        return callMethod()
+        try:
+            return callMethod()
+        except RemoteError as ex:
+            self._supervdsmProxy._log.debug(
+                "Error while reaching supervdsm: %s" % ex)
+            self._supervdsmProxy._connect()
+            return callMethod()
 
 
 class SuperVdsmProxy(object):


-- 
To view, visit http://gerrit.ovirt.org/17066
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2f9cab9e4d138063ebe0f2f3214b4e0b053a364
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to