Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1334441

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: 3.7.11CC: bugs, nlevinki, rhs-smb, rtalur, storage-qa-internal, vdas
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1333668
: 1334443 (view as bug list) Environment:
Last Closed: 2016-06-28 12:17:24 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: 1334444    
Bug Blocks: 1333668    

Comment 1 Raghavendra Talur 2016-05-09 15:50:01 UTC
Many xlators presume that existence of loc.gfid as a nameless lookup which leads to change in their functionality. Any lookup which has loc.inode.gfid filled should succeed or fail gracefully if loc.name is present. Hence removing the copy of loc.inode.gfid to loc.gfid.

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

Comment 3 Raghavendra Talur 2016-05-11 09:56:50 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 4 Vijay Bellur 2016-05-11 09:59:23 UTC
REVIEW: http://review.gluster.org/14290 (gfapi: clear loc.gfid when retrying after ESTALE) posted (#1) for review on release-3.7 by Raghavendra Talur (rtalur)

Comment 5 Vijay Bellur 2016-05-13 05:52:50 UTC
COMMIT: http://review.gluster.org/14290 committed in release-3.7 by Raghavendra Talur (rtalur) 
------
commit ff7f6fc82cfe3a6af4bf3f339c31843a0e9c9b28
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>
    >(cherry picked from commit b2f09e531029f573772a09572cee0f8e1855481b)
    
    Change-Id: Ib192ada0528b5fb5e49b4e2555f2bcab62710e2d
    BUG: 1334441
    Signed-off-by: Raghavendra Talur <rtalur>
    Reviewed-on: http://review.gluster.org/14290
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Rajesh Joseph <rjoseph>

Comment 6 Kaushal 2016-06-28 12:17:24 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.7.12, please open a new bug report.

glusterfs-3.7.12 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] https://www.gluster.org/pipermail/gluster-devel/2016-June/049918.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user