Bug 1371515 - Exception on GetUserProfileQuery (unknown cause) : "The column name user_portal_vm_auto_login was not found in this ResultSet"
Summary: Exception on GetUserProfileQuery (unknown cause) : "The column name user_port...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Database.Core
Version: 4.0.2.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Martin Perina
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-30 11:47 UTC by Yaniv Kaul
Modified: 2016-09-26 12:41 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:41:19 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: blocker+
mgoldboi: planning_ack+
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 63200 0 master MERGED core: Fix upgrade issue 2016-09-04 09:43:11 UTC
oVirt gerrit 63201 0 ovirt-engine-4.0 MERGED core: Fix upgrade issue 2016-09-04 11:00:30 UTC
oVirt gerrit 63202 0 ovirt-engine-4.0.4 MERGED core: Fix upgrade issue 2016-09-04 11:04:32 UTC

Description Yaniv Kaul 2016-08-30 11:47:53 UTC
Description of problem:

Found on RHEV.TLV setup, unknown cause:
2016-08-30 14:43:08,671 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-229) [] Query 'GetUserProfileQuery' failed: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofileby
userid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:43:08,673 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-229) [] Exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select 
* from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:99) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:645) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:680) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:712) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:762) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall.executeCallInternal(PostgresDbEngineDialect.java:154) [dal.jar:]
        at org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall.doExecute(PostgresDbEngineDialect.java:120) [dal.jar:]
        at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:198) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:147) [dal.jar:]
        at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeReadList(SimpleJdbcCallsHandler.java:109) [dal.jar:]
        at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeRead(SimpleJdbcCallsHandler.java:101) [dal.jar:]
        at org.ovirt.engine.core.dao.UserProfileDaoImpl.getByUserId(UserProfileDaoImpl.java:49) [dal.jar:]
        at org.ovirt.engine.core.bll.GetUserProfileQuery.executeQueryCommand(GetUserProfileQuery.java:19) [bll.jar:]
        at org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:103) [bll.jar:]
        at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) [dal.jar:]
        at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:558) [bll.jar:]

...

Caused by: org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
        at org.postgresql.jdbc2.AbstractJdbc2ResultSet.findColumn(AbstractJdbc2ResultSet.java:2727)
        at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBoolean(AbstractJdbc2ResultSet.java:2572)
        at org.jboss.jca.adapters.jdbc.WrappedResultSet.getBoolean(WrappedResultSet.java:843)
        at org.ovirt.engine.core.dao.UserProfileDaoImpl$UserProfileRowMapper.mapRow(UserProfileDaoImpl.java:31) [dal.jar:]
        at org.ovirt.engine.core.dao.UserProfileDaoImpl$UserProfileRowMapper.mapRow(UserProfileDaoImpl.java:19) [dal.jar:]
        at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:93) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:693) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:629) [spring-jdbc.jar:4.2.4.RELEASE]
        ... 133 more



Version-Release number of selected component (if applicable):
[ykaul@nott16 ~]$ rpm -qa |grep ovirt |grep -E "engine|portal"
ovirt-engine-kerbldap-migration-1.0.4-1.el7ev.noarch
ovirt-engine-setup-plugin-vmconsole-proxy-helper-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-setup-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-restapi-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-extension-aaa-jdbc-1.1.0-1.el7ev.noarch
ovirt-engine-extension-aaa-ldap-setup-1.2.1-1.el7ev.noarch
ovirt-engine-setup-plugin-ovirt-engine-common-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-cli-3.6.8.1-1.el7ev.noarch
ovirt-engine-dbscripts-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-userportal-debuginfo-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-extension-aaa-misc-1.0.1-2.el7ev.noarch
ovirt-engine-dwh-setup-4.0.2-1.el7ev.noarch
ovirt-engine-websocket-proxy-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-extensions-api-impl-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-tools-backup-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-tools-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-webadmin-portal-debuginfo-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-webadmin-portal-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-lib-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-setup-plugin-ovirt-engine-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-vmconsole-proxy-helper-4.0.2.7-0.1.el7ev.noarch
python-ovirt-engine-sdk4-4.0.0-0.5.a5.el7ev.x86_64
ovirt-engine-userportal-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-extension-aaa-ldap-1.2.1-1.el7ev.noarch
ovirt-engine-setup-base-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-backend-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-dwh-4.0.2-1.el7ev.noarch
ovirt-engine-setup-plugin-websocket-proxy-4.0.2.7-0.1.el7ev.noarch
ovirt-engine-sdk-python-3.6.8.0-1.el7ev.noarch
ovirt-engine-dashboard-1.0.2-1.el7ev.x86_64



Actual results:


Expected results:


Additional info:

Comment 1 Yaniv Kaul 2016-08-30 12:56:58 UTC
BTW, it seems to flood the log. Example:

2016-08-30 14:49:20,495 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-142) [] Exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:20,946 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-239) [] Query 'GetUserProfileQuery' failed: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:20,946 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-239) [] Exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:20,957 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-239) [] Query 'GetUserProfileQuery' failed: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:20,957 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-239) [] Exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:22,662 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-117) [] Query 'GetUserProfileQuery' failed: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:22,662 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-117) [] Exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:31,434 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-239) [] Query 'GetUserProfileQuery' failed: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:31,434 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-239) [] Exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:31,812 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-234) [] Query 'GetUserProfileQuery' failed: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.
2016-08-30 14:49:31,812 ERROR [org.ovirt.engine.core.bll.GetUserProfileQuery] (default task-234) [] Exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from  getuserprofilebyuserid(?)]; nested exception is org.postgresql.util.PSQLException: The column name user_portal_vm_auto_login was not found in this ResultSet.

Comment 2 Martin Perina 2016-08-31 09:59:56 UTC
Marking as blocker, because all user upgrading from 3.6 are affected by this. Only new 4.0 installation (no upgrade) works fine

Comment 3 Martin Perina 2016-09-02 11:34:36 UTC
Here is workaround for 4.0.0 - 4.0.3 users who performed upgrade from 3.6 (clean 4.0 installations are not affected by this bug):

  cd /usr/share/ovirt-engine/dbscripts/upgrade
  cp 03_06_1790_add_vm_auto_login_column_to_user_profiles_table.sql 04_00_0865_add_vm_auto_login_column_to_user_profiles_table.sql
  engine-setup

Following workaround will cause no issues on future upgrade to 4.0.4, which fixes the issue regularly.

Comment 4 Lucie Leistnerova 2016-09-13 15:27:15 UTC
engine upgraded 3.6.9 -> 4.0.4 and column user_profiles.user_portal_vm_auto_login created, no setup error

verified in ovirt-engine-4.0.4.2-0.1.el7ev.noarch


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