Bug 833750 - the read-subvolume option for replication does not work
Summary: the read-subvolume option for replication does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: replicate
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeff Darcy
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-20 09:40 UTC by domenic.wollina
Modified: 2013-07-24 17:17 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:17:39 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


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

Description domenic.wollina 2012-06-20 09:40:14 UTC
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 20:37:38 UTC
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 21:06:28 UTC
CHANGE: http://review.gluster.com/3614 (cluster/afr: fix for read-subvolume option does not work) merged in master by Anand Avati (avati)


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