ndarshan has posted comments on this change. Change subject: gluster: command to create and delete a geo-replication session ......................................................................
Patch Set 10: (9 comments) .................................................... Commit Message Line 3: AuthorDate: 2013-08-05 09:59:19 +0530 Line 4: Commit: ndarshan <[email protected]> Line 5: CommitDate: 2013-08-20 14:21:08 +0530 Line 6: Line 7: gluster Geo-replication: command to create and delete a geo-replication session I will change the prefix, I feel that both create and delete are almost similar and delete is very small, and this patch has dependency on one more patch, so to avoid the overhead its better to have a single patch 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 .................................................... File client/vdsClientGluster.py Line 440: Line 441: def do_glusterVolumeGeoRepDelete(self, args): Line 442: params = self._eqSplit(args) Line 443: try: Line 444: masterVolName = params.get('masterVolName', '') Done Line 445: slaveHost = params.get('slaveHost', '') Line 446: slaveVolName = params.get('slaveVolName', '') Line 447: except: Line 448: raise ValueError Line 442: params = self._eqSplit(args) Line 443: try: Line 444: masterVolName = params.get('masterVolName', '') Line 445: slaveHost = params.get('slaveHost', '') Line 446: slaveVolName = params.get('slaveVolName', '') Done Line 447: except: Line 448: raise ValueError Line 449: if not (masterVolName and slaveHost and slaveVolName): Line 450: raise ValueError .................................................... File vdsm/gluster/api.py Line 287: status = self.svdsmProxy.glusterServicesGet(serviceNames) Line 288: return {'services': status} Line 289: Line 290: @exportAsVerb Line 291: def volumeGeoRepCreate(self, masterVolName, slaveHost, I have changed the verb name, master/slave volume to volume/remotevolume. but checking passwordless-ssh could not be done as argument fingerprint is not available. Line 292: slaveVolName, force=False, options=None): Line 293: status = self.svdsmProxy.glusterVolumeGeoRepCreate(masterVolName, Line 294: slaveHost, Line 295: slaveVolName, Line 292: slaveVolName, force=False, options=None): Line 293: status = self.svdsmProxy.glusterVolumeGeoRepCreate(masterVolName, Line 294: slaveHost, Line 295: slaveVolName, Line 296: force=False) Done Line 297: return {'geo-rep': status} Line 298: Line 299: @exportAsVerb Line 300: def volumeGeoRepDelete(self, masterVolName, slaveHost, Line 296: force=False) Line 297: return {'geo-rep': status} Line 298: Line 299: @exportAsVerb Line 300: def volumeGeoRepDelete(self, masterVolName, slaveHost, Done Line 301: slaveVolName, options=None): Line 302: status = self.svdsmProxy.glusterVolumeGeoRepDelete(masterVolName, Line 303: slaveHost, Line 304: slaveVolName) .................................................... File vdsm/gluster/cli.py Line 905: if rc: Line 906: raise ge.GlusterGeoRepPublicKeyFileCreationFailedException(rc, Line 907: out, err) Line 908: path = out.partition('/') Line 909: if not os.path.isfile('/' + path): 1. I felt that this function is consumed only by volumeGeoRepCreate so I did not make it public,now I have made this function one-to-mapping. 2. I will return the well known path. Regarding xml output, since "gluster system:: execute gsec_create" command is task oriented i believe the output is not of that value. If you still want me to raise a bug i will do it. Line 910: raise ge.GlusterGeoRepPublicKeyFileDoesNotExistException(rc, out, err) Line 911: else: Line 912: return True Line 913: .................................................... File vdsm/gluster/exception.py Line 491: code = 4560 Line 492: message = "Gluster Geo-Replication Exception" Line 493: Line 494: Line 495: class GlusterGeoRepPublicKeyFileCreateFailedException(GlusterGeoRepException Done Line 496: ): Line 497: code = 4561 Line 498: message = "Creation of public key file failed" Line 499: Line 497: code = 4561 Line 498: message = "Creation of public key file failed" Line 499: Line 500: Line 501: class GlusterGeoRepPublicKeyFileDoesNotExistException(GlusterGeoRepException): Now i have made the glusterSystemExecuteGsecCreate function to use the well known path, so i feel checking if the file exists and raising an error is necessary as gluster cli may change the location of the file some day or the file may not be created because of some issue. Line 502: code = 4562 Line 503: message = "Public key file does not exist" Line 504: Line 505: -- 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: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ndarshan <[email protected]> Gerrit-Reviewer: Aravinda VK <[email protected]> Gerrit-Reviewer: Bala.FA <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Timothy Asir <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: ndarshan <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
