Created attachment 747446 [details] Screenshot of the manager showing the problem Description of problem: At the admin portal use the following search string: Vms: sortby cpu_usage desc Top 2 results are powered off VMs with 0% CPU usage (see attached screenshot). They shouldn't be on top. Version-Release number of selected component (if applicable): 3.1.0-50.el6ev How reproducible: Always Additional info: RHEV-M API is also affected when using: /api/vms?search=sortby+cpu_usage+desc
This is the ORDER BY Syntax : ORDER BY sort_expression1 [ASC | DESC] [NULLS { FIRST | LAST }] [, sort_expression2 [ASC | DESC] [NULLS { FIRST | LAST }] ...] The NULLS FIRST and NULLS LAST options can be used to determine whether nulls appear before or after non-null values in the sort ordering. By default, null values sort as if larger than any non-null value; that is, NULLS FIRST is the default for DESC order, and NULLS LAST otherwise. Taking the bug
fixed in commit : c2a2d65
Verified is12. Vms are correctly sorted by cpu usage.
Closing - RHEV 3.3 Released