Bug 833750 - the read-subvolume option for replication does not work
the read-subvolume option for replication does not work
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: replicate (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeff Darcy
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-20 05:40 EDT by domenic.wollina
Modified: 2013-07-24 13:17 EDT (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:17:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to fix the problem (833 bytes, patch)
2012-06-20 05:40 EDT, domenic.wollina
no flags Details | Diff

  None (edit)
Description domenic.wollina 2012-06-20 05:40:14 EDT
Created attachment 593160 [details]
patch to fix the problem

Description of problem:

if you set read-subvolume in volume file or over xlator-options it has no effect
of which subvolume the client chooses.

when read-subvolume is set the client should try to read first from that subvolume if its online.

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

3.3.0

How reproducible:

glusterfs --volfile-id=testvol --volfile-server=gluster02 --xlator-option=testvol-replicate-0.read-subvolume=testvol-client-1 /mnt2

then read files from the volume
  
Actual results:

the option gets acceptet:
[options.c:1043:xlator_option_init_xlator] 0-testvol-replicate-0: option read-subvolume using set value testvol-client-1
[afr-common.c:1294:afr_lookup_select_read_child] 0-testvol-replicate-0: Source selected as 0 for /a.1


Expected results:

the option gets acceptet:
[options.c:1043:xlator_option_init_xlator] 0-testvol-replicate-0: option read-subvolume using set value testvol-client-1
[afr-common.c:1294:afr_lookup_select_read_child] 0-testvol-replicate-0: Source selected as 1 for /a.1


Additional info:

the problem seems to be in afr-common.c 
in function afr_select_read_child_from_policy

if the config option read-subvolume is set it should be preferred for read

see my patch
Comment 1 Jeff Darcy 2012-07-03 16:37:38 EDT
I offered to "shepherd" this bug/patch for Domenic, and he agreed.  The corresponding patch in Gerrit is http://review.gluster.com/#change,3614.
Comment 2 Vijay Bellur 2012-07-03 17:06:28 EDT
CHANGE: http://review.gluster.com/3614 (cluster/afr: fix for read-subvolume option does not work) merged in master by Anand Avati (avati@redhat.com)

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