Yaniv Bronhaim has posted comments on this change.

Change subject: supervdsmServer is down after failed operation
......................................................................


Patch Set 12: (2 inline comments)

....................................................
File vdsm/supervdsm.py
Line 79:     """
Line 80:     A wrapper around all the supervdsm init stuff
Line 81:     """
Line 82:     _log = logging.getLogger("SuperVdsmProxy")
Line 83:     pidfile = PIDFILE
you are right, but this is too complex now... is it mandatory?
Line 84:     tsfile = TIMESTEMP
Line 85: 
Line 86:     def open(self, *args, **kwargs):
Line 87:         return self._manager.open(*args, **kwargs)


Line 107:         try:
Line 108:             with open(self.pidfile, "r") as f:
Line 109:                 spid = int(f.read().strip())
Line 110:             with open(self.tsfile, "r") as f:
Line 111:                 createdTime = f.read().strip()
the pid file creation is delayed in few milliseconds from the real process 
creation (create the file, writing to it and inc). we prefer to write the exact 
time to external file to be more strict
Line 112:                 pTime = str(misc.getProcCtime(spid))
Line 113: 
Line 114:             if pTime == createdTime:
Line 115:                 return True


--
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: 12
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

Reply via email to