From 822779332e193471a6caa3199f0f618d2aa2c900 Mon Sep 17 00:00:00 2001 From: Sunny Kumar Date: Mon, 17 Dec 2018 14:07:27 +0530 Subject: geo-rep : fix slave volume read-only option Problem: When separate ssh key is given for non root user setting slave volume read-only option results in failure. Solution: Check for extra param in case separate key is given for non-root user and take action accordingly. Change-Id: Iafe9a2aa6b86cde1dcd7d63771048a6ae33c2cde fixes: bz#1659971 Signed-off-by: Sunny Kumar --- extras/hook-scripts/S56glusterd-geo-rep-create-post.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extras') diff --git a/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh b/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh index 5ff68b1b8ae..7d6052315bb 100755 --- a/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh +++ b/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh @@ -98,7 +98,7 @@ if [ -f $pub_file ]; then ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $slave_ip "mv $pub_file_tmp ${pub_file_dname}/${mastervol}_${slavevol}_${pub_file_bname}" ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $slave_ip "gluster system:: copy file /geo-replication/${mastervol}_${slavevol}_common_secret.pem.pub > /dev/null" ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $slave_ip "gluster system:: execute add_secret_pub root geo-replication/${mastervol}_${slavevol}_common_secret.pem.pub > /dev/null" - ssh -p ${SSH_PORT} ${SSH_OPT} $slave_ip "gluster vol set ${slavevol} features.read-only on" + ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $slave_ip "gluster vol set ${slavevol} features.read-only on" fi fi fi -- cgit