Bug 1261838

Summary: [geo-rep]: Multiple geo-rep session to the same slave is allowed for different users
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rahul Hinduja <rhinduja>
Component: geo-replicationAssignee: Saravanakumar <sarumuga>
Status: CLOSED ERRATA QA Contact: Rahul Hinduja <rhinduja>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.1CC: asrivast, avishwan, chrisw, csaba, nlevinki, sarumuga
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.7.9-5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1294813 (view as bug list) Environment:
Last Closed: 2016-06-23 04:55:11 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: 1294813, 1299184, 1335728, 1336704    

Description Rahul Hinduja 2015-09-10 09:45:02 UTC
Description of problem:
=======================

If the slave volume is part of any geo-rep session, then another attempt to use the same slave volume should be restricted. This is currently allowed if the session is already established as root and another attempt is made using user. 

In this case master volume info file is appended with both the slave entries one with slavehostname and another with <user>@slavehostname.

Now, if any one of the geo-rep session is deleted for example root session. All the session gets deleted.

Version-Release number of selected component (if applicable):
=============================================================

glusterfs-3.7.1-14.el7rhgs.x86_64


How reproducible:
=================

Always

Steps to Reproduce:
===================
1. Create and start geo-rep session between master and slave {root}
2. Create another geo-rep session between same master ans slave using same slave host but with user account {non-root}

Actual results:
===============

Able to create the session


Expected results:
=================

If slave is part of any geo-rep session the subsequent attempt to create different geo-rep session should fail

Comment 3 Aravinda VK 2016-01-13 07:58:05 UTC
Patch sent to Upstream
http://review.gluster.org/#/c/13111/

Comment 5 Mike McCune 2016-03-28 23:32:32 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 6 Aravinda VK 2016-05-13 06:35:08 UTC
Downstream patch sent
https://code.engineering.redhat.com/gerrit/#/c/74262/

Comment 8 Rahul Hinduja 2016-05-28 17:26:26 UTC
Verified with the build: 
glusterfs-geo-replication-3.7.9-6.el7rhgs.x86_64
glusterfs-3.7.9-6.el7rhgs.x86_64

With the latest changes, existing geo-rep session between master and slave can be converted to secure(non-root) or different users. But at any given point in time, only one session between master and slave can be active and hence the existing geo-rep session needs to be stoped before creating with other user. 

Verified the above scenario, which works. Moving the bug to verified state.

Comment 12 errata-xmlrpc 2016-06-23 04:55:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1240