Re: Preventing lookups from serving metadata.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/08/2016 08:10 AM, Ravishankar N wrote:
So there is a class of bugs* in exposed in replicate volumes where if
the only good copy of the file is down, we still end up serving stale
data to the application because of caching
in various layers outside gluster. In fuse, this can be mitigated by
setting attribute and entry-timeout to zero so that the actual FOP
(stat, read, write, etc) reaches AFR which will
then fail it with EIO. But this does not work for NFS based clients.

1) Is there a way by which we can make the 'lookup' FOP in gluster do
just that- i.e. tell whether the entry exists or not, and *not serve*
any other (stat) information except the gfid?

To my reading of NFSv3 this seems possible and here is what I have gathered,

LOOKUP RPC returns post_op_attr for the object being looked up, and this can contain no attribute information. See [3] and [4] below. LOOKUP also returns 'nfs_fh3 object' which is where the GFID related information sits.

Gluster NFS code, seems to adhere to this as seen in [5]

NFSv3 RFC does not encourage this (reading [4] "This appears to make returning attributes optional. However,.." states this), but is not prevented.

So overall with NFSv3 this seems to be doable. We possibly need data from Ganesha implementation and NFSv4 related reading on this.


2) If that is not possible, it is okay for AFR to fail lookups with EIO
if when client-quorum is met and there is no source available? The
downside is that if we fail lookups with EIO, even unlink cannot be served.
(Think of  a user who doesn't want to resolve a file in split-brain, but
rather delete it).

Thanks,
Ravi

*bugs:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1356974
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1224709
[3] NFS v3 RFC definition of LOOKUP: https://tools.ietf.org/html/rfc1813#section-3.3.3 [4] NFS v3 definition of post_op_attr https://tools.ietf.org/html/rfc1813#section-2.6 (search for post_op_attr after reaching this section) [5] Gluster NFS code pointer: https://github.com/gluster/glusterfs/blob/master/xlators/nfs/server/src/nfs3-helpers.c#L365 and more specifically, https://github.com/gluster/glusterfs/blob/master/xlators/nfs/server/src/nfs3-helpers.c#L376





_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux