Yaniv Bronhaim has posted comments on this change. Change subject: svdsm validation of recovery after crash ......................................................................
Patch Set 14: (3 inline comments) .................................................... File tests/superVdsmTests.py Line 5: Line 6: Line 7: class TestSuperVdsm(TestCaseBase): Line 8: Line 9: def checkSudoer(f): the decorator there does something else.. it gets cmd to run, i just want to verify if i can perform sudo command without enter password, so here i run 'sudo ls' command and if it works i move on. otherwise, i can't execute svdsm Line 10: p = subprocess.Popen(['sudo', '-l', '-n', 'ls'], Line 11: stdin=subprocess.PIPE, stdout=subprocess.PIPE, Line 12: stderr=subprocess.PIPE) Line 13: out, err = p.communicate() .................................................... File vdsm/supervdsm.py Line 74: return callMethod() Line 75: # handling internal exception that we raise to identify supervdsm Line 76: # validation. only this exception can cause kill! Line 77: except AuthenticationError: Line 78: self._supervdsmProxy.kill() i want to perform the same __call__ function again with same arguments, it will initiate svdsm and try to call the same method again. i'll change it. Line 79: return callMethod() Line 80: Line 81: Line 82: class SuperVdsmProxy(object): Line 115: with open(self.pidfile, "r") as f: Line 116: spid = int(f.read().strip()) Line 117: with open(self.timestamp, "r") as f: Line 118: createdTime = f.read().strip() Line 119: pTime = str(misc.getProcCtime(spid)) you right.. Line 120: Line 121: if pTime == createdTime: Line 122: return True Line 123: -- To view, visit http://gerrit.ovirt.org/7901 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idad4a622b82259b777851d1b0c1b37ec8da2b01e Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Barak Azulay <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Eduardo <[email protected]> Gerrit-Reviewer: Igor Lvovsky <[email protected]> Gerrit-Reviewer: Royce Lv <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Shu Ming <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Yeela Kaplan <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
