Bug 1198506 - RHEV-M admin portal pagination issue: disappeared list of VMs after sort it and select next page
Summary: RHEV-M admin portal pagination issue: disappeared list of VMs after sort it a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Eli Mesika
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks: 1223770
TreeView+ depends on / blocked
 
Reported: 2015-03-04 09:55 UTC by Yuri Obshansky
Modified: 2016-04-20 01:26 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1223770 (view as bug list)
Environment:
Last Closed: 2016-04-20 01:26:01 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine log file (127.14 KB, text/plain)
2015-03-04 09:56 UTC, Yuri Obshansky
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 38459 0 master MERGED core: do not use distinct if sort expr have func Never
oVirt gerrit 38492 0 ovirt-engine-3.5 MERGED core: do not use distinct if sort expr have func Never

Description Yuri Obshansky 2015-03-04 09:55:47 UTC
Description of problem:
I have RHEV-M setup with 200 VMs.
When I sorted VMs by Host (reproduced with other fields as well) click on arrow to go to next page than all VMs disappeared forever till next login to admin portal.
I found the next errors in engine log file:
2015-03-04 11:45:40,843 ERROR [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8702-3) Query SearchQuery failed. Exception message is StatementCallback; bad SQL grammar [SELECT * FROM ((SELECT distinct vms.* FROM  vms  )  ORDER BY fn_get_comparable_ip_list(vm_ip) ASC,vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 100]; nested exception is org.postgresql.util.PSQLException: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
  Position: 62 : org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT * FROM ((SELECT distinct vms.* FROM  vms  )  ORDER BY fn_get_comparable_ip_list(vm_ip) ASC,vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 100]; nested exception is org.postgresql.util.PSQLException: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
  Position: 62: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT * FROM ((SELECT distinct vms.* FROM  vms  )  ORDER BY fn_get_comparable_ip_list(vm_ip) ASC,vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 100]; nested exception is org.postgresql.util.PSQLException: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
  Position: 62
2015-03-04 11:45:50,501 INFO  [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8702-8) ResourceManager::searchBusinessObjects - erroneous search text - Vms: page 2 SORTBY HOST ASC
2015-03-04 11:45:54,218 INFO  [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8702-10) ResourceManager::searchBusinessObjects - erroneous search text - Vms: page 1 SORTBY HOST ASC

Version-Release number of selected component (if applicable):
RHEV-M 3.5.1-0.1
(build vt14)

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Yuri Obshansky 2015-03-04 09:56:36 UTC
Created attachment 997801 [details]
engine log file

Comment 2 Einav Cohen 2015-03-05 16:18:39 UTC
the "bad SQL grammar" implies that there is something wrong with the SQL query generated for the "Vms: page 1 SORTBY HOST ASC" (which, AFAIK, is a legal search text, otherwise an SQL query would not be generated in the first place).

Comment 4 Petr Matyáš 2015-06-11 09:07:12 UTC
Verified on ovirt-engine-backend-3.6.0-0.0.master.20150610173629.gitdf68a60.el6.noarch


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