Bug 1166590

Summary: [USS]: Error on setting wrong value of uss should be enhanced
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rahul Hinduja <rhinduja>
Component: snapshotAssignee: Vijaikumar Mallikarjuna <vmallika>
Status: CLOSED WORKSFORME QA Contact: storage-qa-internal <storage-qa-internal>
Severity: low Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: asengupt, rhs-bugs, smohan, storage-qa-internal, vmallika
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: USS
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-03 09:13:42 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: 1163736, 1168819, 1304282, 1305868    
Bug Blocks:    

Description Rahul Hinduja 2014-11-21 10:06:07 UTC
Description of problem:
=======================

Currently when a user sets the wrong value to uss, it fails as 

[root@inception ~]# gluster v set vol0 uss sjsjjsjs
volume set: failed: Error, Validation Failed
[root@inception ~]# 

The above message is not intuitive, the other gluster volume set options fails with something like:

[root@inception ~]# gluster v set vol0 nfs.disable dkjjdjdjd
volume set: failed: option nfs.vol0.disable dkjjdjdjd: 'dkjjdjdjd' is not a valid boolean value
[root@inception ~]# gluster v set vol0 self-heal-daemon 2
volume set: failed: option self-heal-daemon 2: '2' is not a valid boolean value
[root@inception ~]# gluster v set vol0 nfs.acl 2
volume set: failed: option nfs.acl 2: '2' is not a valid boolean value
[root@inception ~]# gluster v set vol0 client-log-level ksksksk
volume set: failed: option log-level ksksksk: 'ksksksk' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)
[root@inception ~]# gluster v set vol0 client-log-format kjkdsfdjkf
volume set: failed: option log-format kjkdsfdjkf: 'kjkdsfdjkf' is not valid (possible options are no-msg-id, with-msg-id.)
[root@inception ~]# 


It makes sense to report something like:
========================================


[root@inception ~]# gluster v set vol0 uss kjkdsfdjkf
volume set: failed: option uss kjkdsfdjkf: 'kjkdsfdjkf' is not valid (possible options are on, off, enable, disable)
[root@inception ~]# 


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

glusterfs-3.6.0.33-1.el6rhs.x86_64


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

always

Comment 2 Vijaikumar Mallikarjuna 2016-02-03 09:13:42 UTC
This issue is not reproducible in glusterfs-3.7.5, so closing the bug:

# gluster volume set vol1 uss abc
volume set: failed: abc is not a valid boolean value. uss expects a valid boolean value.

# gluster volume set vol1 uss enable
volume set: success

# gluster volume set vol1 uss off
volume set: success