Description of problem: When giving bad input to list --max command I see wrong behavior: 1. when sending string as an input I get no error. 2. When sending negative numbers I get too detailed error ( see Additional Information ) Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: [RHEVM shell (connected)]# list vms --max -2 error: status: 400 reason: Bad Request detail: statementcallback; sql [select * from (select * from vms where ( vm guid in (select vms with tags.vm guid from vms with tags )) order by vm name asc ) as t1 offset (1 -1) limit -2]; error: limit must not be negative; nested exception is org.postgresql.util.psqlexception: error: limit must not be negative [RHEVM shell (connected)]# list vms --max string id : 014435b3-2dbb-4971-977b-002d4bd8acd4 name : oded id : f5ec4710-655f-4535-8a26-0ef45bbc8e31 name : t-1 id : 0c373c97-0a72-4e4e-a9fd-7d7d906e9531 name : Windows
Where did the parameter --max came from? I couldn't find any mention of it in documentation or code. maybe you meant --show-all ? Also regarding 'string' it looks like invalid syntax, according to the docs a query should look something like: [oVirt shell (connected)]# list vms --query "name=kuku*" So IMO writing #list vms --max kuku is just like writing: #list vms --max and like writing list vms As all those parameters are unexpected and ignored. The -2 is a different issue. Please clarify what you meant regarding the parameters. Thanks.
My mistake, this parameter certainly exists. patch proposed updstream to limit --max arg to be a number > -1 (-1 means no limit) and return an error otherwise
Other patch already merged, abandoning changes. *** This bug has been marked as a duplicate of bug 958726 ***