Change in vdsm[master]: gluster: Added verbs for read, update, add and remove hooks
avishwan at redhat.com
avishwan at redhat.com
Mon May 20 05:24:48 UTC 2013
Aravinda VK has posted comments on this change.
Change subject: gluster: Added verbs for read, update, add and remove hooks
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File vdsm/gluster/hooks.py
Line 219: raise ge.GlusterHookCheckSumMismatchException(md5Sum, hookMd5Sum)
Line 220:
Line 221: if enable or hookStat[0]:
Line 222: safeWrite(enabledFile, content)
Line 223: os.chmod(enabledFile, stat.S_IXUSR)
To enable permission, use the same method as enableHook.
Line 224: else:
Line 225: safeWrite(disabledFile, content)
Line 226:
Line 227:
Line 253: def hookRemove(glusterCmd, hookLevel, hookName):
Line 254: enabledFile, disabledFile = _getHookFileNames(glusterCmd,
Line 255: hookLevel.lower(),
Line 256: hookName)
Line 257: try:
Use hookStat comparison as used in earlier verb, try delete only if file is available and raise error if fails to remove for both enabled and disabled file.
if hookStat[0]:
try:
# os remove
except:
raise
Line 258: os.remove(enabledFile)
Line 259: except OSError, e:
Line 260: if errno.ENOENT != e.errno:
Line 261: errMsg = "[Errno %s] %s: '%s'" % (e.errno, e.strerror, e.filename)
--
To view, visit http://gerrit.ovirt.org/14145
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie123356209aa0f71176bd06b9c53e0e96211e716
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list