Bug 880216

Summary: RHEVM-CLI: negative numbers wrapped as strings
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilia Meerovich <iliam>
Component: ovirt-engine-cliAssignee: Michael Pasternak <mpastern>
Status: CLOSED ERRATA QA Contact: Ilia Meerovich <iliam>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: bazulay, cboyle, dyasny, ecohen, iheim, oramraz, Rhev-m-bugs, sgrinber, ykaul
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: SF4 Doc Type: Bug Fix
Doc Text:
When setting a negative value for 'scheduling_policy-thresholds-low' the system did not recognize it as a number and generated the following error 'error: %d format: a number is required, not str'. This has been rectified so negative values can now be used.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-10 20:28:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 915537    

Description Ilia Meerovich 2012-11-26 14:19:47 UTC
When I'm running:
update cluster RestCluster6  --data_center-id '79a850e5-459c-4305-86f2-9a0be4f3a447' --scheduling_policy-policy 'power_saving' --scheduling_policy-thresholds-high 60 --scheduling_policy-thresholds-duration 240 --scheduling_policy-thresholds-low -1 --cpu-id 'AMD Opteron G3'

I'm getting  "error: %d format: a number is required, not str".
This is incorrect error.


[imeerovi@imeerovi ART]$ rpm -qa | grep rhevm-cli
rhevm-cli-3.1.0.17-1.el6ev.noarch

Comment 1 Michael Pasternak 2012-12-16 09:17:41 UTC
http://gerrit.ovirt.org/10100

Comment 2 Ilia Meerovich 2013-02-05 09:29:38 UTC
[RHEVM shell (connected)]# update cluster Default --data_center-id 36e3e8ae-48f9-11e2-85c4-001a4a169715 --scheduling_policy-policy 'power_saving' --scheduling_policy-thresholds-high 60 --scheduling_policy-thresholds-duration 240 --scheduling_policy-thresholds-low -1 --cpu-id 'AMD Opteron G3'

error: 
status: 400
reason: Bad Request
detail: Both low and high CPU utilization thresholds must be defined when using power saving policy.

[RHEVM shell (connected)]# 


wrong error message (expected message should be related to wrong value of --scheduling_policy-thresholds-low)

Comment 3 Michael Pasternak 2013-02-05 09:43:59 UTC
(In reply to comment #2)
> [RHEVM shell (connected)]# update cluster Default --data_center-id
> 36e3e8ae-48f9-11e2-85c4-001a4a169715 --scheduling_policy-policy
> 'power_saving' --scheduling_policy-thresholds-high 60
> --scheduling_policy-thresholds-duration 240
> --scheduling_policy-thresholds-low -1 --cpu-id 'AMD Opteron G3'
> 
> error: 
> status: 400
> reason: Bad Request
> detail: Both low and high CPU utilization thresholds must be defined when
> using power saving policy.
> 
> [RHEVM shell (connected)]# 
> 
> 
> wrong error message (expected message should be related to wrong value of
> --scheduling_policy-thresholds-low)

why do you think this is same bug & failed QA?, you can see backend error that you have to define both "low and high CPU utilization thresholds" while you defined only --scheduling_policy-thresholds-high!,

"scheduling_policy-thresholds-low -1" is illegal value from backend PoV, it's should be positive value,

also original error was "error: %d format: a number is required, not str"

Comment 4 Ilia Meerovich 2013-02-05 09:54:34 UTC
Michael, as end use i don't know what is backend and what is frontend, i know that i'm using rhevm-shell and i cannot understand from this error whats wrong.
so from my point of view bug is still open

Comment 5 Michael Pasternak 2013-02-05 10:09:35 UTC
(In reply to comment #4)
> Michael, as end use i don't know what is backend and what is frontend, i
> know that i'm using rhevm-shell and i cannot understand from this error
> whats wrong.
> so from my point of view bug is still open

This is not relevant what the backend is, you got very explicit error message
saying that you have to supply both high&low values, and since you provided low
value -1, it's illegal/not-ok from system PoV (if you want, you welcome to file BE bug on this for another error message), but since original bug was:

"error: %d format: a number is required, not str".

but since passing negative number (as is) worked, what is solved bug complaint, this bug cannot be open/failed-qa by definition.

Comment 6 Ilia Meerovich 2013-02-07 12:02:37 UTC
will open BE bug for it

Comment 7 errata-xmlrpc 2013-06-10 20:28:35 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.

http://rhn.redhat.com/errata/RHBA-2013-0890.html