summaryrefslogtreecommitdiffstats
path: root/geo-replication/src
diff options
context:
space:
mode:
authorHarpreet Kaur <hlalwani@redhat.com>2018-11-28 14:06:36 +0530
committerKotresh HR <khiremat@redhat.com>2018-12-07 09:37:54 +0000
commit6e92171117c73d7a8901800299446a131e54b597 (patch)
tree4126ee676672096927373ca9a459420e93b452a7 /geo-replication/src
parent916df2c12b19ac84b7806d31226d7f832ca7e2bb (diff)
geo-rep: Make slave volume read-only (by default)
Added a command to set "features.read-only" option to a default value "on" for slave volume. Changes are made in: $SRC//extras/hook-scripts/S56glusterd-geo-rep-create-post.sh for root geo-rep and $SRC/geo-replication/src/set_geo_rep_pem_keys.sh for non-root geo-rep. Fixes: bz#1654187 Change-Id: I15beeae3506f3f6b1dcba0a5c50b6344fd468c7c Signed-off-by: Harpreet Kaur <hlalwani@redhat.com>
Diffstat (limited to 'geo-replication/src')
-rwxr-xr-xgeo-replication/src/set_geo_rep_pem_keys.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/geo-replication/src/set_geo_rep_pem_keys.sh b/geo-replication/src/set_geo_rep_pem_keys.sh
index ae23f4ff0c6..8a43fa39d1f 100755
--- a/geo-replication/src/set_geo_rep_pem_keys.sh
+++ b/geo-replication/src/set_geo_rep_pem_keys.sh
@@ -47,6 +47,7 @@ function main()
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 geo-replication/${master_vol}_${slave_vol}_common_secret.pem.pub
+ gluster vol set ${slave_vol} features.read-only on
else
echo "$home_dir/common_secret.pem.pub not present. Please run geo-replication command on master with push-pem option to generate the file"
exit 1;