Bug 880216 - RHEVM-CLI: negative numbers wrapped as strings
Summary: RHEVM-CLI: negative numbers wrapped as strings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.2.0
Assignee: Michael Pasternak
QA Contact: Ilia Meerovich
URL:
Whiteboard: infra
Depends On:
Blocks: 915537
TreeView+ depends on / blocked
 
Reported: 2012-11-26 14:19 UTC by Ilia Meerovich
Modified: 2016-02-10 19:21 UTC (History)
9 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-06-10 20:28:35 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0890 0 normal SHIPPED_LIVE rhevm-cli bug fix and enhancement update 2013-06-11 00:24:57 UTC

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


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