Bug 1501238

Summary: [SNAPSHOT] Unable to mount a snapshot on client
Product: [Community] GlusterFS Reporter: Mohammed Rafi KC <rkavunga>
Component: snapshotAssignee: Mohammed Rafi KC <rkavunga>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.12CC: amukherj, bugs, rhs-bugs, rkavunga, storage-qa-internal, vpapnoi
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-glusterfs-3.12.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1501235 Environment:
Last Closed: 2017-11-29 05:52:17 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: 1500816, 1501235    
Bug Blocks:    

Description Mohammed Rafi KC 2017-10-12 09:10:29 UTC
+++ This bug was initially created as a clone of Bug #1501235 +++

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

Description of problem:

Mounting an activated snapshot to a client by giving the command "mount -t glusterfs 10.70.42.243:/snaps/test0/bravo /mnt/test0/" fails.
Here, test0 is the snapshot name and bravo is the volume name



Info of the volume:
[root@dhcp42-243 ~]# gluster v info

Volume Name: bravo
Type: Distributed-Replicate
Volume ID: 575514e1-fd58-4205-a418-d551a3463280
Status: Started
Snapshot Count: 254
Number of Bricks: 2 x 3 = 6
Transport-type: tcp
Bricks:
Brick1: 10.70.42.243:/bricks/brick0/bravo
Brick2: 10.70.42.206:/bricks/brick0/bravo
Brick3: 10.70.43.53:/bricks/brick0/bravo
Brick4: 10.70.43.152:/bricks/brick0/bravo
Brick5: 10.70.43.141:/bricks/brick0/bravo
Brick6: 10.70.42.9:/bricks/brick0/bravo
Options Reconfigured:
nfs.disable: on
transport.address-family: inet
features.barrier: disable
features.uss: enable
changelog.changelog: on
cluster.enable-shared-storage: enable
auto-delete: enable



Output of the mount command:

[root@dhcp43-240 ~]# mount -t glusterfs 10.70.42.243:/snaps/test0/bravo /mnt/test0/
Mount failed. Please check the log file for more details.



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

master



How reproducible: 2/2



Steps to Reproduce:

1. Create and start a volume.
2. Mount the volume on a client and do some I/O's at the mount point.
3. Create a snapshot and activate it.
4. Mount the snapshot on client using the command "mount -t glusterfs <node ip>:/snaps/<snapname>/<volname> /mnt/<mountname>"



Actual results:

Mount fails with output : Mount failed. Please check the log file for more details.



Expected results:

Should be mounted successfully.



Additional info:

Output of the log file from the failed mount is attached.
Looking at the log file it seems that the issue is related to the subdir mount.

--- Additional comment from Worker Ant on 2017-10-12 05:08:52 EDT ---

REVIEW: https://review.gluster.org/18506 (mount/fuse : Fix parsing of vol_id for snapshot volume) posted (#1) for review on master by mohammed rafi  kc (rkavunga)

Comment 1 Worker Ant 2017-10-12 09:10:51 UTC
REVIEW: https://review.gluster.org/18507 (mount/fuse : Fix parsing of vol_id for snapshot volume) posted (#1) for review on release-3.12 by mohammed rafi  kc (rkavunga)

Comment 2 Worker Ant 2017-10-15 19:39:39 UTC
REVIEW: https://review.gluster.org/18507 (mount/fuse : Fix parsing of vol_id for snapshot volume) posted (#2) for review on release-3.12 by mohammed rafi  kc (rkavunga)

Comment 3 Worker Ant 2017-10-23 09:15:52 UTC
COMMIT: https://review.gluster.org/18507 committed in release-3.12 by jiffin tony Thottan (jthottan) 
------
commit 5aab0a11a37ec5758835ea1068b9e61ebdaccf8b
Author: Mohammed Rafi KC <rkavunga>
Date:   Thu Oct 12 14:31:14 2017 +0530

    mount/fuse : Fix parsing of vol_id for snapshot volume
    
    For supporting sub-dir mount, we changed the volid. Which means anything
    after a '/' in volume_id will be considered as sub-dir path.
    
    But snapshot volume has vol_id stracture of /snaps/<volname>/<snapname>
    which has to be considered as during the parsing.
    
    Note 1: sub-dir mount is not supported on snapshot volume
    Note 2: With sub-dir mount changes brick based mount for quota cannot be
            executed via mount command. It has to be a direct call via glusterfs
    
    Backport of>
    >Change-Id: I0d824de0236b803db8a918f683dabb0cb523cb04
    >BUG: 1501235
    >Signed-off-by: Mohammed Rafi KC <rkavunga>
    Change-Id: I0d824de0236b803db8a918f683dabb0cb523cb04
    BUG: 1501238
    Signed-off-by: Mohammed Rafi KC <rkavunga>
    (cherry picked from commit 067f38063e13fc75d4e3f7adf93441d15099c557)

Comment 4 Jiffin 2017-11-29 05:52:17 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-glusterfs-3.12.3, please open a new bug report.

glusterfs-glusterfs-3.12.3 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://lists.gluster.org/pipermail/gluster-devel/2017-November/053983.html
[2] https://www.gluster.org/pipermail/gluster-users/