Bug 1402425 - Failed to run VM - Exception: org.springframework.jdbc.BadSqlGrammarException: Prepa redStatementCallback; bad SQL grammar
Summary: Failed to run VM - Exception: org.springframework.jdbc.BadSqlGrammarException...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.1.0
Hardware: x86_64
OS: Unspecified
high
high vote
Target Milestone: ovirt-4.1.0-beta
: ---
Assignee: Martin Mucha
QA Contact: Meni Yakove
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-07 14:26 UTC by Michael Burman
Modified: 2016-12-12 09:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-12 09:57:38 UTC
oVirt Team: Network
rule-engine: ovirt-4.1+


Attachments (Terms of Use)
engine log (144.08 KB, application/x-gzip)
2016-12-07 14:26 UTC, Michael Burman
no flags Details

Description Michael Burman 2016-12-07 14:26:46 UTC
Created attachment 1229066 [details]
engine log

Description of problem:
Failed to run VM - Exception: org.springframework.jdbc.BadSqlGrammarException: Prepa redStatementCallback; bad SQL grammar

Version-Release number of selected component (if applicable):
 4.1.0-0.2.master.20161206231204.git3921e29.el7.centos

How reproducible:
100

Steps to Reproduce:
1. Try to run VM on latest master 4.1.0-0.2.master.20161206231204.git3921e29.el7.centos


Actual results:
Failed 
2016-12-07 16:03:39,659+02 ERROR [org.ovirt.engine.core.bll.RunVmCommand] (org.ovirt.thread.pool-6-thread-9) [bb854e95-dff7-4149-9817-f924ee7af797] Command 'org.ovirt.engine.core.bll.RunVmCommand' failed: Prepared
StatementCallback; bad SQL grammar [select * from  getvnicprofilebyvnicprofileid(?)]; nested exception is org.postgresql.util.PSQLException: The column name migratable was not found in this ResultSet.
2016-12-07 16:03:39,659+02 ERROR [org.ovirt.engine.core.bll.RunVmCommand] (org.ovirt.thread.pool-6-thread-9) [bb854e95-dff7-4149-9817-f924ee7af797] Exception: org.springframework.jdbc.BadSqlGrammarException: Prepa
redStatementCallback; bad SQL grammar [select * from  getvnicprofilebyvnicprofileid(?)]; nested exception is org.postgresql.util.PSQLException: The column name migratable was not found in this ResultSet.
        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:99) [spring-jdbc.jar:4.2.4.RELEASE]


Expected results:
Should work

Additional info:
It is caused by the 'migratable' parameter we added for vNIC profile.
Please note this is also affecting the vNIC profile sub tab, it is broken and can't be loaded.
Another thing is that when trying to create new vNIC profile the 'migratable' property is checked by default.

Comment 1 Michael Burman 2016-12-07 14:47:22 UTC
This bug affecting another scenario like
remove network from dc

2016-12-07 16:45:05,936+02 ERROR [org.ovirt.engine.core.bll.network.dc.RemoveNetworkCommand] (org.ovirt.thread.pool-6-thread-37) [2072dcd2-a20c-477c-84ee-845e1a20110d] Command 'org.ovirt.engine.core.bll.network.dc
.RemoveNetworkCommand' failed: PreparedStatementCallback; bad SQL grammar [select * from  getvnicprofilesbynetworkid(?)]; nested exception is org.postgresql.util.PSQLException: The column name migratable was not found in this ResultSet.
2016-12-07 16:45:05,936+02 ERROR [org.ovirt.engine.core.bll.network.dc.RemoveNetworkCommand] (org.ovirt.thread.pool-6-thread-37) [2072dcd2-a20c-477c-84ee-845e1a20110d] Exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from  getvnicprofilesbynetworkid(?)]; nested exception is org.postgresql.util.PSQLException: The column name migratable was not found in this ResultSet.
        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:99) [spring-jdbc.jar:4.2.4.RELEASE]

Comment 2 Michal Skrivanek 2016-12-07 15:53:31 UTC
note the setup I've seen this happening on was quite dirty with other exceptions, so proabably not all db upgrade scripts were executed correctly. Please check that

Comment 3 Meni Yakove 2016-12-12 09:57:38 UTC
this issue no longer shows up after upgrade to recent master branch.


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