Change in vdsm[master]: Adding check of os.access to vdsm log file during startup

shuming at linux.vnet.ibm.com shuming at linux.vnet.ibm.com
Wed Dec 12 14:56:45 UTC 2012


Shu Ming has posted comments on this change.

Change subject: Adding check of os.access to vdsm log file during startup
......................................................................


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

(1 inline comment)

....................................................
File vdsm/vdsm
Line 120: 
Line 121: 
Line 122: def __assertVdsmUser():
Line 123:     username = getpass.getuser()
Line 124:     if username != constants.VDSM_USER:
Do you have a specific reason to replace assert with a if condition check here?  assert only effect in when python built-in variable __debug__ is true. However, the if condition effect in any case. So they are different.
Line 125:         syslog.syslog("VDSM failed to start: running user is not %s, trying "
Line 126:                       "to run from user %s" % (constants.VDSM_USER, username))
Line 127:         sys.exit(1)
Line 128:     group = grp.getgrnam(constants.VDSM_GROUP)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I578bdfaa199afc2d5f154a1de12241e02b1ca1a4
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list