Hello Bala.FA,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/17644

to review the following change.

Change subject: gluster: command to create a public key file
......................................................................

gluster: command to create a public key file

This executes the command to create a public key file
which will have public keys of all the hosts of source cluster.
This is needed for password-less communication between
slave cluster hosts during geo-replication

Change-Id: If8c979a89ce11a1622819c474b59dcf088733594
Signed-off-by: ndarshan <[email protected]>
---
M vdsm/gluster/cli.py
M vdsm/gluster/exception.py
2 files changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/17644/1

diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index bac6d1c..64529ae 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -897,3 +897,12 @@
         return _parseVolumeProfileInfo(xmltree, nfs)
     except _etreeExceptions:
         raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)])
+
+@makePublic
+def createPublicKeyFile():
+    command = _getGlusterSystemCmd() + ["execute", "gsec_create"]
+    rc, out, err = _execGluster(command)
+    if rc:
+        raise ge.GlusterGeoRepPublicKeyFileCreationFailedException(rc, out, 
err)
+    else:
+       return True
diff --git a/vdsm/gluster/exception.py b/vdsm/gluster/exception.py
index c569a9e..1ee73bb 100644
--- a/vdsm/gluster/exception.py
+++ b/vdsm/gluster/exception.py
@@ -484,3 +484,14 @@
         prefix = "%s: " % (action)
         self.message = prefix + "Service action is not supported"
         self.err = [self.message]
+
+#geo-replication
+class GlusterGeoRepException(GlusterException):
+    code = 4560
+    message = "Gluster Geo-Replication Exception"
+
+ 
+class 
GlusterGeoRepPublicKeyFileCreationFailedException(GlusterGeoRepException):
+    code = 4561
+    message = "Creation of public key file failed"
+


-- 
To view, visit http://gerrit.ovirt.org/17644
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8c979a89ce11a1622819c474b59dcf088733594
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: ndarshan <[email protected]>
Gerrit-Reviewer: Bala.FA <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to