Bug 1381158 - CLI option "--timeout" is accepting non numeric and negative values.
Summary: CLI option "--timeout" is accepting non numeric and negative values.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: cli
Version: rhgs-3.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: RHGS 3.3.0
Assignee: Atin Mukherjee
QA Contact: Bala Konda Reddy M
URL:
Whiteboard:
Depends On: 1420697 1421017
Blocks: 1417147
TreeView+ depends on / blocked
 
Reported: 2016-10-03 09:28 UTC by Byreddy
Modified: 2017-09-21 04:54 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.8.4-19
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1420697 (view as bug list)
Environment:
Last Closed: 2017-09-21 04:28:23 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2774 0 normal SHIPPED_LIVE glusterfs bug fix and enhancement update 2017-09-21 08:16:29 UTC

Description Byreddy 2016-10-03 09:28:25 UTC
Description of problem:
=======================
Gluster CLI option "--timeout" is accepting  non numeric and negative values.

This option is introduced for the issue:  https://bugzilla.redhat.com/show_bug.cgi?id=1340338

Non Numeric value setting
[root@ ~]# gluster --timeout=xvafgs   volume  status replica inode
^Z
[1]+  Stopped                 gluster --timeout=xvafgs volume status replica inode
[root@ ~]# 

Negative value setting:
~]# gluster --timeout=-12  volume  status replica inode

^Z
[2]+  Stopped                 gluster --timeout=-12 volume status replica inode
[root@ ~]# 




Version-Release number of selected component (if applicable):
===========================================================
glusterfs-3.8.4-2


How reproducible:
=================
Always

Steps to Reproduce:
1. Use CLI option "--timeout=" with negative values and non numeric values.
2.
3.

Actual results:
===============
CLI option "--timeout" is accepting negative and non  numeric values 


Expected results:
================
It should accept only positive numeric values

Additional info:

Comment 4 Atin Mukherjee 2017-02-09 10:41:13 UTC
upstream patch : https://review.gluster.org/16578

Comment 6 Atin Mukherjee 2017-03-24 09:41:09 UTC
downstream patch : https://code.engineering.redhat.com/gerrit/#/c/101312/

Comment 8 Bala Konda Reddy M 2017-04-07 10:31:32 UTC
Verified in the build: glusterfs-3.8.4-21

CLI option --timeout is accepting only positive integers throws correct error message when non-numeric and negative integers are given

[root@dhcp37-135 /]# gluster vol status testvol inode --timeout=ab
timeout value should be a postive integer
[root@dhcp37-135 /]# gluster vol status testvol inode --timeout=1ab
timeout value should be a postive integer
[root@dhcp37-135 /]# gluster vol status testvol inode --timeout=10ab
timeout value should be a postive integer
[root@dhcp37-135 /]# gluster vol status testvol inode --timeout=10!
timeout value should be a postive integer
[root@dhcp37-135 /]# gluster vol status testvol inode --timeout=10~
timeout value should be a postive integer
[root@dhcp37-135 /]# gluster vol status testvol inode --timeout=-10
timeout value should be a postive integer

Hence marking the bug verified

Comment 10 errata-xmlrpc 2017-09-21 04:28:23 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

Comment 11 errata-xmlrpc 2017-09-21 04:54:54 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


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