Bug 861301 - PSQLException: The column name disk_storage_type was not found in this ResultSet
PSQLException: The column name disk_storage_type was not found in this ResultSet
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
high Severity high
: ---
: 3.1.0
Assigned To: Greg Padgett
Haim
storage
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-28 01:34 EDT by shylesh
Modified: 2016-02-10 14:29 EST (History)
12 users (show)

See Also:
Fixed In Version: SI22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description shylesh 2012-09-28 01:34:35 EDT
Description of problem:
rhevm engine logs says failures where as webadmin console shows all VMs as healthy

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

How reproducible:


Steps to Reproduce:

  I could see following error messages from rhevm engine logs but on the webadmin console
all the VMs looks healthy, any idea what's happening here.

2012-09-27 08:34:10,679 ERROR [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8009-5) Query SearchQuery failed. Exception message is StatementCallback; bad SQL grammar [SELECT * FROM (SELECT * FROM storage_pool WHERE ( id IN (SELECT storage_pool_with_storage_domain.id FROM  storage_pool_with_storage_domain   WHERE  storage_pool_with_storage_domain.name LIKE 'RHS-RHEV-SHYLESH' ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100]; nested exception is org.postgresql.util.PSQLException: The column name disk_storage_type was not found in this ResultSet.
2012-09-27 08:34:11,421 ERROR [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8009-23) Query SearchQuery failed. Exception message is StatementCallback; bad SQL grammar [SELECT * FROM (SELECT * FROM all_disks WHERE ( disk_id IN (SELECT all_disks.disk_id FROM  all_disks   LEFT OUTER JOIN storage_domains_with_hosts_view ON all_disks.image_guid=storage_domains_with_hosts_view.image_guid    WHERE  storage_domains_with_hosts_view.storage_name LIKE 'replicate-new' ))  ORDER BY disk_alias ASC ) as T1 OFFSET (1 -1) LIMIT 100]; nested exception is org.postgresql.util.PSQLException: ERROR: column storage_domains_with_hosts_view.image_guid does not exist
  Position: 175
2012-09-27 08:34:15,669 ERROR [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8009-1) Query SearchQuery failed. Exception message is StatementCallback; bad SQL grammar [SELECT * FROM (SELECT * FROM storage_pool WHERE ( id IN (SELECT storage_pool_with_storage_domain.id FROM  storage_pool_with_storage_domain   WHERE  storage_pool_with_storage_domain.name LIKE 'RHS-RHEV-SHYLESH' ))  ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100]; nested exception is org.postgresql.util.PSQLException: The column name disk_storage_type was not found in this ResultSet.


Additional info:
================

Thanking Shireesh for providing analysis of the bug

Here is the analysis provided by shireesh
==========================================
Looks like a bug to me. Guess you (or someone using the same setup)
tried to search for disks from a storage domain named 'RHS-RHEV-SHYLESH'
using the search bar at the top. That search must surely have failed
because of above sql errors. It seems that linking between disks and
storage domains is being done by joining the views all_disks and
storage_domains_with_hosts_view, with the join key being image_guid on
both sides (source: SearchObjectAutoCompleter.java). However this column
(image_guid) exists only in all_disks and *not* in
storage_domains_with_hosts_view (source: create_views.sql).

I think you can raise a bug provide the logs, unless someone responds
saying that above understanding is totally wrong :)

Regards,
Shireesh
Comment 1 Itamar Heim 2012-10-02 13:39:21 EDT
shylesh - please attach engine log for completeness
Comment 2 Itamar Heim 2012-10-02 13:41:54 EDT
shylesh - just browsing the disks tab doesn't seem to reproduce this - please provide reproduce steps as well.
Comment 3 Greg Padgett 2012-10-04 19:38:12 EDT
I can't reproduce the first (and third) failure shown above.  I can run the query by searching for "DataCenter: name = iscsi", but it succeeds.

I /can/ reproduce the second error by searching for "disks: storages = iscsi1".
Comment 4 Greg Padgett 2012-10-05 19:53:51 EDT
This patch fixes the second error in the log above:

http://gerrit.ovirt.org/8385

I can't reproduce the other errors, so I assume they're no longer occurring.  Please let me know if this isn't the case.
Comment 7 Ayal Baron 2012-10-22 15:47:57 EDT
Change-Id: I2a1467a9a5a6ffdcbaf388ce06f43eb6f9f34ab5
Comment 8 Haim 2012-10-24 13:14:31 EDT
fixed on SI22. 
issue no longer reproduces when searching for disks under specific data-center. 

disks: Storage = CHAP

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