Bug 1095971 - Stopping/Starting a Gluster volume resets ownership
Summary: Stopping/Starting a Gluster volume resets ownership
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
: 1092620 (view as bug list)
Depends On: 1040275
Blocks: glusterfs-3.5.1
TreeView+ depends on / blocked
 
Reported: 2014-05-09 01:18 UTC by Niels de Vos
Modified: 2014-09-17 21:43 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.5.1beta
Doc Type: Bug Fix
Doc Text:
Clone Of: 1040275
Environment:
Last Closed: 2014-06-24 11:05:14 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Niels de Vos 2014-05-09 01:18:29 UTC
+++ This bug was initially created as a clone of Bug #1040275 +++

+++ This bug was initially created as a clone of Bug #1040211 +++

Description of problem:
We have noticed that if you stop and start a Gluster volume the ownership of the mount reverts to root/root.

For example:

On a client machine with the volume mounted as "environments" we see:
drwxr-xr-x 30 pe-puppet pe-puppet 4096 Dec  2 10:18 environments

We then stop and start the volume on the storage server:
[root@rhs-001 d11]# gluster volume stop puppet-env
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
volume stop: puppet-env: success
[root@rhs-001 d11]# gluster volume start puppet-env
volume start: puppet-env: success

Immediately after we look at the mount point again and see:
drwxr-xr-x 30 root      root      4096 Dec  2 10:18 environments

This is obviously quite high impact as applications expect their volumes to have certain ownership.

Version-Release number of selected component (if applicable):
glusterfs-3.4.0.33rhs-1.el6_4.x86_64

How reproducible:
100%

Steps to Reproduce:
1. [root@unused-9-68 ~]# mount -t nfs  unused-9-37:/rep_test1 /mnt
2. [root@unused-9-68 ~]# chown fred.fred /mnt/
3. [root@unused-9-68 ~]# ls -ld /mnt/
drwxr-xr-x 4 fred fred 8192 Nov  6 15:56 /mnt/
4. [root@unused-9-37 ~]# gluster volume stop rep_test1
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
volume stop: rep_test1: success
5. [root@unused-9-37 ~]# gluster volume start rep_test1
volume start: rep_test1: success
6. [root@unused-9-68 ~]# ls -ld /mnt/
drwxr-xr-x 4 root root 8192 Nov  6 15:56 /mnt/

Actual results:
Ownership changes

Expected results:
Ownership should not change.

--- Additional comment from Gowrishankar Rajaiyan on 2013-12-10 23:08:35 EST ---

We have storage.owner-uid and storage.owner-gid volume options. Does that help ?

--- Additional comment from Anand Avati on 2013-12-11 00:40:40 EST ---

Ironically, this is a bug introduced by the patch which implemented storage.owner-uid/gid option.

--- Additional comment from Anand Avati on 2013-12-11 06:44:19 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#1) for review on master by Anand Avati (avati)

--- Additional comment from Anand Avati on 2013-12-11 06:50:30 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#2) for review on master by Anand Avati (avati)

--- Additional comment from Anand Avati on 2013-12-11 06:52:42 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#3) for review on master by Anand Avati (avati)

--- Additional comment from Anand Avati on 2013-12-11 07:24:52 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#4) for review on master by Anand Avati (avati)

--- Additional comment from Anand Avati on 2013-12-11 15:58:32 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#5) for review on master by Anand Avati (avati)

--- Additional comment from Anand Avati on 2013-12-11 16:44:07 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#6) for review on master by Anand Avati (avati)

--- Additional comment from Anand Avati on 2013-12-11 17:01:32 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#7) for review on master by Anand Avati (avati)

--- Additional comment from Anand Avati on 2013-12-11 19:27:09 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#8) for review on master by Anand Avati (avati)

--- Additional comment from Anand Avati on 2013-12-12 04:06:54 CET ---

REVIEW: http://review.gluster.org/6476 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#9) for review on master by Anand Avati (avati)

--- Additional comment from Lukas Bezdicka on 2013-12-12 10:15:14 CET ---

Happens also on 3.4.1

--- Additional comment from Anand Avati on 2013-12-13 08:50:00 CET ---

COMMIT: http://review.gluster.org/6476 committed in master by Vijay Bellur (vbellur) 
------
commit 8bdc329e892f35ca19dfd07b542aa81afd855fce
Author: Anand Avati <avati>
Date:   Tue Dec 10 14:28:22 2013 -0800

    posix: if brick-uid or brick-gid is not specified, do not set
    
    Current code would set owner uid/gid explicitly to 0/0 on start
    even if none was specified. Fix it.
    
    Change-Id: I72dec9e79c51bd1eb3af5334c42b7c23b01d0258
    BUG: 1040275
    Signed-off-by: Anand Avati <avati>
    Reviewed-on: http://review.gluster.org/6476
    Tested-by: Gluster Build System <jenkins.com>
    Tested-by: Lukáš Bezdička <lukas.bezdicka>
    Reviewed-by: Krishnan Parthasarathi <kparthas>
    Reviewed-by: Vijay Bellur <vbellur>

--- Additional comment from Anand Avati on 2013-12-16 19:21:19 CET ---

REVIEW: http://review.gluster.org/6519 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#1) for review on release-3.4 by Vijay Bellur (vbellur)

--- Additional comment from Anand Avati on 2013-12-17 08:15:32 CET ---

COMMIT: http://review.gluster.org/6519 committed in release-3.4 by Vijay Bellur (vbellur) 
------
commit 046cb49f20476ed900ae6dbe6f6ab7fad53d71a9
Author: Anand Avati <avati>
Date:   Tue Dec 10 14:28:22 2013 -0800

    posix: if brick-uid or brick-gid is not specified, do not set
    
    Current code would set owner uid/gid explicitly to 0/0 on start
    even if none was specified. Fix it.
    
    Change-Id: I72dec9e79c51bd1eb3af5334c42b7c23b01d0258
    BUG: 1040275
    Signed-off-by: Anand Avati <avati>
    Reviewed-on: http://review.gluster.org/6476
    Tested-by: Gluster Build System <jenkins.com>
    Tested-by: Lukáš Bezdička <lukas.bezdicka>
    Reviewed-by: Krishnan Parthasarathi <kparthas>
    Reviewed-by: Vijay Bellur <vbellur>
    Reviewed-on: http://review.gluster.org/6519
    Reviewed-by: Lukáš Bezdička <lukas.bezdicka>

--- Additional comment from Niels de Vos on 2014-04-17 15:15:13 CEST ---

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.4.3, please reopen this bug report.

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

The fix for this bug likely to be included in all future GlusterFS releases i.e. release > 3.4.3. In the same line the recent release i.e. glusterfs-3.5.0 [3] likely to have the fix. You can verify this by reading the comments in this bug report and checking for comments mentioning "committed in release-3.5".

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/5978
[2] http://news.gmane.org/gmane.comp.file-systems.gluster.user
[3] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137

Comment 1 Anand Avati 2014-05-09 01:22:34 UTC
REVIEW: http://review.gluster.org/7720 (posix: if brick-uid or brick-gid is not specified, do not set) posted (#1) for review on release-3.5 by Niels de Vos (ndevos)

Comment 2 Anand Avati 2014-05-09 14:36:09 UTC
COMMIT: http://review.gluster.org/7720 committed in release-3.5 by Niels de Vos (ndevos) 
------
commit e528724e793a8add1e3c21932913d8cb4e93da8c
Author: Niels de Vos <ndevos>
Date:   Thu May 8 22:21:25 2014 -0300

    posix: if brick-uid or brick-gid is not specified, do not set
    
    Current code would set owner uid/gid explicitly to 0/0 on start
    even if none was specified. Fix it.
    
    Cherry picked from commit 8bdc329:
    > Change-Id: I72dec9e79c51bd1eb3af5334c42b7c23b01d0258
    > BUG: 1040275
    > Signed-off-by: Anand Avati <avati>
    > Reviewed-on: http://review.gluster.org/6476
    > Tested-by: Gluster Build System <jenkins.com>
    > Tested-by: Lukáš Bezdička <lukas.bezdicka>
    > Reviewed-by: Krishnan Parthasarathi <kparthas>
    > Reviewed-by: Vijay Bellur <vbellur>
    
    Change-Id: Ie0396c1a4e6e0979ea9c855d33db963544a75c42
    BUG: 1095971
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/7720
    Tested-by: Gluster Build System <jenkins.com>

Comment 3 Niels de Vos 2014-05-25 09:08:09 UTC
The first (and last?) Beta for GlusterFS 3.5.1 has been released [1]. Please verify if the release solves this bug report for you. In case the glusterfs-3.5.1beta release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-May/040377.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 4 Niels de Vos 2014-06-24 11:05:14 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.5.1, please reopen this bug report.

glusterfs-3.5.1 has been announced on the Gluster Users mailinglist [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://supercolony.gluster.org/pipermail/gluster-users/2014-June/040723.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 5 Niels de Vos 2014-09-17 21:43:48 UTC
*** Bug 1092620 has been marked as a duplicate of this bug. ***


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