Change in vdsm[master]: gluster: Adds new verbs to setup gluster geo-replication.

barumuga at redhat.com barumuga at redhat.com
Wed Mar 11 16:08:52 UTC 2015


Bala.FA has posted comments on this change.

Change subject: gluster: Adds new verbs to setup gluster geo-replication.
......................................................................


Patch Set 5: Code-Review-1

(2 comments)

If you see this patch is applicable for newer glusterfs, please wait for the release, till then mark it as -1

https://gerrit.ovirt.org/#/c/38228/5/vdsm/gluster/api.py
File vdsm/gluster/api.py:

Line 99: GlusterGeoRepPublicKeyWriteFailedException
No 'e' available here


Line 116: raise
You haven't taken the rsa/dsa keys in the comparison.  The above thing would be simpler by

existingKeyLines = []
newKeys = [l.split()[1] for l in geoRepPubKeys]
newKeyDict = dict(zap(newKeys, geoRepPubKeys))

try:
    if os.path.exists(authKeys):
        with open(authKeys) as f:
            existingKeyLines = f.readlines()

    existingKeys = [l.split()[1] for l in existingKeyLines]

    outLines = existingKeyLines
    outKeys = set(newKeyDict).difference(set(existingKeyDict))
    outLines.append([newKeyDict[k] for k in outKeys])

    safeWrite(authKeys, '\n'.join(outLines))
    os.chmod(authKeys, 0600)
    os.chown(authKeys, uid, gid)
except IOError as e:
    raise ge.GlusterGeoRepPublicKeyWriteFailedException(err=[str(e)])


-- 
To view, visit https://gerrit.ovirt.org/38228
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I06a64b8f0db8846ca2697b9f0ec69cab2d3d6b1e
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list