Bug 1501023 - Make choose-local configurable through `volume-set` command
Summary: Make choose-local configurable through `volume-set` command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: replicate
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: RHGS 3.4.0
Assignee: Krutika Dhananjay
QA Contact: Vijay Avuthu
URL:
Whiteboard: rebase
Depends On: 1480525
Blocks: 1501022 1503134
TreeView+ depends on / blocked
 
Reported: 2017-10-12 04:25 UTC by Krutika Dhananjay
Modified: 2018-09-19 05:58 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.12.2-1
Doc Type: Bug Fix
Doc Text:
Previously, volume-set command to reconfigure choose-local option was not working as expected due to AFR not handling reconfiguration of the choose-local option. With this fix, appropriate changes are made to make AFR handle reconfiguring choose-local option.
Clone Of: 1480525
Environment:
Last Closed: 2018-09-04 06:36:52 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2607 0 None None None 2018-09-04 06:38:34 UTC

Description Krutika Dhananjay 2017-10-12 04:25:04 UTC
+++ This bug was initially created as a clone of Bug #1480525 +++

Description of problem:

Same as summary. There is no 'reconfigure' code for choose-local currently.

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


How reproducible:

Found this as part of doing some perf experiments with random-read in ovirt-gluster setup.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Worker Ant on 2017-08-11 06:19:46 EDT ---

REVIEW: https://review.gluster.org/18026 (cluster/afr: Make choose-local "reconfigurable") posted (#1) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Worker Ant on 2017-08-18 05:14:10 EDT ---

REVIEW: https://review.gluster.org/18026 (cluster/afr: Make choose-local "reconfigurable") posted (#2) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Worker Ant on 2017-09-20 08:27:01 EDT ---

REVIEW: https://review.gluster.org/18026 (cluster/afr: Make choose-local "reconfigurable") posted (#3) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Worker Ant on 2017-09-29 22:15:26 EDT ---

COMMIT: https://review.gluster.org/18026 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 1e2d6537875d16b783e3c50ada7ee61487c6d796
Author: Krutika Dhananjay <kdhananj>
Date:   Fri Aug 11 15:43:58 2017 +0530

    cluster/afr: Make choose-local "reconfigurable"
    
    With this change, enabling choose-local (which means its state makes
    transition from "off" to "on") will be effective after the first
    gfid-lookup on "/" since volume-set was executed.
    
    Change-Id: Ibab292ba705d993b475cd0303fb3318211fb2500
    BUG: 1480525
    Signed-off-by: Krutika Dhananjay <kdhananj>

Comment 3 Ravishankar N 2017-10-13 05:54:50 UTC
Setting Priority to high considering the patch has been merged upstream and we have a dev ack from the assignee.

Comment 8 Vijay Avuthu 2018-04-24 09:37:00 UTC
Update:
==========

Build used : glusterfs-3.12.2-8.el7rhgs.x86_64


Verified with below scenarios:

Scenario 1:

1) create 1 * 3 replicate volume ( each brick on different node: N1, N2 and N3 ) and start
2) write file from the mount point
3) start volume profile
4) mount the volume on N1
5) clear the volume profile
6) read the file from N1 mount point
7) check profile info
8) set cluster.choose-local to off
9) clear the volume profile
10) read the file from N1 mount point
11) check profile info

below is o/p after step 11, STAT call goes to b2 which is expected when we choose-local to off

# gluster vol profile 13 info 
Brick: 10.70.35.61:/bricks/brick2/b0
------------------------------------
Cumulative Stats:
 %-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
 ---------   -----------   -----------   -----------   ------------        ----
    100.00     302.00 us     302.00 us     302.00 us              1      LOOKUP
 
    Duration: 32 seconds
   Data Read: 0 bytes
Data Written: 0 bytes
 
Interval 1 Stats:
 %-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
 ---------   -----------   -----------   -----------   ------------        ----
    100.00     302.00 us     302.00 us     302.00 us              1      LOOKUP
 
    Duration: 26 seconds
   Data Read: 0 bytes
Data Written: 0 bytes
 
Brick: 10.70.35.174:/bricks/brick2/b1
-------------------------------------
Cumulative Stats:
 %-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
 ---------   -----------   -----------   -----------   ------------        ----
     35.22     236.00 us     236.00 us     236.00 us              1        STAT
     64.78     434.00 us     434.00 us     434.00 us              1      LOOKUP
 
    Duration: 32 seconds
   Data Read: 0 bytes
Data Written: 0 bytes
 
Interval 1 Stats:
 %-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
 ---------   -----------   -----------   -----------   ------------        ----
     35.22     236.00 us     236.00 us     236.00 us              1        STAT
     64.78     434.00 us     434.00 us     434.00 us              1      LOOKUP
 
    Duration: 26 seconds
   Data Read: 0 bytes
Data Written: 0 bytes
 
Brick: 10.70.35.17:/bricks/brick2/b2
------------------------------------
Cumulative Stats:
   Block Size:                 16b+ 
 No. of Reads:                    1 
No. of Writes:                    0 
 %-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
 ---------   -----------   -----------   -----------   ------------        ----
     13.94     256.00 us     256.00 us     256.00 us              1       FSTAT
     34.30     630.00 us     630.00 us     630.00 us              1      LOOKUP
     51.77     951.00 us     951.00 us     951.00 us              1        READ
 
    Duration: 32 seconds
   Data Read: 24 bytes
Data Written: 0 bytes
 
Interval 1 Stats:
   Block Size:                 16b+ 
 No. of Reads:                    1 
No. of Writes:                    0 
 %-latency   Avg-latency   Min-Latency   Max-Latency   No. of calls         Fop
 ---------   -----------   -----------   -----------   ------------        ----
     13.94     256.00 us     256.00 us     256.00 us              1       FSTAT
     34.30     630.00 us     630.00 us     630.00 us              1      LOOKUP
     51.77     951.00 us     951.00 us     951.00 us              1        READ
 
    Duration: 26 seconds
   Data Read: 24 bytes
Data Written: 0 bytes
# 


scenario : 2

1) create 1 * 3 replicate volume ( each brick on different node: N1, N2 and N3 ) and start
2) write file from the mount point
3) on N2 and N3, modify the data ( file should be same size as N1 ) from backend
4) mount the volume on N1
6) read the file from N1 mount point 
8) set cluster.choose-local to off
9) unmount and mount the volume on N1 again 
10) read the file from N1 mount point 

From N1 :

# cat file
Test choos-local option
#

From N2 :

[root@dhcp35-174 b1]# cat file
Fqwe 12345-12345 option
# 

From N3 :
# cat file
Fqwe 12345-12345 option
# 

> o/p of Reading file after step 10

# cat /mnt/13/file
Fqwe 12345-12345 option
# 

Changing status to Verified.

Comment 10 Krutika Dhananjay 2018-09-04 06:05:24 UTC
Looks ok.

Comment 12 errata-xmlrpc 2018-09-04 06:36:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2607


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