Bug 1506098 - snpashots issues with other processes accessing the mounted brick snapshots
Summary: snpashots issues with other processes accessing the mounted brick snapshots
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: snapshot
Version: 3.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sunny Kumar
QA Contact:
URL:
Whiteboard:
Depends On: 1482023
Blocks: 1464150 1467903
TreeView+ depends on / blocked
 
Reported: 2017-10-25 06:29 UTC by Sunny Kumar
Modified: 2018-08-29 03:18 UTC (History)
3 users (show)

Fixed In Version: glusterfs-4.1.3 (or higher)
Clone Of: 1482023
Environment:
Last Closed: 2018-08-29 03:18:50 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Sunny Kumar 2017-10-25 06:29:53 UTC
+++ This bug was initially created as a clone of Bug #1482023 +++

Description of problem:

By default, GlusterFS does mount even deactivated snapshot(s) under /run/gluster/snaps. Since we do have a mount, there is a possibility that some process may access the mount, causing issues when trying to umount the volume for instance when deleting the snapshot.


How reproducible:
100%

Steps to Reproduce:
1. Create a snapshot
2. Check for mount point
3. Deactivate a snapshot
4. Check for mount point

Actual results:

1. Newly created snapshot volume is getting listed in mount point.
2. After deactivation of snapshot volume is still present in mount point.

Expected results:

1. Newly created snapshot volume should not be listed in mount point, It should list only after activating the snapshot volume.
2. After deactivation of snapshot volume, mount point should not be present.

--- Additional comment from Worker Ant on 2017-08-16 05:52:02 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: unmounting bricks during snap deactivation) posted (#1) for review on master by Sunny Kumar

--- Additional comment from Sunny Kumar on 2017-08-16 05:59:44 EDT ---

Detailed discussion on this issue :-

https://github.com/gluster/glusterfs/issues/276

--- Additional comment from Atin Mukherjee on 2017-08-16 06:43:56 EDT ---

Since we already have a github issue in place, having a bug is an overkill to me.

--- Additional comment from Worker Ant on 2017-08-16 07:16:54 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: unmounting bricks during snap deactivation) posted (#2) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-08-16 07:28:41 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: unmount bricks during snap deactivation) posted (#3) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-08-24 06:48:08 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: snpashots issues with other processes           accessing the mounted brick snapshots) posted (#4) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-08-24 07:11:50 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: snpashot issues with other processes access the mounted brick) posted (#5) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-08-24 07:15:00 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#6) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-08-24 16:42:21 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#7) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-08-28 03:04:06 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#8) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-06 09:02:30 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#9) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-06 11:34:10 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#10) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-12 03:00:14 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#11) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-20 07:44:38 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#12) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-21 02:42:32 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#13) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-29 02:19:29 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#14) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-29 02:27:21 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#15) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-29 02:46:07 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#16) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-09-29 03:00:48 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issues with other processes accessing the mounted brick) posted (#17) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-10-04 02:49:09 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issue with other processes accessing the mounted brick) posted (#18) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-10-10 14:38:17 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issue with other processes accessing the mounted brick) posted (#19) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-10-12 06:57:35 EDT ---

REVIEW: https://review.gluster.org/18510 (snapshot: Issue with other processes accessing the mounted brick) posted (#1) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-10-17 02:44:54 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issue with other processes accessing the mounted brick) posted (#20) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-10-18 08:55:12 EDT ---

REVIEW: https://review.gluster.org/18047 (snapshot: Issue with other processes accessing the mounted brick) posted (#21) for review on master by Sunny Kumar

--- Additional comment from Worker Ant on 2017-10-23 06:05:06 EDT ---

COMMIT: https://review.gluster.org/18047 committed in master by Amar Tumballi (amarts) 
------
commit 2b3b3edee2d849b4aee314048987dc995d9679a1
Author: Sunny Kumar <sunkumar>
Date:   Wed Aug 16 14:04:45 2017 +0530

    snapshot: Issue with other processes accessing the mounted brick
    
    Added code for unmount of activated snapshot brick during snapshot
    deactivation process which make sense as mount point for deactivated
    bricks should not exist.
    
    Removed code for mounting newly created snapshot, as newly created
    snapshots should not mount until it is activated.
    
    Added code for mount point creation and snapshot mount during snapshot
    activation.
    
    Added validation during glusterd init for mounting only those snapshot
    whose status is either STARTED or RESTORED.
    
    During snapshot restore, mount point for stopped snap should exist as
    it is required to set extended attribute.
    
    During handshake, after getting updates from friend mount point for
    activated snapshot should exist and should not for deactivated
    snapshot.
    
    While getting snap status we should show relevent information for
    deactivated snapshots, after this pathch 'gluster snap status' command
    will show output like-
    
    Snap Name : snap1
    Snap UUID : snap-uuid
    
    	Brick Path        :   server1:/run/gluster/snaps/snap-vol-name/brick
    	Volume Group      :   N/A (Deactivated Snapshot)
    	Brick Running     :   No
    	Brick PID         :   N/A
    	Data Percentage   :   N/A
    	LV Size           :   N/A
    
    Fixes: #276
    
    Change-Id: I65783488e35fac43632615ce1b8ff7b8e84834dc
    BUG: 1482023
    Signed-off-by: Sunny Kumar <sunkumar>

Comment 1 Worker Ant 2017-10-25 06:32:29 UTC
REVIEW: https://review.gluster.org/18568 (snapshot: Issue with other processes accessing the mounted brick) posted (#1) for review on release-3.12 by Sunny Kumar


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