Bug 1304613

Summary: [Upgrade][Reports] Upgrade 3.5->3.6 failed while exporting data out of Jasper
Product: Red Hat Enterprise Virtualization Manager Reporter: Gil Klein <gklein>
Component: jasperreports-server-proAssignee: Yedidyah Bar David <didi>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.3CC: bugs, juan.hernandez, lsurette, rbalakri, Rhev-m-bugs, sradco, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.3Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-04 13:52:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1285700    
Attachments:
Description Flags
ovirt engine setup log
none
applicationContext-propertySettings.xml none

Description Gil Klein 2016-02-04 07:42:08 UTC
Description of problem:
When upgrading a production system from 3.5.7 engine to 3.6.3, upgrade of jasper is failing
[ INFO  ] Exporting data out of Jasper
[ ERROR ] Failed to execute stage 'Misc configuration': Command './js-export.sh' failed to execute


Version-Release number of selected component (if applicable):
From: rhevm-3.5.7-0.1.el6ev.noarch
To: rhevm-3.6.2.6-0.1.el6.noarch


How reproducible:
100% on the specific system 


Steps to Reproduce:
1. Run engine-setup on the system


Actual results:
Upgrade failed with:
[ 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-20160204091357-1xc7rg.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20160204092559-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed


Expected results:
Upgrade should succeeded


Additional info:

2016-02-04 09:25:59 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_reports.jasper.deploy plugin.execute:941 execute-output: ('./js-export.sh', '--output-dir', '/tmp/tmp8W62ru/everything', '--everything') stderr:
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'log4jSettingsService' defined in file [/usr/share/jasperreports-server-pro/buildomatic/conf_source/iePro/applicationContext-propertySettings.xml]: Could not resolve placeholder 'loggerDescriptionFiles'
        at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
        at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:220)
        at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:84)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:656)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:446)
        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)

2016-02-04 09:25:59 DEBUG otopi.context context._executeMethod:156 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 146, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine-reports/jasper/deploy.py", line 576, in _export
    '--everything', 
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/reports/reportsutil.py", line 167, in jsexport
    ) + args
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/reports/reportsutil.py", line 140, in execute
    oreportscons.FileLocations.
  File "/usr/lib/python2.6/site-packages/otopi/plugin.py", line 946, in execute
    command=args[0],
RuntimeError: Command './js-export.sh' failed to execute
2016-02-04 09:25:59 ERROR otopi.context context._executeMethod:165 Failed to execute stage 'Misc configuration': Command './js-export.sh' failed to execute
2016-02-04 09:25:59 DEBUG otopi.transaction transaction.abort:134 aborting 'Yum Transaction'

Comment 1 Gil Klein 2016-02-04 07:52:52 UTC
Created attachment 1121046 [details]
ovirt engine setup log

Comment 2 Gil Klein 2016-02-04 07:56:27 UTC
Created attachment 1121048 [details]
applicationContext-propertySettings.xml

Comment 4 Yedidyah Bar David 2016-02-04 08:18:20 UTC
Isn't this a duplicate of bug 1289660?

In particular, please see bug 1289660 comment 9.

Comment 5 Gil Klein 2016-02-04 08:46:17 UTC
(In reply to Yedidyah Bar David from comment #4)
> Isn't this a duplicate of bug 1289660?
> 
> In particular, please see bug 1289660 comment 9.
Yes, I remember this one, but I'm not sure it the same flow leads to it this time.

This time I got to this state after a failed upgrade due to bz #1302374

Looks like in case of a failure, I got left with 2 versions on jasperreports

rpm -qa|grep jasper
jasperreports-server-pro-6.0.1-2.el6ev.noarch
jasperreports-server-pro-5.5.0-10.el6ev.noarch


Is it possible we do not remove the newer jasperreports on the rollback?

Comment 6 Gil Klein 2016-02-04 08:50:08 UTC
I can confirm that on each call to engine-setup, there was an attempt to upgrade jasper from 5.5->6.0. Still not sure how both package are installed on the server. 

# grep "jasper" /var/log/yum.log 
Jan 20 18:46:35 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Jan 27 15:44:49 Updated: jasperreports-server-pro-6.0.1-2.el6ev.noarch
Jan 27 15:51:56 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Jan 27 18:37:50 Updated: jasperreports-server-pro-6.0.1-2.el6ev.noarch
Jan 27 18:44:54 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Feb 02 10:52:47 Updated: jasperreports-server-pro-6.0.1-2.el6ev.noarch
Feb 02 10:59:48 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Feb 02 11:15:59 Updated: jasperreports-server-pro-6.0.1-2.el6ev.noarch
Feb 02 11:22:53 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Feb 02 17:41:23 Updated: jasperreports-server-pro-6.0.1-2.el6ev.noarch
Feb 02 17:48:13 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Feb 03 15:27:04 Updated: jasperreports-server-pro-6.0.1-2.el6ev.noarch
Feb 03 15:34:12 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Feb 03 17:27:10 Updated: jasperreports-server-pro-6.0.1-2.el6ev.noarch
Feb 03 17:34:02 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch
Feb 03 18:05:44 Updated: jasperreports-server-pro-6.0.1-2.el6ev.noarch
Feb 03 18:48:43 Installed: jasperreports-server-pro-5.5.0-10.el6ev.noarch


#rpm -qa|grep jasper
jasperreports-server-pro-6.0.1-2.el6ev.noarch
jasperreports-server-pro-5.5.0-10.el6ev.noarch

Comment 7 Gil Klein 2016-02-04 09:33:47 UTC
Reducing the severity. It can be easily workaround by removing the newer jasper package:   jasperreports-server-pro-6.0.1-2.el6ev.noarch

Comment 9 Shirly Radco 2016-02-04 10:28:37 UTC
Juan, Can you please have a look?

Comment 10 Juan Hernández 2016-02-04 11:07:36 UTC
Is this the same machine where we had the issue JBoss module loading? I think that in that case the upgrade was manually stopped with Ctrl-C. In that case the yum transaction (probably the rollback) was killed in the middle, and that may be the cause of having two versions of the Jasper package installed. If as Gil says it can be resolved manually removing one of the Jasper packages, then I'd suggest to just close the bug as WONTFIX, as it is very difficult to make things work when there is an unexpected abort.

Comment 11 Yedidyah Bar David 2016-02-04 13:05:29 UTC
(In reply to Juan Hernández from comment #10)
> Is this the same machine where we had the issue JBoss module loading? I
> think that in that case the upgrade was manually stopped with Ctrl-C.

Was it?

If so, can be closed as duplicate of bug 1130764. But it's not very likely that we'll ever solve it.

> In
> that case the yum transaction (probably the rollback) was killed in the
> middle, and that may be the cause of having two versions of the Jasper
> package installed. If as Gil says it can be resolved manually removing one
> of the Jasper packages, then I'd suggest to just close the bug as WONTFIX,
> as it is very difficult to make things work when there is an unexpected
> abort.

Comment 12 Juan Hernández 2016-02-04 13:40:58 UTC
From ovirt-engine-setup-20160203175453-4ymq5a.log:

2016-02-03 18:49:53 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:91 Yum Script sink: Traceback (most recent call last):
  File "/usr/sbin/semanage", line 581, in <module>
    process_args(sys.argv[1:])
  File "/usr/sbin/semanage", line 496, in process_args
    OBJECT.delete(target, proto)
  File "/usr/lib64/python2.6/site-packages/seobject.py", line 1182, in delete
    self.commit()
  File "/usr/lib64/python2.6/site-packages/seobject.py", line 310, in commit
    rc = semanage_commit(self.sh)
KeyboardInterrupt

Comment 13 Yaniv Lavi 2016-02-04 13:52:59 UTC

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