Change in vdsm[master]: supervdsmServer is down after failed operation

ybronhei at redhat.com ybronhei at redhat.com
Tue Oct 2 13:38:55 UTC 2012


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 <ybronhei at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>


More information about the vdsm-patches mailing list