Bug 1334444

Summary: SAMBA-VSS : Permission denied issue while restoring the directory from windows client 1 when files are deleted from windows client 2
Product: [Community] GlusterFS Reporter: Raghavendra Talur <rtalur>
Component: libgfapiAssignee: Raghavendra Talur <rtalur>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir D <sdharane>
Severity: urgent Docs Contact:
Priority: urgent    
Version: mainlineCC: bugs, nlevinki, rhs-smb, rtalur, sdharane, storage-qa-internal, vdas
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.9.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1334443 Environment:
Last Closed: 2017-03-27 18:10:35 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: 1333668, 1334441, 1334443    

Comment 1 Vijay Bellur 2016-05-09 15:51:53 UTC
REVIEW: http://review.gluster.org/14274 (gfapi: don't copy to loc.gfid if not nameless lookup) posted (#1) for review on master by Raghavendra Talur (rtalur)

Comment 2 Niels de Vos 2016-05-10 12:26:06 UTC
Please add a public description of this bug.

Comment 3 Vijay Bellur 2016-05-10 13:47:12 UTC
REVIEW: http://review.gluster.org/14274 (gfapi: clear loc.gfid when retrying after ESTALE) posted (#2) for review on master by Raghavendra Talur (rtalur)

Comment 4 Raghavendra Talur 2016-05-10 14:01:39 UTC
Problem: Snapshot restore does not work for files that were deleted from the volume using a different windows client.

Steps to reproduce:
Create files from windows client1 and take snapshots. Now from a different windows client(say client2) delete some of the files that we created. On windows client1 right click over the directory where files were created and click on "Restore Previous Version" to see all the snapshots. Opening the snapshot directory shows all the files that are created initially in windows client1 (including the deleted files). However, when restore directory is requested we get a "Permission Denied" error on those deleted files.

How reproducible:
Always

NOTE: This requires vss plugin to be enabled in Samba and all uss related volume options set.

Comment 5 Vijay Bellur 2016-05-11 06:03:30 UTC
COMMIT: http://review.gluster.org/14274 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit b2f09e531029f573772a09572cee0f8e1855481b
Author: Raghavendra Talur <rtalur>
Date:   Mon May 9 21:06:07 2016 +0530

    gfapi: clear loc.gfid when retrying after ESTALE
    
    If an ESTALE is returned as result of a revalidate lookup, it means the
    previous gfid and inode are to be discarded and lookup has to be tried
    as a fresh one. A fresh lookup should not have loc.gfid set. We were
    creating a new inode and passing it down but not clearing loc.gfid.
    This patch fixes that.
    
    Change-Id: Ib192ada0528b5fb5e49b4e2555f2bcab62710e2d
    BUG: 1334444
    Signed-off-by: Raghavendra Talur <rtalur>
    Reviewed-on: http://review.gluster.org/14274
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 6 Shyamsundar 2017-03-27 18:10:35 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.9.0, please open a new bug report.

glusterfs-3.9.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://lists.gluster.org/pipermail/gluster-users/2016-November/029281.html
[2] https://www.gluster.org/pipermail/gluster-users/