This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1290787 - [tiering]: Hexadecimal values accepted in read/write counters
[tiering]: Hexadecimal values accepted in read/write counters
Status: ASSIGNED
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: tier (Show other bugs)
3.1
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Dan Lambright
nchilaka
: ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-11 08:11 EST by Sweta Anandpara
Modified: 2017-10-02 13:06 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 Sweta Anandpara 2015-12-11 08:11:52 EST
Description of problem:
Decimal values are known to be accepted in 'cluster.write-freq-threshold' and 'cluster.read-freq-threshold'. When tried with hexadecimal values, they are accepted as well. There is no mention of the same, in the known docs. This bug is to decide on whether to allow/disallow hexadecimal values. On the first cut, they seem to be working. However complete testing will have to be carried out to confidently ascertain the same. 

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

How reproducible: Always


Steps to Reproduce:
1. Have a tiered volume
2. Use the 'gluster volume set' command to set 'cluster.write-freq-threshold' to hexadecimal value, say, 0x2
3. Use the 'gluster volume set' command to set 'cluster.read-freq-threshold' to hexadecimal value, say, 0x4


Actual results:

Step2 and step3 return success, with write and read counters successfully updated to the hexadecimal value

Expected results:
Need to be decided

Additional info:

[root@dhcp37-55 ~]# rpm -qa | grep gluster
nfs-ganesha-gluster-2.2.0-11.el7rhgs.x86_64
glusterfs-cli-3.7.5-10.el7rhgs.x86_64
glusterfs-3.7.5-10.el7rhgs.x86_64
glusterfs-fuse-3.7.5-10.el7rhgs.x86_64
glusterfs-ganesha-3.7.5-10.el7rhgs.x86_64
glusterfs-libs-3.7.5-10.el7rhgs.x86_64
glusterfs-api-3.7.5-10.el7rhgs.x86_64
glusterfs-client-xlators-3.7.5-10.el7rhgs.x86_64
glusterfs-server-3.7.5-10.el7rhgs.x86_64
[root@dhcp37-55 ~]# 

[root@dhcp37-55 ~]# 
[root@dhcp37-55 ~]# gluster v info nash
 
Volume Name: nash
Type: Tier
Volume ID: 66caac13-cb0a-4a5d-93e3-544ad19472c2
Status: Started
Number of Bricks: 10
Transport-type: tcp
Hot Tier :
Hot Tier Type : Distributed-Replicate
Number of Bricks: 2 x 2 = 4
Brick1: 10.70.37.203:/rhs/thinbrick2/nash2
Brick2: 10.70.37.55:/rhs/thinbrick2/nash2
Brick3: 10.70.37.203:/rhs/thinbrick2/nash
Brick4: 10.70.37.55:/rhs/thinbrick2/nash
Cold Tier:
Cold Tier Type : Disperse
Number of Bricks: 1 x (4 + 2) = 6
Brick5: 10.70.37.55:/rhs/thinbrick1/nash
Brick6: 10.70.37.203:/rhs/thinbrick1/nash
Brick7: 10.70.37.210:/rhs/thinbrick1/nash
Brick8: 10.70.37.141:/rhs/thinbrick1/nash
Brick9: 10.70.37.210:/rhs/thinbrick2/nash
Brick10: 10.70.37.141:/rhs/thinbrick2/nash
Options Reconfigured:
cluster.read-freq-threshold: 0
cluster.write-freq-threshold: 0x3
features.record-counters: on
ganesha.enable: off
nfs.disable: off
performance.readdir-ahead: on
cluster.disperse-self-heal-daemon: enable
features.ctr-enabled: on
cluster.tier-mode: test
nfs-ganesha: disable
cluster.enable-shared-storage: enable
[root@dhcp37-55 ~]# 
[root@dhcp37-55 ~]# gluster v set nash cluster.read-freq-threshold 0x0
volume set: success
[root@dhcp37-55 ~]# gluster v get  nash cluster.read-freq-threshold 
Option                                  Value                                   
------                                  -----                                   
cluster.read-freq-threshold             0x0                                     
[root@dhcp37-55 ~]# gluster v set nash cluster.read-freq-threshold whatever
volume set: failed: whatever is not a compatible value. cluster.read-freq-threshold expects an integer value.
[root@dhcp37-55 ~]# gluster v set nash cluster.read-freq-threshold 0x1a
volume set: success
[root@dhcp37-55 ~]# gluster v get  nash cluster.read-freq-threshold 
Option                                  Value                                   
------                                  -----                                   
cluster.read-freq-threshold             0x1a                                    
[root@dhcp37-55 ~]# gluster v set nash cluster.read-freq-threshold ffff
volume set: failed: ffff is not a compatible value. cluster.read-freq-threshold expects an integer value.
[root@dhcp37-55 ~]# gluster v set nash cluster.read-freq-threshold 0xffff
volume set: success
[root@dhcp37-55 ~]# gluster v get  nash cluster.read-freq-threshold 
Option                                  Value                                   
------                                  -----                                   
cluster.read-freq-threshold             0xffff                                  
[root@dhcp37-55 ~]# 
[root@dhcp37-55 ~]#
Comment 3 Sweta Anandpara 2015-12-14 09:06:50 EST
1. 0xd would result in a similar output as seen in the logs above, for 0xffff

[root@dhcp37-55 ~]# gluster v set nash cluster.write-freq-threshold 0xd
volume set: success
[root@dhcp37-55 ~]# gluster v get nash cluster.write-freq-threshold
Option                                  Value                                   
------                                  -----                                   
cluster.write-freq-threshold            0xd                                     
[root@dhcp37-55 ~]# 

2. Yes, decimal values are known to be accepted, and they are (as mentioned in the description above). That is what has been tested until now.

Karthick's observation: Even negative values are accepted

[root@dhcp37-55 ~]# gluster v set nash cluster.write-freq-threshold -4
volume set: success
[root@dhcp37-55 ~]# gluster v get nash cluster.write-freq-threshold
Option                                  Value                                   
------                                  -----                                   
cluster.write-freq-threshold            -4                                      
[root@dhcp37-55 ~]#
Comment 4 SATHEESARAN 2015-12-18 09:21:34 EST
I am aware of some more options, where values are accepted as hexadecimal or octal. I thought that was the standard behavior though.

Few of the volume options as I know are below,

[root@ ~]# gluster volume set Gluster-Vol-2 high-prio-threads 0xf
volume set: success

[root@ ~]# gluster volume set Gluster-Vol-2 performance.cache-size 0xffff
volume set: success

[root@ ~]# gluster volume get Gluster-Vol-2 performance.cache-size
Option                                  Value                                   
------                                  -----                                   
performance.cache-size                  0xffff 

[root@ ~]# gluster volume set Gluster-Vol-2 high-prio-threads 071
volume set: success
[root@ ~]# gluster volume get Gluster-Vol-2 high-prio-threads
Option                                  Value                                   
------                                  -----                                   
performance.high-prio-threads           071   

So, I would call for action to set a standard behavior for all volume options either accepting hexadecimal, decimal & octal values or only decimal values.

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