Bug 1222126 - DHT: lookup-unhashed feature breaks runtime compatibility with older client versions
Summary: DHT: lookup-unhashed feature breaks runtime compatibility with older client v...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: distribute
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Shyamsundar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1221747 1222053 1225940
TreeView+ depends on / blocked
 
Reported: 2015-05-15 20:00 UTC by Shyamsundar
Modified: 2016-06-16 13:02 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1221747
: 1225940 (view as bug list)
Environment:
Last Closed: 2016-06-16 13:02:03 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Shyamsundar 2015-05-15 20:00:40 UTC
+++ This bug was initially created as a clone of Bug #1221747 +++

Description of problem:
With the feature http://review.gluster.org/#/c/7702/ the on disk layout would now carry 0 in the first 4 bytes of the xattr trusted.glusterfs.dht. In previous revisions this was set to 1 and the DHT code does a strict check on the same.

As a result lookups would fail to read and throw layout errors, when older clients are used against a 3.7 volume.

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

How reproducible:
Always

Steps to Reproduce:
1. Access a gluster volume using client bits from 3.7
2. Create a directory
3. Access the created directory from a client using 3.6 client bits

Actual results:
Step 3 reports layout inconsistencies

Expected results:
Step 3 should not report layout inconsistencies

Additional info:
Fixing this has a few parts to it as follows,
- Do not set layout xattr with the commit-hash unless lookup-unhashed is set to auto
- Do not allow older clients to connect if the above option is set
- Warn the administrator that setting lookup-unhashed to auto would cause older clients to not function well with the volume

Comment 1 Anand Avati 2015-05-15 20:02:21 UTC
REVIEW: http://review.gluster.org/10797 (dht: Change lookup-unhashed 'auto' to a new option) posted (#1) for review on master by Shyamsundar Ranganathan (srangana@redhat.com)

Comment 2 Anand Avati 2015-05-20 20:37:46 UTC
REVIEW: http://review.gluster.org/10797 (dht: Change lookup-unhashed 'auto' to a new option) posted (#2) for review on master by Shyamsundar Ranganathan (srangana@redhat.com)

Comment 3 Anand Avati 2015-05-22 13:59:24 UTC
REVIEW: http://review.gluster.org/10797 (dht: Change lookup-unhashed 'auto' to a new option) posted (#4) for review on master by Shyamsundar Ranganathan (srangana@redhat.com)

Comment 4 Anand Avati 2015-05-22 19:11:53 UTC
REVIEW: http://review.gluster.org/10797 (dht: Add lookup-optimize configuration option for DHT) posted (#5) for review on master by Shyamsundar Ranganathan (srangana@redhat.com)

Comment 5 Anand Avati 2015-05-28 04:19:06 UTC
REVIEW: http://review.gluster.org/10797 (dht: Add lookup-optimize configuration option for DHT) posted (#6) for review on master by Raghavendra G (rgowdapp@redhat.com)

Comment 6 Anand Avati 2015-06-02 10:03:13 UTC
COMMIT: http://review.gluster.org/10797 committed in master by Raghavendra G (rgowdapp@redhat.com) 
------
commit 9f29401791ad374015c3d0927b7cf967d66471a6
Author: Shyam <srangana@redhat.com>
Date:   Fri May 15 15:50:42 2015 -0400

    dht: Add lookup-optimize configuration option for DHT
    
    Currently with commit 4eaaf5 a mixed version cluster would
    have issues if lookup-uhashed is set to auto, as older clients
    would fail to validate the layouts if newer clients (i.e 3.7 or
    upwards) create directories. Also, in a mixed version cluster
    rebalance daemon would set commit hash for some subvolumes and
    not for the others.
    
    This commit fixes this problem by moving the enabling of the
    functionality introduced in the above mentioned commit to a
    new dht option. This option also has a op_version of 3_7_1
    thereby preventing it from being set in a mixed version
    cluster. It brings in the following changes,
    - Option can be set only if min version of the cluster is
    3.7.1 or more
    - Rebalance and mkdir update the layout with the commit hashes
    only if this option is set, hence ensuring rebalance works in a
    mixed version cluster, and also directories created by newer
    clients do not cause layout errors when read by older clients
    - This option also supersedes lookup-unhased, to enable the
    optimization for lookups more deterministic and not conflict
    with lookup-unhashed settings.
    
    Option added is cluster.lookup-optimize, which is a boolean.
    
    Usage: # gluster volume set VOLNAME cluster.lookup-optimize on
    
    Change-Id: Ifd1d4ce3f6438fcbcd60ffbfdbfb647355ea1ae0
    BUG:  1222126
    Signed-off-by: Shyam <srangana@redhat.com>
    Reviewed-on: http://review.gluster.org/10797
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Reviewed-by: Kaushal M <kaushal@redhat.com>
    Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
    Tested-by: Raghavendra G <rgowdapp@redhat.com>

Comment 7 Nagaprasad Sathyanarayana 2015-10-25 14:57:51 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 8 Niels de Vos 2016-06-16 13:02:03 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.8.0, please open a new bug report.

glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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