Bug 1297743 - [perf-xlators/write-behind] write-behind-window-size could be set greater than its allowed MAX value 1073741824
[perf-xlators/write-behind] write-behind-window-size could be set greater tha...
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: write-behind (Show other bugs)
3.1
x86_64 Linux
unspecified Severity medium
: ---
: RHGS 3.3.0
Assigned To: Csaba Henk
Karan Sandha
: ZStream
Depends On: 993535 1445609
Blocks: 1417147
  Show dependency treegraph
 
Reported: 2016-01-12 06:06 EST by SATHEESARAN
Modified: 2017-09-21 00:53 EDT (History)
9 users (show)

See Also:
Fixed In Version: glusterfs-3.8.4-25
Doc Type: Bug Fix
Doc Text:
The write-behind-window-size parameter was not validated correctly, and could be set to a value greater than its allowed maximum. This has been corrected so that only valid values (524288 - 1073741824) can be set.
Story Points: ---
Clone Of: 993535
: 1445609 (view as bug list)
Environment:
Last Closed: 2017-09-21 00:25:52 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)

  None (edit)
Description SATHEESARAN 2016-01-12 06:06:17 EST
+++ This bug was initially created as a clone of Bug #993535 +++

Description of problem:
-----------------------
Write-behind has got the option, write-behind-window-size which, as per command link help, should allow values within range [524288 - 1073741824]
But in this case, it takes values greater than MAX value - 1073741824

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
RHS2.1 - glusterfs-3.4.0.15rhs-1


How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------

1. Set 'write-behind-window-size' to negative value
(i.e) gluster volume set <vol-name> performance.write-behind-window-size -1

This would show-up an error, with valid value range, which is [524288 - 1073741824]

2. After getting the max value from step 1, try to set 'write-behind-window-size' greater than that value 
(i.e) gluster volume set <vol-name> performance.write-behind-window-size 1073741825


Actual results:
The value greater than MAX value is allowed to be set

Expected results:
Any value greater than MAX value should be failed to set

Additional info:
1. Volume Information
----------------------
Its a distributed volume with 2 bricks

[Tue Aug  6 06:54:44 UTC 2013 root@10.70.37.205:~ ] # gluster volume info distvol
 
Volume Name: distvol
Type: Distribute
Volume ID: 562ebca3-a048-4c1d-87d4-d6ad36547092
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 10.70.37.205:/rhs/brick4/distbrick1
Brick2: 10.70.37.52:/rhs/brick4/distbrick1
Options Reconfigured:
performance.write-behind-window-size: 107374182400
performance.read-ahead-page-count: 1
performance.cache-size: 4MB
server.allow-insecure: on
nfs.rpc-auth-allow: on
performance.md-cache-timeout: 60

[Tue Aug  6 06:56:04 UTC 2013 root@10.70.37.205:~ ] # gluster volume status distvol
Status of volume: distvol
Gluster process                                         Port    Online  Pid
------------------------------------------------------------------------------
Brick 10.70.37.205:/rhs/brick4/distbrick1               49155   Y       2854
Brick 10.70.37.52:/rhs/brick4/distbrick1                49155   Y       2841
NFS Server on localhost                                 2049    Y       15889
NFS Server on 10.70.37.52                               2049    Y       15396
NFS Server on 10.70.37.202                              2049    Y       15411
NFS Server on 10.70.37.154                              2049    Y       15417
 
There are no active volume tasks

2. Console logs
----------------
[Tue Aug  6 06:41:13 UTC 2013 root@10.70.37.205:~ ] # gluster volume set distvol performance.write-behind-window-size 0
volume set: failed: '0' in 'option cache-size 0' is out of range [524288 - 1073741824]                                                                                                                         
[Tue Aug  6 06:41:38 UTC 2013 root@10.70.37.205:~ ] # gluster volume set distvol performance.write-behind-window-size 524287
volume set: failed: '524287' in 'option cache-size 524287' is out of range [524288 - 1073741824]                                                                                                               
[Tue Aug  6 06:41:48 UTC 2013 root@10.70.37.205:~ ] # gluster volume set distvol performance.write-behind-window-size 524288
volume set: success                                                                                                                                                                                            
[Tue Aug  6 06:41:55 UTC 2013 root@10.70.37.205:~ ] # gluster volume set distvol performance.write-behind-window-size 1073741824
volume set: success                                                                                                                                                                                            
[Tue Aug  6 06:42:11 UTC 2013 root@10.70.37.205:~ ] # gluster volume set distvol performance.write-behind-window-size 1073741825
volume set: success                                                                                                                                                                                            
[Tue Aug  6 06:42:17 UTC 2013 root@10.70.37.205:~ ] # gluster volume set distvol performance.write-behind-window-size 107374182400                                                                             
volume set: success                                                                                                                                                                                            
[Tue Aug  6 06:42:32 UTC 2013 root@10.70.37.205:~ ] # glusterfs -V                                                                                                                                             
glusterfs 3.4.0.15rhs built on Aug  4 2013 22:34:15                                                                                                                                                            
Repository revision: git://git.gluster.com/glusterfs.git                                                                                                                                                       
Copyright (c) 2006-2013 Red Hat, Inc. <http://www.redhat.com/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.

[Tue Aug  6 06:54:44 UTC 2013 root@10.70.37.205:~ ] # gluster volume info distvol
 
Volume Name: distvol
Type: Distribute
Volume ID: 562ebca3-a048-4c1d-87d4-d6ad36547092
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 10.70.37.205:/rhs/brick4/distbrick1
Brick2: 10.70.37.52:/rhs/brick4/distbrick1
Options Reconfigured:
performance.write-behind-window-size: 107374182400
performance.read-ahead-page-count: 1
performance.cache-size: 4MB
server.allow-insecure: on
nfs.rpc-auth-allow: on
performance.md-cache-timeout: 60

--- Additional comment from RHEL Product and Program Management on 2013-08-06 03:14:59 EDT ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Vivek Agarwal on 2015-12-03 12:18:39 EST ---

Thank you for submitting this issue for consideration in Red Hat Gluster Storage. The release for which you requested us to review, is now End of Life. Please See https://access.redhat.com/support/policy/updates/rhs/

If you can reproduce this bug against a currently maintained version of Red Hat Gluster Storage, please feel free to file a new report against the current release.
Comment 2 SATHEESARAN 2016-01-12 06:08:10 EST
The issue is still reproducible with RHGS 3.1.2

[root@ ~]# gluster volume set distvol write-behind-window-size 1GB
volume set: success

[root@ ~]# gluster volume set distvol write-behind-window-size 2GB
volume set: success

[root@ ~]# gluster volume set distvol write-behind-window-size 32GB
volume set: success

[root@ ~]# gluster volume set distvol write-behind-window-size 1TB
volume set: success

[root@ ~]# gluster volume set distvol write-behind-window-size 1KB
volume set: failed: '1024' in 'option cache-size 1KB' is out of range [524288 - 1073741824]
Comment 3 Atin Mukherjee 2016-01-12 06:14:38 EST
Although the changes are falling under GlusterD code, but the validation has to be taken care by the feature itself. Assigning it to Raghavendra G as he maintains performance translators.
Comment 5 Atin Mukherjee 2017-05-08 10:44:18 EDT
upstream patch : https://review.gluster.org/#/c/17125
Comment 11 Csaba Henk 2017-09-11 18:19:30 EDT
I checked, the doc is appropriate.
Comment 13 errata-xmlrpc 2017-09-21 00:25:52 EDT
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/RHBA-2017:2774
Comment 14 errata-xmlrpc 2017-09-21 00:53:56 EDT
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/RHBA-2017:2774

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