Bala.FA has posted comments on this change.
Change subject: gluster: command to create and delete a geo-replication session
......................................................................
Patch Set 12: Code-Review-1
(6 comments)
....................................................
Commit Message
Line 8:
Line 9: geo-replication create first executes the command to create a public key file
which
Line 10: will have public keys of all the hosts of source cluster.Next it pushes the file
to
Line 11: destination cluster and with password less communication geo-replication session
is
Line 12: created.Geo-replication delete deletes a created geo-replication session
You could add comments about the functionality than the logic. something like
This patch adds a feature of geo-replication session create and delete. It exposes two
verbs
* glusterVolumeGeoRepSessionCreate
- This verb sets up session to remote volume of remote gluster cluster for given volume
name.
* glusterVolumeGeoRepSessionDelete
- This verb delete previously created session.
Line 13:
Line 14: Change-Id: If8c979a89ce11a1622819c474b59dcf088733594
....................................................
File client/vdsClientGluster.py
Line 735: '(swift, glusterd, smb, memcached)'
Line 736: )),
Line 737: 'glusterVolumeGeoRepSessionCreate': (
Line 738: serv.do_glusterVolumeGeoRepSessionCreate,
Line 739: ('volName=<master_volume_name> '
Change volName to volumeName everywhere for consistency. Please look into other verbs
Line 740: 'remoteHost=<slave_host_name> '
Line 741: 'remoteVolName=<slave_volume_name> '
Line 742: '[force={yes|no}]\n\t'
Line 743: '<master_volume_name>existing volume name in the master
node\n\t'
....................................................
File vdsm/gluster/cli.py
Line 898: raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)])
Line 899:
Line 900:
Line 901: @makePublic
Line 902: def glusterSystemExecuteGsecCreate():
@makePublic add gluster prefix. So this function becomes
glusterGlusterSystemExecuteGsecCreate(). Please fix it
Line 903: command = _getGlusterSystemCmd() + ["execute",
"gsec_create"]
Line 904: rc, out, err = _execGluster(command)
Line 905: if rc:
Line 906: raise ge.GlusterGeoRepPublicKeyFileCreationFailedException(rc,
Line 905: if rc:
Line 906: raise ge.GlusterGeoRepPublicKeyFileCreationFailedException(rc,
Line 907: out, err)
Line 908: if not os.path.isfile(_publicKeyFilePath):
Line 909: raise ge.GlusterGeoRepPublicKeyFileDoesNotExistException(rc, out, err)
May be GlusterGeoRepPublicKeyFileNotFoundException?
Line 910: else:
Line 911: return True
Line 912:
Line 913:
Line 912:
Line 913:
Line 914: @makePublic
Line 915: def volumeGeoRepSessionCreate(volName, remoteHost, remoteVolName, force=False):
Line 916: glusterSystemExecuteGsecCreate()
Don't call this here. The verb (method in api.py) should take care of calling this
first, then glusterVolumeGeoRepSessionCreate() next.
Line 917: command = _getGlusterVolCmd() + ["geo-replication", volName,
Line 918: "%s::%s" % (remoteHost,
remoteVolName),
Line 919: "create", "push-pem"]
Line 920: try:
....................................................
File vdsm/gluster/vdsmapi-gluster-schema.json
Line 695: #
Line 696: # @volumeName: Gluster volume name
Line 697: #
Line 698: # Returns:
Line 699: # Gluster volume Status
white space cleanup?
Line 700: #
Line 701: # Since: 4.10.3
Line 702: ##
Line 703: {'command': {'class': 'GlusterVolume', 'name':
'status'},
--
To view, visit
http://gerrit.ovirt.org/17644
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If8c979a89ce11a1622819c474b59dcf088733594
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: ndarshan <dnarayan(a)redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan(a)redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: ndarshan <dnarayan(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes