summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/src/Makefile.am4
-rw-r--r--geo-replication/src/peer_add_secret_pub.in2
-rwxr-xr-xgeo-replication/src/peer_gsec_create.in16
-rwxr-xr-xgeo-replication/src/set_geo_rep_pem_keys.sh4
-rw-r--r--geo-replication/syncdaemon/configinterface.py.in (renamed from geo-replication/syncdaemon/configinterface.py)10
5 files changed, 15 insertions, 21 deletions
diff --git a/geo-replication/src/Makefile.am b/geo-replication/src/Makefile.am
index 20b5b6bde6b..68b18c66e88 100644
--- a/geo-replication/src/Makefile.am
+++ b/geo-replication/src/Makefile.am
@@ -1,4 +1,3 @@
-
gsyncddir = $(libexecdir)/glusterfs
gsyncd_SCRIPTS = gverify.sh peer_add_secret_pub peer_gsec_create set_geo_rep_pem_keys.sh
@@ -11,8 +10,7 @@ gsyncd_PROGRAMS = gsyncd
gsyncd_SOURCES = gsyncd.c procdiggy.c
-gsyncd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(GF_GLUSTERFS_LIBS)
+gsyncd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
gsyncd_LDFLAGS = $(GF_LDFLAGS)
diff --git a/geo-replication/src/peer_add_secret_pub.in b/geo-replication/src/peer_add_secret_pub.in
index 122e577b446..97011f204d2 100644
--- a/geo-replication/src/peer_add_secret_pub.in
+++ b/geo-replication/src/peer_add_secret_pub.in
@@ -30,4 +30,4 @@ if [ ! -d $home_dir/.ssh/authorized_keys ]; then
chown $user: $home_dir/.ssh/authorized_keys;
fi
-cat "$GLUSTERD_WORKING_DIR"/geo-replication/common_secret.pem.pub >> $home_dir/.ssh/authorized_keys;
+cat "$GLUSTERD_WORKDIR"/geo-replication/common_secret.pem.pub >> $home_dir/.ssh/authorized_keys;
diff --git a/geo-replication/src/peer_gsec_create.in b/geo-replication/src/peer_gsec_create.in
index a39fdbfb5f7..9cadce56453 100755
--- a/geo-replication/src/peer_gsec_create.in
+++ b/geo-replication/src/peer_gsec_create.in
@@ -3,16 +3,16 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-if [ ! -f "$GLUSTERD_WORKING_DIR"/geo-replication/secret.pem.pub ]; then
- \rm -rf "$GLUSTERD_WORKING_DIR"/geo-replication/secret.pem*
- ssh-keygen -N '' -f "$GLUSTERD_WORKING_DIR"/geo-replication/secret.pem > /dev/null
+if [ ! -f "$GLUSTERD_WORKDIR"/geo-replication/secret.pem.pub ]; then
+ \rm -rf "$GLUSTERD_WORKDIR"/geo-replication/secret.pem*
+ ssh-keygen -N '' -f "$GLUSTERD_WORKDIR"/geo-replication/secret.pem > /dev/null
fi
-if [ ! -f "$GLUSTERD_WORKING_DIR"/geo-replication/tar_ssh.pem.pub ]; then
- \rm -rf "$GLUSTERD_WORKING_DIR"/geo-replication/tar_ssh.pem*
- ssh-keygen -N '' -f "$GLUSTERD_WORKING_DIR"/geo-replication/tar_ssh.pem > /dev/null
+if [ ! -f "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem.pub ]; then
+ \rm -rf "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem*
+ ssh-keygen -N '' -f "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem > /dev/null
fi
-output1=`echo command=\"${exec_prefix}/libexec/glusterfs/gsyncd\" " "``cat "$GLUSTERD_WORKING_DIR"/geo-replication/secret.pem.pub`
-output2=`echo command=\"tar \$\{SSH_ORIGINAL_COMMAND#* \}\" " "``cat "$GLUSTERD_WORKING_DIR"/geo-replication/tar_ssh.pem.pub`
+output1=`echo command=\"${exec_prefix}/libexec/glusterfs/gsyncd\" " "``cat "$GLUSTERD_WORKDIR"/geo-replication/secret.pem.pub`
+output2=`echo command=\"tar \$\{SSH_ORIGINAL_COMMAND#* \}\" " "``cat "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem.pub`
echo -e "$output1\n$output2"
diff --git a/geo-replication/src/set_geo_rep_pem_keys.sh b/geo-replication/src/set_geo_rep_pem_keys.sh
index 7a7bcad25c2..7b825693fad 100755
--- a/geo-replication/src/set_geo_rep_pem_keys.sh
+++ b/geo-replication/src/set_geo_rep_pem_keys.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Script to copy the pem keys from the user's home directory
-# to $GLUSTERD_WORKING_DIR/geo-replication/ and then copy
+# to $GLUSTERD_WORKDIR/geo-replication and then copy
# the keys to other nodes in the cluster and add them to the
# respective authorized keys. The script takes as argument the
# user name and assumes that the user will be present in all
@@ -28,7 +28,7 @@ function main()
fi
if [ -f $home_dir/common_secret.pem.pub ]; then
- cp $home_dir/common_secret.pem.pub /var/lib/glusterd/geo-replication/
+ cp $home_dir/common_secret.pem.pub ${GLUSTERD_WORKDIR}/geo-replication/
gluster system:: copy file /geo-replication/common_secret.pem.pub
gluster system:: execute add_secret_pub $user
else
diff --git a/geo-replication/syncdaemon/configinterface.py b/geo-replication/syncdaemon/configinterface.py.in
index a94e07f0d4b..acb51486a10 100644
--- a/geo-replication/syncdaemon/configinterface.py
+++ b/geo-replication/syncdaemon/configinterface.py.in
@@ -36,7 +36,7 @@ CONFIGS = (
("peersrx . .",
"georep_session_working_dir",
"",
- "/var/lib/glusterd/geo-replication/${mastervol}_${remotehost}_"
+ "@GLUSTERD_WORKDIR@/geo-replication/${mastervol}_${remotehost}_"
"${slavevol}/"),
("peersrx .",
"gluster_params",
@@ -46,7 +46,7 @@ CONFIGS = (
"ssh_command_tar",
"",
"ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no "
- "-i /var/lib/glusterd/geo-replication/tar_ssh.pem"),
+ "-i @GLUSTERD_WORKDIR@/geo-replication/tar_ssh.pem"),
("peersrx . .",
"changelog_log_file",
"",
@@ -54,11 +54,7 @@ CONFIGS = (
"/${eSlave}${local_id}-changes.log"),
("peersrx . .",
"working_dir",
- "/var/run/gluster/${mastervol}/${eSlave}",
- "${iprefix}/lib/misc/glusterfsd/${mastervol}/${eSlave}"),
- ("peersrx . .",
- "working_dir",
- "/usr/local/var/run/gluster/${mastervol}/${eSlave}",
+ "@localstatedir@/run/gluster/${mastervol}/${eSlave}",
"${iprefix}/lib/misc/glusterfsd/${mastervol}/${eSlave}"),
)