Bug 1340048

Summary: Additional steps required in Non root Geo-replication setup
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Aravinda VK <avishwan>
Component: doc-Administration_GuideAssignee: Divya <divya>
doc-Administration_Guide sub component: Default QA Contact: Rahul Hinduja <rhinduja>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: asriram, asrivast, avishwan, divya, mhideo, nlevinki, rhinduja, rhs-bugs, rwheeler, storage-doc
Version: rhgs-3.1Keywords: ZStream
Target Milestone: ---Flags: divya: needinfo-
Target Release: RHGS 3.1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 14:22:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1311847    

Description Aravinda VK 2016-05-26 11:19:57 UTC
Document URL: https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3.1/html/Administration_Guide/sect-Preparing_to_Deploy_Geo-replication.html#idp10809856

Section Number and Name: 
14.3.4.2. Setting Up your Environment for a Secure Geo-replication Slave

Describe the issue: (step 3)
After the restorecon step, we need to add the following

chgrp -R <GROUP> /var/log/glusterfs/geo-replication-slaves
chgrp -R <GROUP> /var/lib/glusterd/geo-replication
chmod -R 770 /var/lib/glusterd/geo-replication
chmod -R 770 /var/log/glusterfs/geo-replication-slaves


Suggestions for improvement: 

Additional information:

Comment 3 Rahul Hinduja 2016-05-30 17:46:50 UTC
Verified the steps provided in description. The steps mentioned resolves the issue of permission denied.

Comment 5 Divya 2016-06-08 00:22:36 UTC
(In reply to Aravinda VK from comment #0)
> Document URL:
> https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3.1/html/
> Administration_Guide/sect-Preparing_to_Deploy_Geo-replication.
> html#idp10809856
> 
> Section Number and Name: 
> 14.3.4.2. Setting Up your Environment for a Secure Geo-replication Slave
> 
> Describe the issue: (step 3)
> After the restorecon step, we need to add the following
> 
> chgrp -R <GROUP> /var/log/glusterfs/geo-replication-slaves
> chgrp -R <GROUP> /var/lib/glusterd/geo-replication
> chmod -R 770 /var/lib/glusterd/geo-replication
> chmod -R 770 /var/log/glusterfs/geo-replication-slaves
> 
> 
> Suggestions for improvement: 
> 
> Additional information:

Aravinda, need few more inputs/clarifications:

1. Do I need to document these steps as Step 4?

2. Could you please provide information on what these commands do and why should user perform this step.

Thanks!

Comment 6 Aravinda VK 2016-06-08 05:20:57 UTC
(In reply to Divya from comment #5)

> 
> Aravinda, need few more inputs/clarifications:
> 
> 1. Do I need to document these steps as Step 4?
Yes, as Step 4

> 
> 2. Could you please provide information on what these commands do and why
> should user perform this step.
> 
> Thanks!

Non root SSH login is used when Geo-rep is started with non root configuration. Gsyncd at slave side will be started by the non root user, so read write permissions should be enabled for Glusterd workdir and log directories. Following commands allow access for geogroup to access these directories.


chgrp -R <GROUP> /var/log/glusterfs/geo-replication-slaves
chgrp -R <GROUP> /var/lib/glusterd/geo-replication
chmod -R 770 /var/lib/glusterd/geo-replication
chmod -R 770 /var/log/glusterfs/geo-replication-slaves

Example,


chgrp -R geogroup /var/log/glusterfs/geo-replication-slaves
chgrp -R geogroup /var/lib/glusterd/geo-replication
chmod -R 770 /var/lib/glusterd/geo-replication
chmod -R 770 /var/log/glusterfs/geo-replication-slaves

Comment 7 Divya 2016-06-08 06:04:24 UTC
(In reply to Aravinda VK from comment #6)
> (In reply to Divya from comment #5)
> 
> > 
> > Aravinda, need few more inputs/clarifications:
> > 
> > 1. Do I need to document these steps as Step 4?
> Yes, as Step 4
> 
> > 
> > 2. Could you please provide information on what these commands do and why
> > should user perform this step.
> > 
> > Thanks!
> 
> Non root SSH login is used when Geo-rep is started with non root
> configuration. Gsyncd at slave side will be started by the non root user, so
> read write permissions should be enabled for Glusterd workdir and log
> directories. Following commands allow access for geogroup to access these
> directories.
> 
> 
> chgrp -R <GROUP> /var/log/glusterfs/geo-replication-slaves
> chgrp -R <GROUP> /var/lib/glusterd/geo-replication
> chmod -R 770 /var/lib/glusterd/geo-replication
> chmod -R 770 /var/log/glusterfs/geo-replication-slaves
> 
> Example,
> 
> 
> chgrp -R geogroup /var/log/glusterfs/geo-replication-slaves
> chgrp -R geogroup /var/lib/glusterd/geo-replication
> chmod -R 770 /var/lib/glusterd/geo-replication
> chmod -R 770 /var/log/glusterfs/geo-replication-slaves

I have updated the documentation based on your inputs. Please review and let me know if the changes are fine.

Link to the latest doc: http://jenkinscat.gsslab.pnq.redhat.com:8080/view/Gluster/job/doc-Red_Hat_Gluster_Storage-3.1.3-Administration_Guide%20%28html-single%29/lastBuild/artifact/tmp/en-US/html-single/index.html#Setting_Up_the_Environment_for_a_Secure_Geo-replication_Slave

Comment 8 Aravinda VK 2016-06-08 06:33:01 UTC
Doc changes Looks good to me.

Comment 10 Aravinda VK 2016-06-13 07:17:02 UTC
Divya, After discussing with Rahul, we also need to add a note about not using multiple groups for Mountbroker setup. Multiple user accounts can be created but group should be same for all the Non root users.(After 1st point in 14.3.4.2 "Perform the following steps on all the Slave nodes to setup an auxiliary glusterFS mount for the unprivileged account: ")

Comment 11 Divya 2016-06-14 08:57:20 UTC
(In reply to Aravinda VK from comment #10)
> Divya, After discussing with Rahul, we also need to add a note about not
> using multiple groups for Mountbroker setup. Multiple user accounts can be
> created but group should be same for all the Non root users.(After 1st point
> in 14.3.4.2 "Perform the following steps on all the Slave nodes to setup an
> auxiliary glusterFS mount for the unprivileged account: ")

Added the requried Note. Link to the doc: http://jenkinscat.gsslab.pnq.redhat.com:8080/view/Gluster/job/doc-Red_Hat_Gluster_Storage-3.1.3-Administration_Guide%20%28html-single%29/lastBuild/artifact/tmp/en-US/html-single/index.html#Setting_Up_the_Environment_for_a_Secure_Geo-replication_Slave

Comment 12 Rahul Hinduja 2016-06-14 09:04:07 UTC
Awesome, Thanks Divya. Note section looks good to me along with the changes made at step 4. Moving the bz to verified state.