Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1219557

Summary: Cannot sort on IP Address column in Virtual Machines tab
Product: Red Hat Enterprise Virtualization Manager Reporter: Allie DeVolder <adevolder>
Component: ovirt-engine-webadmin-portalAssignee: Nobody <nobody>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matyáš <pmatyas>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: adevolder, ecohen, eedri, lsurette, mgoldboi, michal.skrivanek, ofrenkel, pmatyas, rbalakri, Rhev-m-bugs, tjelinek, yeylon, ylavi
Target Milestone: ---Keywords: Reopened
Target Release: 3.5.4   
Hardware: All   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-17 12:31:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screen-shot: sorting VMs by IP Address
none
Screenshots - sorting FQDN and description none

Description Allie DeVolder 2015-05-07 15:13:43 UTC
Description of problem:
The ability to sort by columns was implemented in RHEV 3.5, but the IP Address field in the Virtual Machines tab is shown to be sortable, but sorting on that column never completes.

Version-Release number of selected component (if applicable):
3.5

How reproducible:
Very

Steps to Reproduce:
1. Click on IP Address field in the Virtual Machines tab in the Admin Portal
2.
3.

Actual results:
No sorting occurs, though the indicator arrow shows that sorting should be working

Expected results:
Sorting

Additional info:

Comment 1 Einav Cohen 2015-05-09 02:39:01 UTC
Created attachment 1023677 [details]
screen-shot: sorting VMs by IP Address

Comment 2 Einav Cohen 2015-05-09 02:46:53 UTC
I tested on 3.6: I don't have VMs with IP addresses, so I cannot fully test it, but it seems that the GUI is properly sending the relevant search backend queries upon sorting by IP address (see attachment 1023677 [details]). 
However I don't know if the backend is actually returning the proper results or not (since I happen to have only VMs without IPs). 

So there are a couple of possibilities:

(1) the backend is returning the proper results -> it means that this 3.5 bug is already fixed in 3.6 (and originally might have been either a frontend and/or a backend issue). 

  - or -

(2) the backend is not returning the proper results -> it may mean that there is a problem with the "VMs: sort by IP" search query.

Comment 3 Omer Frenkel 2015-05-10 15:40:01 UTC
do you have more than one IP for a vm?
do you see any error in the engine.log (please attach)
this might be duplicate of
Bug 1164235 - Sort VM by IP fails if more than one IP listed for any VM entry

Comment 4 Michal Skrivanek 2015-05-22 07:56:44 UTC
ping

Comment 5 Omer Frenkel 2015-06-02 08:42:09 UTC
no response, and likely a duplicate of 
Bug 1164235 - Sort VM by IP fails if more than one IP listed for any VM entry

please re-open if needed

*** This bug has been marked as a duplicate of bug 1164235 ***

Comment 6 Allie DeVolder 2015-07-02 13:26:15 UTC
This also occurs under Templates when listing VMs, even if none of the listed VMs have multiple IP addresses

Comment 7 Omer Frenkel 2015-07-06 15:35:13 UTC
i have verified sorting by ip works (tried only with a single ip address)
both on latest 3.6 and 3.5.4
please note that vms sub-tab under templates main tab does not implement sorting, only in the vms main tab.

so no code change needed,
moving to qa for verification.

Comment 8 Eyal Edri 2015-07-09 07:44:47 UTC
missing pm + qa ack.

Comment 9 Yaniv Lavi 2015-07-12 00:43:00 UTC
The other bug was only fixed in 3.6, this issue is on 3.5. Adding flags to make sure master + 3.5 are tested.

Comment 10 Petr Matyáš 2015-07-14 09:24:14 UTC
VMs with IP address are always first when sorted by IP, they should be behind the ones without IP when sorted in ascending order.
Otherwise it's OK.

Comment 11 Michal Skrivanek 2015-07-14 09:31:04 UTC
(In reply to Petr Matyáš from comment #10)
> VMs with IP address are always first when sorted by IP, they should be
> behind the ones without IP when sorted in ascending order.
> Otherwise it's OK.

which build is this tested on? 3.6?

Comment 12 Petr Matyáš 2015-07-14 09:35:24 UTC
vt16.1, this one is for 3.5

Comment 13 Eyal Edri 2015-07-14 15:47:03 UTC
michal,
please clone this bug properly to 3.5.4/3.5.5 , as it has customer ticket,
we won't be able to add it to errata if it won't have the right flags.

Comment 14 Tomas Jelinek 2015-07-15 10:34:20 UTC
(In reply to Petr Matyáš from comment #10)
> VMs with IP address are always first when sorted by IP, they should be
> behind the ones without IP when sorted in ascending order.
> Otherwise it's OK.

this is by design, all fields with nullable values are last when they are null:
(in SyntaxChecker):

// Forcing any sorting using DESC to show NULL values last (NULLS FIRST is the default)
String direction = (obj.getBody().equalsIgnoreCase("desc")) ? "DESC NULLS LAST" : obj.getBody();

so, returning BZ status to the prev one

Comment 15 Petr Matyáš 2015-07-15 10:50:50 UTC
Created attachment 1052316 [details]
Screenshots - sorting FQDN and description

Then there is inconsistency in webadmin sorting. For example sorting by host works as you wrote, but if you sort by uptime ASC, items without value are first and if you sort by uptime DESC, items without value are last. Then there is sorting FQDN and description which works just weird.

So if this is correct behaviour for IP sorting I can file new bugs for the other fields.

Comment 16 Tomas Jelinek 2015-07-15 10:57:39 UTC
well, it depends if the empty value in DB is empty string or null. I agree there is an inconsistency - I'd open a bug to make the sorting of the fields with empty value consistent and discuss independently if we want the empty values to be always the last or not.

Comment 17 Michal Skrivanek 2015-07-17 12:31:26 UTC
there was no code change anywhere, no need to include that in erratum or anything