Bug 1443950

Summary: [Brick Multiplexing] "cluster.brick-multiplex" volume set option should only take boolean value as input
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Prasad Desala <tdesala>
Component: coreAssignee: Atin Mukherjee <amukherj>
Status: CLOSED ERRATA QA Contact: Nag Pavan Chilakam <nchilaka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, asoman, nchilaka, rhs-bugs, storage-qa-internal
Target Milestone: ---   
Target Release: RHGS 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: brick-multiplexing
Fixed In Version: glusterfs-3.8.4-24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-21 04:39:40 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: 1417151    

Description Prasad Desala 2017-04-20 10:23:34 UTC
Description of problem:
=======================
When setting "cluster.brick-multiplex" volume set option to gluster volumes, the command is taking any input as success. The input can be either string, hex, integer.

"cluster.brick-multiplex" volume set option should take only boolean value (Enable, Disable, 0 ,1) as input.

Version-Release number of selected component (if applicable):
3.8.4-22.el7rhgs.x86_64

How reproducible:
=================
100%

Steps to Reproduce:
===================
1) Create any type of volume and start it.
2) Enable brick multiplexing option on the volume using the below command,

Volume Name: distrep_3
Type: Distributed-Replicate
Volume ID: ac1e7f13-09ce-4137-a1e3-ac19228de8ee
Status: Started
Snapshot Count: 0
Number of Bricks: 4 x 3 = 12
Transport-type: tcp
Bricks:
Brick1: 10.70.43.49:/bricks/brick0/b0
Brick2: 10.70.43.41:/bricks/brick0/b0
Brick3: 10.70.43.35:/bricks/brick0/b0
Brick4: 10.70.43.37:/bricks/brick0/b0
Brick5: 10.70.43.31:/bricks/brick0/b0
Brick6: 10.70.43.27:/bricks/brick0/b0
Brick7: 10.70.43.49:/bricks/brick1/b1
Brick8: 10.70.43.41:/bricks/brick1/b1
Brick9: 10.70.43.35:/bricks/brick1/b1
Brick10: 10.70.43.37:/bricks/brick1/b1
Brick11: 10.70.43.31:/bricks/brick1/b1
Brick12: 10.70.43.27:/bricks/brick1/b1
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
cluster.brick-multiplex: 0101   --------------> 

Volume Name: distrep_3
Type: Distributed-Replicate
Volume ID: ac1e7f13-09ce-4137-a1e3-ac19228de8ee
Status: Started
Snapshot Count: 0
Number of Bricks: 4 x 3 = 12
Transport-type: tcp
Bricks:
Brick1: 10.70.43.49:/bricks/brick0/b0
Brick2: 10.70.43.41:/bricks/brick0/b0
Brick3: 10.70.43.35:/bricks/brick0/b0
Brick4: 10.70.43.37:/bricks/brick0/b0
Brick5: 10.70.43.31:/bricks/brick0/b0
Brick6: 10.70.43.27:/bricks/brick0/b0
Brick7: 10.70.43.49:/bricks/brick1/b1
Brick8: 10.70.43.41:/bricks/brick1/b1
Brick9: 10.70.43.35:/bricks/brick1/b1
Brick10: 10.70.43.37:/bricks/brick1/b1
Brick11: 10.70.43.31:/bricks/brick1/b1
Brick12: 10.70.43.27:/bricks/brick1/b1
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
cluster.brick-multiplex: abcdefg ------------------->


Actual results:
===============
"cluster.brick-multiplex" volume set option is taking any input as success.

Expected results:
=================
"cluster.brick-multiplex" volume set option should only take boolean value as input

Comment 2 Atin Mukherjee 2017-04-20 15:27:23 UTC
upstream patch : https://review.gluster.org/#/c/16704/

Comment 4 Atin Mukherjee 2017-04-24 09:53:54 UTC
*** Bug 1444784 has been marked as a duplicate of this bug. ***

Comment 6 Atin Mukherjee 2017-04-24 12:39:36 UTC
downstream patch : https://code.engineering.redhat.com/gerrit/#/c/104133/

Comment 8 Nag Pavan Chilakam 2017-04-26 14:27:54 UTC
on_qa validation:
1)tested with different sets of options. only boolean values were allowed as below
[root@dhcp35-45 ~]# gluster v set all cluster.brick-multiplex asdsdj
volume set: failed: asdsdj is not a valid boolean value. cluster.brick-multiplex expects a valid boolean value.
[root@dhcp35-45 ~]# gluster v set all cluster.brick-multiplex enable
volume set: success
[root@dhcp35-45 ~]# gluster v set all cluster.brick-multiplex 111
volume set: failed: 111 is not a valid boolean value. cluster.brick-multiplex expects a valid boolean value.
[root@dhcp35-45 ~]# gluster v set all cluster.brick-multiplex asdsad
volume set: failed: asdsad is not a valid boolean value. cluster.brick-multiplex expects a valid boolean value.
[root@dhcp35-45 ~]# 



[root@dhcp35-45 ~]# gluster v get all all
Option                                  Value                                   
------                                  -----                                   
cluster.server-quorum-ratio             51                                      
cluster.enable-shared-storage           disable                                 
cluster.op-version                      31100                                   
cluster.brick-multiplex                 enable                                  
[root@dhcp35-45 ~]# gluster v set all cluster.brick-multiplex false
volume set: success
[root@dhcp35-45 ~]# gluster v get all all
Option                                  Value                                   
------                                  -----                                   
cluster.server-quorum-ratio             51                                      
cluster.enable-shared-storage           disable                                 
cluster.op-version                      31100                                   
cluster.brick-multiplex                 false                



boolean values tried:
true/false 1/0 enable/disable on/off



also saw that the above boolean were functionally effective, hence moving to verified

build:3.8.4-24

Comment 10 errata-xmlrpc 2017-09-21 04:39:40 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/RHBA-2017:2774