Bug 816462

Summary: rhc-admin-chk still returns Success when actual gears and consumed gears don't match
Product: OKD Reporter: jizhao
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: mpatel, szhou, xtian
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-14 17:22:17 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 jizhao 2012-04-26 06:55:23 UTC
Description of problem:
Set user's consumed_gears to an incorrect value and run rhc-admin-chk. Although it prints some error message, it still prints "Success" and returns 0.

Version-Release number of selected component (if applicable):
rhc-broker-0.91.17-1.el6_2.noarch

How reproducible:
Always

Steps to Reproduce:
1.Set user's consumed_gears to an incorrect value
$ rhc-admin-ctl-user -l <rhlogin> --setconsumedgears 2
2.Run rhc-admin-chk
$ rhc-admin-chk
3.Check the return value
$ echo $?
  
Actual results:
2.rhc-admin-chk still prints "Success"
<----------------------output---------------------->
FAIL - user jizhao+5 has a mismatch in consumed gears (1) and actual gears (0)!
Success
<---------------------------------------------->
3.The return value is 0.

Expected results:
rhc-admin-chk should fail and return non-zero value.

Additional info:

Comment 1 Rajat Chopra 2012-04-27 23:13:28 UTC
fixed with rev#434a8ec31bc002efe35c2411f5db6babc6fdc7b1

Comment 2 Xiaoli Tian 2012-05-07 08:02:50 UTC
Verified this on devenv_1757: 

#rhc-admin-chk 
Check failed.
 FAIL - user xtian+test5 has a mismatch in consumed gears (5) and actual gears (2)!

[root@ip-10-100-211-171 default]# echo $?
1