Yaniv Bronhaim has posted comments on this change.
Change subject: change of the isRunning function ......................................................................
Patch Set 1: Fails
(2 inline comments)
It fails to call svdsm if you kill the first instance (without calling proxy.kill(), just kill it manually), after killing the instance call to vdsClient getStorageDomainsList and you will see.
Anyways, You to verify if you can perform an action by trying to perform it before, and by trying to perform it you try again and again.. sounds tricky, no?
You need to add more tests for the cases you mentioned in the commit message, it sounds like it cover all cases .
.................................................... File vdsm/supervdsm.py Line 66: Line 67: with self._supervdsmProxy.proxyLock: Line 68: try: Line 69: # make sure supervdsmServer works right Line 70: self._supervdsmProxy.isRunning() dont you get into infinite loop when you call ping here and _svdsm is not None? did you check it? Line 71: except: Line 72: self._supervdsmProxy.kill() Line 73: self._supervdsmProxy.launch() Line 74:
Line 83: Line 84: def __init__(self): Line 85: self.proxyLock = threading.Lock() Line 86: self.setIPCPaths(PIDFILE, ADDRESS) Line 87: i prefer that svdsm will try to kill old instance (by reading its pid from pidfile) and launch new instance on __init__, and not in first call. Line 88: def setIPCPaths(self, pidfile, address): Line 89: self.pidfile = pidfile Line 90: self.address = address Line 91:
-- To view, visit http://gerrit.ovirt.org/10236 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib25809d4416f26bc95dc72e7b32b8b2a17a71879 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server