Yaniv Bronhaim has posted comments on this change.

Change subject: svdsm: Remove superfluous unlinks
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(4 inline comments)

....................................................
File vdsm/supervdsm.py
Line 114:     def _cleanOldFiles(self):
Line 115:         self._log.debug("Cleanning svdsm old files: %s, %s",
Line 116:                         self.pidfile, self.timestamp, self.address)
Line 117:         for f in (self.pidfile, self.timestamps):
Line 118:             utils.rmFile(str(f))
if vdsm doesn't remove old socket, who does?
Line 119: 
Line 120:     def _start(self):
Line 121:         self._authkey = str(uuid.uuid4())
Line 122:         self._log.debug("Launching Super Vdsm")


Line 193: 
Line 194:     def launch(self):
Line 195:         self._firstLaunch = False
Line 196:         self._start()
Line 197:         utils.retry(self._connect, Exception, timeout=1)
not related to this patch
Line 198: 
Line 199:     def __getattr__(self, name):
Line 200:         return ProxyCaller(self, name)
Line 201: 


....................................................
File vdsm/supervdsmServer.py
Line 336:     try:
Line 337:         while True:
Line 338:             os.kill(parentPid, 0)
Line 339:             sleep(2)
Line 340:     except Exception:
this is the cause of the bug - you should remove it instead the other one if 
you want to keep the removal as part of supervdsmServer
Line 341:         utils.rmFile(address)
Line 342:         log.debug("Killing SuperVdsm Process")
Line 343:         os.kill(os.getpid(), signal.SIGTERM)
Line 344: 


Line 375: 
Line 376:     log.debug("Creating PID and TIMESTAMP files: %s, %s",
Line 377:               pidfile, timestamp)
Line 378:     spid = os.getpid()
Line 379:     with open(pidfile, "w") as f:
i think you should keep the try scope to report about errors like IOError here
Line 380:         f.write(str(spid) + "\n")
Line 381:     with open(timestamp, "w") as f:
Line 382:         f.write(str(misc.getProcCtime(spid) + "\n"))
Line 383: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6c3e1968666a34fdfc4b9df8d8c320bcc82c47ca
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to