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 <[email protected]>
Gerrit-Reviewer: Aravinda VK <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Bala.FA <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Timothy Asir <[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