Bug 1291052

Summary: [tiering]: read/write freq-threshold allows negative values
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: krishnaram Karthick <kramdoss>
Component: tierAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED ERRATA QA Contact: Sweta Anandpara <sanandpa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: byarlaga, nchilaka, rhs-bugs, sankarshan, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.5-12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1291603 (view as bug list) Environment:
Last Closed: 2016-03-01 06:02:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1291603, 1292359    
Attachments:
Description Flags
server logs none

Description krishnaram Karthick 2015-12-13 08:18:24 UTC
Description of problem:

cluster.write-freq-threshold and cluster.read-freq-threshold allows negative values to be set.

[root@dhcp42-47 ~]# gluster vol set tier-vol-01 cluster.write-freq-threshold -1
volume set: success
[root@dhcp42-47 ~]# gluster vol set tier-vol-01 cluster.read-freq-threshold -1
volume set: success
[root@dhcp42-47 ~]# gluster vol info
 
Volume Name: tier-vol-01
Type: Tier
Volume ID: 78d1fc18-5d0a-452d-ab26-b78c15655c60
Status: Started
Number of Bricks: 16
Transport-type: tcp
Hot Tier :
Hot Tier Type : Distributed-Replicate
Number of Bricks: 2 x 2 = 4
Brick1: 10.70.42.10:/rhs/brick4/leg1
Brick2: 10.70.42.177:/rhs/brick4/leg1
Brick3: 10.70.43.19:/rhs/brick4/leg1
Brick4: 10.70.42.47:/rhs/brick4/leg1
Cold Tier:
Cold Tier Type : Distributed-Disperse
Number of Bricks: 2 x (4 + 2) = 12
Brick5: 10.70.42.47:/rhs/brick1/leg1
Brick6: 10.70.43.19:/rhs/brick1/leg1
Brick7: 10.70.42.177:/rhs/brick1/leg1
Brick8: 10.70.42.10:/rhs/brick1/leg1
Brick9: 10.70.43.140:/rhs/brick1/leg1
Brick10: 10.70.42.87:/rhs/brick1/leg1
Brick11: 10.70.42.228:/rhs/brick1/leg1
Brick12: 10.70.42.183:/rhs/brick1/leg1
Brick13: 10.70.42.47:/rhs/brick2/leg1
Brick14: 10.70.43.19:/rhs/brick2/leg1
Brick15: 10.70.42.177:/rhs/brick2/leg1
Brick16: 10.70.42.10:/rhs/brick2/leg1
Options Reconfigured:
cluster.read-freq-threshold: -1
cluster.write-freq-threshold: -1
performance.readdir-ahead: on
cluster.tier-mode: cache
features.record-counters: off
features.ctr-enabled: on


Version-Release number of selected component (if applicable):
glusterfs-3.7.5-11.el7rhgs.x86_64

How reproducible:
100%

Steps to Reproduce:
1. create a tiered volume
2. set cluster.read-freq-threshold and cluster.write-freq-threshold to negative value

Actual results:
Allows negative integers 

Expected results:
Only positive integers should be allowed

Additional info:

Comment 2 krishnaram Karthick 2015-12-13 08:24:49 UTC
sosreports are available here --> http://rhsqe-repo.lab.eng.blr.redhat.com/sosreports/1291052/

Comment 3 krishnaram Karthick 2015-12-14 06:14:05 UTC
with negative values set for read and write freq, promotions do happen with single read or write. i.e, the behavior will remain same as if cluster.write-freq-threshold or cluster.read-freq-threshold is not set.

Comment 4 Joseph Elwin Fernandes 2015-12-17 08:15:54 UTC
https://code.engineering.redhat.com/gerrit/#/c/64029/

Comment 5 Sweta Anandpara 2015-12-18 14:33:57 UTC
Tested and verified this on the build glusterfs-3.7.5-12.el7rhgs.x86_64

Verified the below tiering config options for negative values, and other not-acceptable values 
*cluster.tier-promote-frequency
*cluster.tier-demote-frequency
*cluster.write-freq-threshold  
*cluster.read-freq-threshold  
*cluster.watermark-hi
*cluster.watermark-low

An error message is shown for non-compatible values. There are a couple of language/grammar errors seen though, like: 

>> cluster.write-freq-threshold expects a positiveinteger value.
(space missing between 'positive' and 'integer')
>> cluster.tier-demote-frequency expects a positive integer value greater than 0
('greater than 0' is redundant. 'positive integer' suffices)

I could add the above observation in a blanket bug that might be raised for English language errors.

Moving the present bug to verified in 3.1.2. Logs are attached.

Comment 6 Sweta Anandpara 2015-12-18 14:36:29 UTC
Created attachment 1107183 [details]
server logs

Comment 8 errata-xmlrpc 2016-03-01 06:02:37 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://rhn.redhat.com/errata/RHBA-2016-0193.html