Bug 1226223

Summary: Mount broker user add command removes existing volume for a mountbroker user when second volume is attached to same user
Product: [Community] GlusterFS Reporter: Darshan <dnarayan>
Component: geo-replicationAssignee: Kotresh HR <khiremat>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: avishwan, bugs, gluster-bugs, khiremat
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1226233 1234869 1235428 (view as bug list) Environment:
Last Closed: 2016-06-16 13:06:19 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: 1226233, 1234869, 1235428    

Description Darshan 2015-05-29 09:01:53 UTC
Description of problem:
Mount broker user add command(gluster system:: execute mountbroker user geoaccount slavevol) removes existing volume for a mountbroker user when second volume is attached to the same mount broker user.

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


How reproducible:
Always

Steps to Reproduce:
1.Add a volume to a mount broker user using the above mentioned command.
2.Add another volume to same mount broker user using command.
3.

Actual results:
The volume added first is removed from the volfile

Expected results:
The volume added second must be appended to the existing list of volumes for a mount broker user.

Additional info:

Comment 1 Anand Avati 2015-06-24 18:59:10 UTC
REVIEW: http://review.gluster.org/11385 (geo-rep: Fix add user in mountbroker user management) posted (#1) for review on master by Kotresh HR (khiremat)

Comment 2 Anand Avati 2015-06-25 08:25:36 UTC
REVIEW: http://review.gluster.org/11385 (geo-rep: Fix add user in mountbroker user management) posted (#2) for review on master by Kotresh HR (khiremat)

Comment 3 Anand Avati 2015-06-26 09:43:49 UTC
REVIEW: http://review.gluster.org/11424 (doc/admin-guide: Document new CLI in mountbroker user management) posted (#2) for review on master by Kotresh HR (khiremat)

Comment 4 Anand Avati 2015-06-26 12:42:11 UTC
COMMIT: http://review.gluster.org/11385 committed in master by Venky Shankar (vshankar) 
------
commit 3925f5cf33df85807db812211552fc16c7850d0d
Author: Kotresh HR <khiremat>
Date:   Thu Jun 25 00:18:01 2015 +0530

    geo-rep: Fix add user in mountbroker user management
    
    The CLI 'gluster system:: execute mountbroker user <USERNAME> <VOLUMES>'
    to set volumes associated with a user replaces existing user and associated
    volumes upon setting with existing user. This patch fixes it by appending
    the volumes if the user already exists.
    
    It also introduces following CLI to remove volume for a corresponding user.
    
    'gluster system:: execute mountbroker volumedel <USERNAME> <VOLUME>'
    <USERNAME>: username
    <VOLUME>: comman separated list of volumes to delete
    
    If it is the last volume to be deleted associated with the user,
    it will delete the user as well as it doesn't make sense to keep
    only user without volumes associated.
    
    Change-Id: I49f4b9279954d9f5d34aca2dd8a69c6f4b87fd19
    BUG: 1226223
    Signed-off-by: Kotresh HR <khiremat>
    Reviewed-on: http://review.gluster.org/11385
    Reviewed-by: darshan n <dnarayan>
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-by: Aravinda VK <avishwan>

Comment 5 Nagaprasad Sathyanarayana 2015-10-25 15:14:16 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 6 Niels de Vos 2016-06-16 13:06: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-3.8.0, please open a new bug report.

glusterfs-3.8.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] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user