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

Bug 1168754

Summary: [engine-backend] AddProvider causes a PSQLException
Product: Red Hat Enterprise Virtualization Manager Reporter: Elad <ebenahar>
Component: ovirt-engineAssignee: Daniel Erez <derez>
Status: CLOSED DUPLICATE QA Contact: Aharon Canan <acanan>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: amureini, derez, ebenahar, ecohen, gklein, iheim, lpeer, lsurette, oourfali, rbalakri, Rhev-m-bugs, scohen, tnisan, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-01 15:37:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
sosreport none

Description Elad 2014-11-27 18:28:34 UTC
Created attachment 962235 [details]
sosreport

Description of problem:
Added a glance external provide, didn't test its authentication (public repository). The action caused a PSQL exception which flooded engine.log

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

How reproducible:
Happened once

Steps to Reproduce:
1. Add an external provider, choose openstach image
2.
3.

Actual results:
It seems that the provider was added successfully but checking engine.log revealed it had caused a PSQL exception which flooded the log file

2014-11-27 19:57:35,165 INFO  [org.ovirt.engine.core.bll.provider.AddProviderCommand] (ajp-/127.0.0.1:8702-7) [11ad947c] Running command: AddProviderCommand internal: false. Entities affected :  ID: aaa00000-0000-0000-0000-123456789aaa Type: SystemAction group CREATE_STORAGE_POOL with role type ADMIN
2014-11-27 19:57:35,192 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-7) [11ad947c] Correlation ID: 11ad947c, Call Stack: null, Custom Event ID: -1, Message: Provider glance was added. (User: admin)
2014-11-27 19:57:35,366 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 providers.* FROM  providers  )  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. : org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT * FROM ((SELECT distinct providers.* FROM  providers  )  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.: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT * FROM ((SELECT distinct providers.* FROM  providers  )  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.
        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:98) [spring-jdbc.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) [spring-jdbc.jar:3.1.1.RELEASE]



Additional info:
sosreport

Comment 1 Oved Ourfali 2014-11-28 06:08:10 UTC
From the exception it seems like a storage issue. Allon, if I'm wrong here let me know.

Comment 2 Allon Mureinik 2014-11-28 10:41:00 UTC
Not quite clear why we're attempting to search a disk from the providers table.

Daniel, can you take a look please?

Comment 3 Allon Mureinik 2014-11-28 10:43:10 UTC
Elad - just to confirm, this was done via the webadmin GUI, right?

Comment 4 Elad 2014-11-29 11:12:28 UTC
(In reply to Allon Mureinik from comment #3)
> Elad - just to confirm, this was done via the webadmin GUI, right?
right

Comment 5 Daniel Erez 2014-11-30 11:57:04 UTC
Hi Elad,

Is the described issue reproduces after refreshing the browser? I couldn't reproduce it on a 3.5 build.

Comment 6 Elad 2014-12-01 06:38:26 UTC
(In reply to Daniel Erez from comment #5)
> Hi Elad,
> 
> Is the described issue reproduces after refreshing the browser? I couldn't
> reproduce it on a 3.5 build.

Actually, I'm not sure under what circumstances it occurs. It happened once.

Comment 7 Daniel Erez 2014-12-01 15:37:24 UTC
(In reply to Elad from comment #6)
> (In reply to Daniel Erez from comment #5)
> > Hi Elad,
> > 
> > Is the described issue reproduces after refreshing the browser? I couldn't
> > reproduce it on a 3.5 build.
> 
> Actually, I'm not sure under what circumstances it occurs. It happened once.

OK, so I'll close it as a duplicate of bug 1047850 (see comment #5) as the error is similar. Please reopen if can be reproduced.

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