Bug 1258789 - ovirt-engine-reports-tool handles relative export/import paths wrongly
Summary: ovirt-engine-reports-tool handles relative export/import paths wrongly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-reports
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-3.6.1
: 3.6.1
Assignee: Yedidyah Bar David
QA Contact: Karolína Hajná
URL:
Whiteboard:
Depends On: 1226910 1287006
Blocks: 1198107
TreeView+ depends on / blocked
 
Reported: 2015-09-01 09:58 UTC by Karolína Hajná
Modified: 2016-05-20 01:24 UTC (History)
13 users (show)

Fixed In Version: rhevm-reports-3.6.1.1-1.el6ev
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-09 21:20:48 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ovirt-engine-reports-tool import log (242.40 KB, text/plain)
2015-09-01 09:58 UTC, Karolína Hajná
no flags Details
3.6.1 import.log (201.75 KB, text/plain)
2015-12-01 13:52 UTC, Karolína Hajná
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0425 0 normal SHIPPED_LIVE rhevm-reports bug fix and enhancement update 2016-03-10 01:21:14 UTC
oVirt gerrit 45637 0 master MERGED packaging: reports-tool: Absolute path on export/import Never
oVirt gerrit 49637 0 master MERGED packaging: reports-tool: Absolute path on export/import Never

Description Karolína Hajná 2015-09-01 09:58:48 UTC
Created attachment 1068906 [details]
ovirt-engine-reports-tool import log

Description of problem:
When using ovirt-engine-reports-tool import on exported .zip file there is an error:
Failed to execute stage 'Misc configuration': Command './js-import.sh' failed to execute 

Version-Release number of selected component (if applicable):
3.6.0-0.12.master.el6

How reproducible:
100%

Steps to Reproduce:
1. Create an ad hoc report in first engine
2. Use ovirt-engine-reports-tool to export the created ad hoc report
3. Copy created .zip file to second engine of the same version as the first
4. Use the tool again to import created report to your second engine

Actual results:
import error

Expected results:
import successful

Comment 1 Yedidyah Bar David 2015-09-02 10:07:05 UTC
Seems from the log that the bug is with relative paths. E.g. instead of supplying 'adhoc3', input '/root/adhoc3' (or wherever it was). Can you please verify?

Comment 2 Yedidyah Bar David 2015-09-02 10:10:34 UTC
BTW, seems like the same bug affects export. Did it work for you there?

Comment 3 Karolína Hajná 2015-09-02 10:54:00 UTC
Importing the file with absolute path works. 
I didn't have any problems with export. Using filename only worked and the resulting .zip file was located in root directory. I tested the export with absolute path, too. It was successful.

Comment 6 Yedidyah Bar David 2015-10-12 06:13:58 UTC
The bug is that the reports tool, if used to export/import reports with a relative path, uses it relative $JASPER_HOME/buildomatic instead of to current working directory.

Changed the summary accordingly.

Yaniv, not sure what other info is needed. I think 3.6.1 is ok.

Comment 7 Karolína Hajná 2015-12-01 13:52:49 UTC
Created attachment 1100924 [details]
3.6.1 import.log

Export still uses relative paths relatively to $JASPER_HOME/buildomatic instead of working directory.
Import still fails completely when using relative paths.
I used 3.6.0-22 build for testing.

Comment 8 Yaniv Lavi 2015-12-01 13:54:56 UTC
Should be in this week.

Comment 9 Karolína Hajná 2015-12-03 10:11:55 UTC
On 3.6.1-2 build export works correctly. 
With import there is a problem when cwd is /root and the .zip file is in it. So when I enter a filename into the tool, there is an error: "Cannot read from <filename>". This works on the same machine from which the .zip file was exported, though. I haven't found any problem with permisions etc. 
Using absolute path or entering another directory and using relative path from there works fine. 

steps to reproduce:
1. Create and save an Ad Hoc View
2. Use the ovirt-engine-reports-tool for export
3. on the same machine use the tool again for importing file exported in last step - this should work
4. copy the file to another machine into /root directory and the tool for import from there. - this should end up with error
5. move the .zip file into another directory (for example root directory) and change your cwd to it.
6. use import again - should work

Comment 10 Karolína Hajná 2015-12-15 10:15:21 UTC
verified on rhevm-reports-setup-3.6.1.1-1.el6ev.noarch (build 3.6.1-4)

Comment 12 errata-xmlrpc 2016-03-09 21:20:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0425.html


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