diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2018-12-17 14:07:27 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-12-17 17:21:51 +0000 |
commit | 822779332e193471a6caa3199f0f618d2aa2c900 (patch) | |
tree | 2ddfd830263c17a510d709638df2fba1a396310f /extras | |
parent | c228f0c2d94c028619088c07b66f88488f7c3335 (diff) |
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 <sunkumar@redhat.com>
Diffstat (limited to 'extras')
-rwxr-xr-x | extras/hook-scripts/S56glusterd-geo-rep-create-post.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 |