Bug 1168480

Summary: Should prompt correct information when execute oo-admin-ctl-user --addgearsize $invalid value
Product: OpenShift Container Platform Reporter: wangyanyan <yanywang>
Component: NodeAssignee: Sally <somalley>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.2.0CC: gpei, jialiu, jokerman, libra-onpremise-devel, mmccomas, rthrashe, somalley, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-origin-broker-util-1.37.5.2-1.el6op rubygem-openshift-origin-controller-1.38.5.1-1.el6op Doc Type: Bug Fix
Doc Text:
Cause: oo-admin-ctl-user --addgearsize <invalid name> produced a confusing error msg with backtrace info. Fix: Clarified oo-admin-ctl-user --addgearsize <invalid name> error msg. Removed the backtrace info from the error msg and updated the error msg. Result: Error msg is now more readable for users.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-22 16:51:06 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:

Description wangyanyan 2014-11-27 05:50:16 UTC
Description of problem:
In broker execute oo-admin-ctl-user -l$usename --addgearsize small,medium or other invalid value, it prompts error info

Version-Release number of selected component (if applicable):
ose2.2.2/2014-11-24.3

How reproducible:
Always

Steps to Reproduce:
1.oo-admin-ctl-user -lwyy --addgearsize small,medium

Actual results:
# oo-admin-ctl-user --addgearsize small,medium -lyanywang
Adding gear size small,medium for user yanywang... Size small,medium is not defined. Defined sizes are: small, medium.
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.32.3.1/app/models/cloud_user.rb:400:in `add_gear_size'
/usr/sbin/oo-admin-ctl-user:380:in `block in add_gear_size'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.32.3.1/app/models/lock.rb:92:in `_run_in_app_user_lock'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.32.3.1/app/models/lock.rb:38:in `run_in_user_lock'
/usr/sbin/oo-admin-ctl-user:379:in `add_gear_size'
/usr/sbin/oo-admin-ctl-user:728:in `block in <main>'
/usr/sbin/oo-admin-ctl-user:653:in `each'
/usr/sbin/oo-admin-ctl-user:653:in `<main>'

Expected results:
ERROR:addgearsize must be one of small or medium 

Additional info:

Comment 2 openshift-github-bot 2015-12-16 20:29:56 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/3327dbdb673981e6ac3295f0bf052a6711375039
oo-admin-ctl-user: clarify error msg

Bug 1168480
Bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1168480
Clarify oo-admin-ctl-user --addgearsize <invalid name> error msg.
Removed the backtrace info from the error msg and updated the error msg.
Error msg is now more readable for users.

Comment 3 Johnny Liu 2016-01-07 08:06:01 UTC
Seem like the PR is for origin upstream, but not for OSE, right?
According to our work flow, QE need verify bug against a OSE errata puddle, I did not found any errata puddle yet, so I change the status to "MODIFIED", only when the PR is merged to OSE code source, and new a errata puddle, then move the bug to "ON_QA".

Comment 6 Rory Thrasher 2016-02-22 22:23:20 UTC
QE,

Can we verify that this is now fixed?

1.oo-admin-ctl-user -lwyy --addgearsize small,medium

Should now correctly error and output something like "ERROR:addgearsize must be one of small or medium"



Puddle: http://etherpad.corp.redhat.com/puddle-2-2-2016-02-19

Thank you

Comment 7 Gaoyun Pei 2016-02-26 09:16:15 UTC
Verify this bug with puddle 2.2/2016-02-25.2

[root@broker ~]# oo-admin-ctl-user -l gpei --addgearsize medium,large


Adding gear size medium,large for user gpei... 
ERROR: Size 'medium,large' is not defined. Available gear sizes: small, medium, large, small.highcpu.
[root@broker ~]# oo-admin-ctl-user -l gpei --addgearsize invalid


Adding gear size invalid for user gpei... 
ERROR: Size 'invalid' is not defined. Available gear sizes: small, medium, large, small.highcpu.

Comment 9 errata-xmlrpc 2016-03-22 16:51:06 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/RHSA-2016-0489.html