Bug 1289660 - [Upgrade][Reports] Failed to upgrade rhevm-reports 3.5->3.6
[Upgrade][Reports] Failed to upgrade rhevm-reports 3.5->3.6
Status: CLOSED WORKSFORME
Product: ovirt-engine-reports
Classification: oVirt
Component: Setup (Show other bugs)
3.6.1
Unspecified Unspecified
unspecified Severity urgent (vote)
: ovirt-3.6.2
: ---
Assigned To: Yedidyah Bar David
Pavel Stehlik
reports
:
: 1289649 1289653 1289655 (view as bug list)
Depends On:
Blocks: RHEV3.6Upgrade
  Show dependency treegraph
 
Reported: 2015-12-08 11:34 EST by Gil Klein
Modified: 2016-03-30 07:48 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-20 15:00:41 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Reports
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ylavi: ovirt‑3.6.z?
gklein: blocker?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)
ovirt engine setup log (641.39 KB, text/plain)
2015-12-08 11:36 EST, Gil Klein
no flags Details
yum.log (51.69 KB, text/plain)
2015-12-15 04:18 EST, Gil Klein
no flags Details

  None (edit)
Description Gil Klein 2015-12-08 11:34:35 EST
Description of problem:

Failed to upgrade rhevm-reports-3.5.x to rhevm-reports-3.6.x

[ INFO  ] Cleaning async tasks and compensations
[ INFO  ] Unlocking existing entities
[ INFO  ] Checking the Engine database consistency
[ INFO  ] Stage: Transaction setup
[ INFO  ] Stopping dwh service
[ INFO  ] Stopping reports service
[ INFO  ] Stopping engine service
[ INFO  ] Stopping ovirt-fence-kdump-listener service
[ INFO  ] Stopping websocket-proxy service
[ INFO  ] Stage: Misc configuration
[ INFO  ] Regenerating Jasper's build configuration files
[ INFO  ] Exporting data out of Jasper
[ ERROR ] Failed to execute stage 'Misc configuration': Command './js-export.sh' failed to execute
[ INFO  ] Yum Performing yum transaction rollback
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20151208175005-p5xtuv.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20151208180000-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed



Version-Release number of selected component (if applicable):
From: rhevm-reports-3.5.5-2.el6ev.noarch
To: rhevm-reports-setup-3.6.1-1.el6ev.noarch


How reproducible:
100%


Steps to Reproduce:
1. Install RHEV 3.5 with rhevm-reports-3.5.5-2.el6ev.noarch
2. Run engine-config and setup the system
3. Add RHEV 3.6 repos and yum update
4. Run engine-config and trigger the upgrade

Actual results:
rhevm-reports upgrade fails on:
[ ERROR ] Failed to execute stage 'Misc configuration': Command './js-export.sh' failed to execute


Expected results:
rhevm-reports upgrade should succeed  


Additional info:

Caused by: org.postgresql.util.PSQLException: ERROR: relation "jidashboardmodel" does not exist
Comment 1 Gil Klein 2015-12-08 11:36 EST
Created attachment 1103646 [details]
ovirt engine setup log
Comment 2 Gil Klein 2015-12-08 16:16:03 EST
*** Bug 1289655 has been marked as a duplicate of this bug. ***
Comment 3 Gil Klein 2015-12-08 16:16:59 EST
*** Bug 1289653 has been marked as a duplicate of this bug. ***
Comment 4 Gil Klein 2015-12-08 16:18:32 EST
*** Bug 1289649 has been marked as a duplicate of this bug. ***
Comment 5 Sandro Bonazzola 2015-12-14 04:46:39 EST
2015-12-08 18:00:00 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_reports.jasper.deploy plugin.execute:941 execute-output: ('./js-export.sh', '--output-dir', '/tmp/tmpBzPls7/everything', '--everything') stderr:
com.jaspersoft.jasperserver.api.JSExceptionWrapper: org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select this_.id as id6_0_, this_.version as version6_0_, this_.name as name6_0_, this_.parent_folder as parent4_6_0_, this_.childrenFolder as children5_6_0_, this_.label as label6_0_, this_.description as descript7_6_0_, this_.resourceType as resource8_6_0_, this_.creation_date as creation9_6_0_, this_.update_date as update10_6_0_, this_1_.catalog as catalog26_0_, this_1_.mondrianConnection as mondrian3_26_0_, this_2_.adhocStateId as adhocSta2_35_0_, this_3_.foundationsString as foundati2_37_0_, this_3_.resourcesString as resource3_37_0_, this_3_.defaultFoundation as defaultF4_37_0_, this_4_.adhocStateId as adhocSta2_39_0_, this_4_.reportDataSource as reportDa3_39_0_, this_4_.promptcontrols as promptco4_39_0_, this_4_.controlslayout as controls5_39_0_, this_4_.controlrenderer as controlr6_39_0_, this_5_.options_name as options2_48_0_, this_5_.report_id as report3_48_0_, this_6_.schema_id as schema2_50_0_, this_6_.security_id as security3_50_0_, this_7_.type as type53_0_, this_7_.mandatory as mandatory53_0_, this_7_.readOnly as readOnly53_0_, this_7_.visible as visible53_0_, this_7_.data_type as data6_53_0_, this_7_.list_of_values as list7_53_0_, this_7_.list_query as list8_53_0_, this_7_.query_value_column as query9_53_0_, this_7_.defaultValue as default10_53_0_, this_8_.type as type55_0_, this_8_.maxLength as maxLength55_0_, this_8_.decimals as decimals55_0_, this_8_.regularExpr as regularE5_55_0_, this_8_.minValue as minValue55_0_, this_8_.max_value as max7_55_0_, this_8_.strictMin as strictMin55_0_, this_8_.strictMax as strictMax55_0_, this_9_.file_type as file3_4_0_, this_9_.reference as reference4_0_, this_11_.catalog as catalog57_0_, this_11_.username as username57_0_, this_11_.password as password57_0_, this_11_.datasource as datasource57_0_, this_11_.uri as uri57_0_, this_12_.beanName as beanName58_0_, this_12_.beanMethod as beanMethod58_0_, this_13_.jndiName as jndiName59_0_, this_13_.timezone as timezone59_0_, this_14_.dataSource as dataSource60_0_, this_14_.query_language as query3_60_0_, this_14_.sql_query as sql4_60_0_, this_15_.olapClientConnection as olapClie2_61_0_, this_15_.mdx_query as mdx3_61_0_, this_15_.view_options as view4_61_0_, this_16_.timezone as timezone62_0_, this_17_.reportDataSource as reportDa2_64_0_, this_17_.mondrianSchema as mondrian3_64_0_, this_18_.serviceClass as serviceC2_66_0_, this_20_.reportDataSource as reportDa2_70_0_, this_20_.query as query70_0_, this_20_.mainReport as mainReport70_0_, this_20_.controlrenderer as controlr5_70_0_, this_20_.reportrenderer as reportre6_70_0_, this_20_.promptcontrols as promptco7_70_0_, this_20_.controlslayout as controls8_70_0_, this_20_.data_snapshot_id as data9_70_0_, this_21_.adhocStateId as adhocSta2_73_0_, this_23_.driver as driver75_0_, this_23_.password as password75_0_, this_23_.connectionUrl as connecti4_75_0_, this_23_.username as username75_0_, this_23_.timezone as timezone75_0_, this_24_.accessKey as accessKey76_0_, this_24_.secretKey as secretKey76_0_, this_24_.roleARN as roleARN76_0_, this_24_.region as region76_0_, this_24_.dbName as dbName76_0_, this_24_.dbInstanceIdentifier as dbInstan7_76_0_, this_24_.dbService as dbService76_0_, this_25_.file_type as file3_77_0_, case when this_11_.id is not null then 11 when this_17_.id is not null then 17 when this_21_.id is not null then 21 when this_22_.id is not null then 22 when this_24_.id is not null then 24 when this_1_.id is not null then 1 when this_2_.id is not null then 2 when this_3_.id is not null then 3 when this_4_.id is not null then 4 when this_5_.id is not null then 5 when this_6_.id is not null then 6 when this_7_.id is not null then 7 when this_8_.id is not null then 8 when this_9_.id is not null then 9 when this_10_.id is not null then 10 when this_12_.id is not null then 12 when this_13_.id is not null then 13 when this_14_.id is not null then 14 when this_15_.id is not null then 15 when this_16_.id is not null then 16 when this_18_.id is not null then 18 when this_19_.id is not null then 19 when this_20_.id is not null then 20 when this_23_.id is not null then 23 when this_25_.id is not null then 25 when this_.id is not null then 0 end as clazz_0_ from JIResource this_ left outer join JIMondrianXMLADefinition this_1_ on this_.id=this_1_.id left outer join JIDashboard this_2_ on this_.id=this_2_.id left outer join JIDashboardModel this_3_ on this_.id=this_3_.id left outer join JIAdhocDataView this_4_ on this_.id=this_4_.id left outer join JIReportOptions this_5_ on this_.id=this_5_.id left outer join JIDomainDatasource this_6_ on this_.id=this_6_.id left outer join JIInputControl this_7_ on this_.id=this_7_.id left outer join JIDataType this_8_ on this_.id=this_8_.id left outer join JIFileResource this_9_ on this_.id=this_9_.id left outer join JIOlapClientConnection this_10_ on this_.id=this_10_.id left outer join JIXMLAConnection this_11_ on this_.id=this_11_.id left outer join JIBeanDatasource this_12_ on this_.id=this_12_.id left outer join JIJNDIJdbcDatasource this_13_ on this_.id=this_13_.id left outer join JIQuery this_14_ on this_.id=this_14_.id left outer join JIOlapUnit this_15_ on this_.id=this_15_.id left outer join JIVirtualDatasource this_16_ on this_.id=this_16_.id left outer join JIMondrianConnection this_17_ on this_.id=this_17_.id left outer join JICustomDatasource this_18_ on this_.id=this_18_.id left outer join JIListOfValues this_19_ on this_.id=this_19_.id left outer join JIReportUnit this_20_ on this_.id=this_20_.id left outer join JIAdhocReportUnit this_21_ on this_.id=this_21_.id left outer join JIDataDefinerUnit this_22_ on this_.id=this_22_.id left outer join JIJdbcDatasource this_23_ on this_.id=this_23_.id left outer join JIAwsDatasource this_24_ on this_.id=this_24_.id left outer join JIContentResource this_25_ on this_.id=this_25_.id where (this_.name=? and this_.parent_folder=?)]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:635)
	at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
	at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:412)
	at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:375)
	at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:1047)
	at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:1040)
	at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.findByName(HibernateRepositoryServiceImpl.java:1100)
	at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.findByURI(HibernateRepositoryServiceImpl.java:1075)
	at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.loadResource(HibernateRepositoryServiceImpl.java:362)
	at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.loadResource(HibernateRepositoryServiceImpl.java:355)
	at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl$2.execute(HibernateRepositoryServiceImpl.java:259)
	at com.jaspersoft.jasperserver.api.metadata.common.service.impl.HibernateDaoImpl.executeCallback(HibernateDaoImpl.java:56)
	at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.getResourceUnsecure(HibernateRepositoryServiceImpl.java:257)
	at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.getResource(HibernateRepositoryServiceImpl.java:252)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy16.getResource(Unknown Source)
	at com.jaspersoft.jasperserver.api.common.properties.PropertiesManagementServiceImpl.loadProperties(PropertiesManagementServiceImpl.java:196)
	at com.jaspersoft.jasperserver.api.common.properties.PropertiesManagementServiceImpl.initialize(PropertiesManagementServiceImpl.java:96)
	at com.jaspersoft.jasperserver.api.common.properties.PropertiesManagementServiceImpl.onApplicationEvent(PropertiesManagementServiceImpl.java:368)
	at com.jaspersoft.jasperserver.api.common.properties.PropertiesManagementServiceImpl.onApplicationEvent(PropertiesManagementServiceImpl.java:58)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
	at com.jaspersoft.jasperserver.export.BaseExportImportCommand.createSpringContext(BaseExportImportCommand.java:129)
	at com.jaspersoft.jasperserver.export.BaseExportImportCommand.process(BaseExportImportCommand.java:82)
	at com.jaspersoft.jasperserver.export.ExportCommand.main(ExportCommand.java:43)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
	at org.hibernate.loader.Loader.doList(Loader.java:2235)
	at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2161)
	at org.hibernate.loader.Loader.list(Loader.java:2121)
	at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1597)
	at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
	at org.springframework.orm.hibernate3.HibernateTemplate$36.doInHibernate(HibernateTemplate.java:1057)
	at org.springframework.orm.hibernate3.HibernateTemplate$36.doInHibernate(HibernateTemplate.java:1047)
	at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:407)
	... 35 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation "jidashboardmodel" does not exist
  Position: 4347
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:1812)
	at org.hibernate.loader.Loader.doQuery(Loader.java:697)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
	at org.hibernate.loader.Loader.doList(Loader.java:2232)
	... 43 more
Comment 6 Yedidyah Bar David 2015-12-15 04:11:37 EST
I admit I did not remember the following, but did find it with a quick search for 'jidashboardmodel'.

We had a similar failure, see bug 1212306 comment 1. From reading what I wrote there, and the commit message in the fix actually applied [1], it seems this happens when upgrading jasper prior to upgrading reports.

I'd therefore want to close as duplicate of 1212306. However, I thought we prevent that, by requiring in reports 3.5 jasper < 5.6. Gil - can you check/attach yum.log, and or recall the flow leading to this? Which jasperreports you had installed before the upgrade?

[1] https://gerrit.ovirt.org/40401
Comment 7 Gil Klein 2015-12-15 04:18 EST
Created attachment 1105931 [details]
yum.log
Comment 8 Gil Klein 2015-12-15 04:25:39 EST
# cat yum.log |grep 'rhevm-reports\|jasperreports'
Dec 08 10:54:20 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Dec 08 10:54:23 Installed: rhevm-reports-setup-3.5.5-2.el6ev.noarch
Dec 08 10:54:26 Installed: rhevm-reports-3.5.5-2.el6ev.noarch
Dec 08 17:40:13 Installed: jasperreports-server-pro-6.0.1-1.el6ev.noarch
Dec 08 17:43:46 Updated: rhevm-reports-setup-3.6.1-1.el6ev.noarch
Comment 9 Yedidyah Bar David 2015-12-15 04:49:38 EST
(In reply to Gil Klein from comment #8)
> # cat yum.log |grep 'rhevm-reports\|jasperreports'
> Dec 08 10:54:20 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
> Dec 08 10:54:23 Installed: rhevm-reports-setup-3.5.5-2.el6ev.noarch
> Dec 08 10:54:26 Installed: rhevm-reports-3.5.5-2.el6ev.noarch
> Dec 08 17:40:13 Installed: jasperreports-server-pro-6.0.1-1.el6ev.noarch
> Dec 08 17:43:46 Updated: rhevm-reports-setup-3.6.1-1.el6ev.noarch

Well, now tried this:
1. Have a working 3.5 setup engine+dwh+reports
2. Add 3.6 repos
3. yum update
4. yum update jasperreports-server-pro

Both 3 and 4 failed as expected message, which includes:
Error: Package: rhevm-reports-3.5.5-2.el6ev.noarch (@latest_vt)
           Requires: jasperreports-server-pro < 5.6.0

So not sure how you got jasperreports-server-pro-6.0.1 installed prior to upgrading rhevm-reports. That was my question. How? If using some force, that's unsupported.
Comment 10 Gil Klein 2015-12-20 15:00:41 EST
(In reply to Yedidyah Bar David from comment #9)
> (In reply to Gil Klein from comment #8)
> > # cat yum.log |grep 'rhevm-reports\|jasperreports'
> > Dec 08 10:54:20 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
> > Dec 08 10:54:23 Installed: rhevm-reports-setup-3.5.5-2.el6ev.noarch
> > Dec 08 10:54:26 Installed: rhevm-reports-3.5.5-2.el6ev.noarch
> > Dec 08 17:40:13 Installed: jasperreports-server-pro-6.0.1-1.el6ev.noarch
> > Dec 08 17:43:46 Updated: rhevm-reports-setup-3.6.1-1.el6ev.noarch
> 
> Well, now tried this:
> 1. Have a working 3.5 setup engine+dwh+reports
> 2. Add 3.6 repos
> 3. yum update
> 4. yum update jasperreports-server-pro
> 
> Both 3 and 4 failed as expected message, which includes:
> Error: Package: rhevm-reports-3.5.5-2.el6ev.noarch (@latest_vt)
>            Requires: jasperreports-server-pro < 5.6.0
> 
> So not sure how you got jasperreports-server-pro-6.0.1 installed prior to
> upgrading rhevm-reports. That was my question. How? If using some force,
> that's unsupported.
I've tried to reproduce a few times, but failed, so I'll close it for now, and reopen in case I'll find a way to reproduce this again.

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