Change in vdsm[master]: superVdsm: create dir '/var/run/vdsm' before creating pid fi...

ybronhei at redhat.com ybronhei at redhat.com
Mon Jul 15 08:43:12 UTC 2013


Yaniv Bronhaim has posted comments on this change.

Change subject: superVdsm: create dir '/var/run/vdsm' before creating pid file
......................................................................


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

(4 inline comments)

....................................................
Commit Message
Line 3: AuthorDate: 2013-07-15 00:42:35 -0400
Line 4: Commit:     Mark Wu <wudxw at linux.vnet.ibm.com>
Line 5: CommitDate: 2013-07-15 03:05:42 -0400
Line 6: 
Line 7: superVdsm: create dir '/var/run/vdsm' before creating pid file
the folder is created during the vdsm rpm installation (vdsm.spec.in line 988), if not it should be fixed there. 
there is not need to check the existence of this folder, as we don't check other working folders (e.g. /var/log/vdsm)
Line 8: 
Line 9: The directory '/var/run/vdsm' is created by the init script of vdsmd,
Line 10: but supervdsmd should run before vdsmd. So supervdsmd should ensure
Line 11: the direcotry '/var/run/vdsm' exist by itself, otherwise it will fail


....................................................
File vdsm/supervdsmServer.py
Line 340:     run_dir = P_VDSM_RUN
Line 341:     createdir(run_dir)
Line 342:     chown(run_dir, VDSM_USER, VDSM_GROUP)
Line 343:     selinux.restorecon(run_dir)
Line 344: 
this is not the responsibility of this module
Line 345: 
Line 346: def main():
Line 347:     def bind(func):
Line 348:         def wrapper(_SuperVdsm, *args, **kwargs):


Line 391:             servThread = threading.Thread(target=server.serve_forever)
Line 392:             servThread.setDaemon(True)
Line 393:             servThread.start()
Line 394: 
Line 395:             chown(address, VDSM_USER, VDSM_GROUP)
I prefer to use uid and not use the user name.
Line 396: 
Line 397:             log.debug("Started serving super vdsm object")
Line 398: 
Line 399:             threading.Thread(target=sourceRouteThread.subscribeToInotifyLoop(),


Line 392:             servThread.setDaemon(True)
Line 393:             servThread.start()
Line 394: 
Line 395:             chown(address, VDSM_USER, VDSM_GROUP)
Line 396: 
although, the use of VDSM_GROUP seems right, you can submit it in separate patch.
Line 397:             log.debug("Started serving super vdsm object")
Line 398: 
Line 399:             threading.Thread(target=sourceRouteThread.subscribeToInotifyLoop(),
Line 400:                              name='sourceRoute').start()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I23b4e6184fcf60383938bca71643c5b177c94f27
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list