Bug 1654187 - [geo-rep]: RFE - Make slave volume read-only while setting up geo-rep (by default)
Summary: [geo-rep]: RFE - Make slave volume read-only while setting up geo-rep (by def...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: geo-replication
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1643370
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-28 08:28 UTC by Harpreet Kaur Lalwani
Modified: 2019-03-25 16:32 UTC (History)
9 users (show)

Fixed In Version: glusterfs-6.0
Doc Type: Enhancement
Doc Text:
Clone Of: 1643370
Environment:
Last Closed: 2019-03-25 16:32:19 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 21739 0 None Merged geo-rep: Make slave volume read-only (by default) 2018-12-07 09:38:31 UTC

Comment 1 Worker Ant 2018-11-28 08:54:52 UTC
REVIEW: https://review.gluster.org/21739 (geo-rep: Make slave volume read-only (by default)) posted (#1) for review on master by Harpreet Kaur Lalwani

Comment 2 Kotresh HR 2018-11-28 09:00:18 UTC
Description of problem:
=======================
As of now, if we want to make a volume as read-only, we need to specify the volume option and enable it using:

gluster volume set <volume_name> features.read-only on

In geo-rep, the main idea is to write to the master and that is synced to the slave. Since writes should not happen from the slave, it is good to make the slave as read-only by default to avoid mishaps.

In the event of a failover/failback scenario where the slave is made the master and writes need to happen from the slave, this read-only option should simply be disabled (along with enabling the other options which enable the slave volume to sync to the original master)


This can be easily done during create command.

Just have to add the below command in hookscript

gluster vol set <slave_vol> features.read-only on 

For root geo-rep:

$SRC//extras/hook-scripts/S56glusterd-geo-rep-create-post.sh for root geo-rep


For non-root geo-rep:

$SRC/geo-replication/src/set_geo_rep_pem_keys.sh

Comment 3 Worker Ant 2018-12-07 09:38:27 UTC
REVIEW: https://review.gluster.org/21739 (geo-rep: Make slave volume read-only (by default)) posted (#8) for review on master by Kotresh HR

Comment 5 Shyamsundar 2019-03-25 16:32:19 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-6.0, please open a new bug report.

glusterfs-6.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2019-March/000120.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.