Bug 1224889

Summary: engine-setup deletes adhoc reports on upgrade
Product: Red Hat Enterprise Virtualization Manager Reporter: Andrew Burden <aburden>
Component: ovirt-engine-reportsAssignee: Yedidyah Bar David <didi>
Status: CLOSED ERRATA QA Contact: Petr Kubica <pkubica>
Severity: medium Docs Contact:
Priority: high    
Version: 3.4.5CC: adahms, bazulay, gklein, juwu, lsurette, melewis, pkubica, rbalakri, Rhev-m-bugs, rhodain, sbonazzo, sradco, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.0-rcKeywords: ZStream
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, when engine-setup upgraded Reports, ad-hoc reports were exported using an incorrect url that contained a leading slash, and this caused the reports to be removed as they were not exported. Now, the code has been changed to remove leading and trailing slashes from the configured url so that the saved ad-hoc reports are correctly exported and imported during the upgrade.
Story Points: ---
Clone Of:
: 1235243 (view as bug list) Environment:
Last Closed: 2016-03-09 21:19:22 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: 1092388, 1235243    
Attachments:
Description Flags
restore log for 3.4 environment
none
3.4 engine log
none
the most recent setup log none

Description Andrew Burden 2015-05-26 07:10:04 UTC
Created attachment 1029787 [details]
restore log for 3.4 environment

Description of problem:
Following on from email: Restoring reports as part of engine-backup does not seem to restore the reports as freshly install them to the backed up engine.

Version-Release number of selected component (if applicable):
3.4 & 3.5 - this particular instance was 3.4

How reproducible:
For me it has been 100%

Steps to Reproduce:
1. Create custom dashboard in reports
2. Use engine-backup to backup engine, reports, and dwh dbs (and files) 
3. Restore all (procedure being used is http://docbuilder.usersys.redhat.com/22765/#Restoring_a_Backup_to_a_Fresh_Installation)

Actual results:
The restore seems to work - engine backup is completed, reports running - but the custom dashboard does not exist.

Expected results:
The reports portal is restored with any custom resources.

Additional info:
This bug is being raised as part of documentation testing for writing the aforementioned procedure. If the fault is with the documentation, my apologies; corrections are appreciated. 

The custom dashboard is being backed up - I can find it in the db bkup.

Comment 1 Andrew Burden 2015-05-26 07:10:39 UTC
Created attachment 1029788 [details]
3.4 engine log

Comment 2 Andrew Burden 2015-05-26 07:11:19 UTC
Created attachment 1029789 [details]
the most recent setup log

Comment 3 Yedidyah Bar David 2015-06-23 13:36:01 UTC
Now verified that this happens on 3.4.5 "upgrading" to itself.

Changed summary accordingly, and a few other fields.

Comment 8 Petr Kubica 2015-07-29 10:56:35 UTC
Hi,
in ovirt reports there aren't any adhoc reports, so it cannot be verified in ovirt (ovirt-3.6.0-3)

Comment 9 Yedidyah Bar David 2015-07-29 11:58:28 UTC
In principle you can use upstream code with jasperreports-server-pro. This is a supported flow, in principle. In practice it might be better to wait for a first downstream build which is expected soon.

As you can see in the patch page in gerrit, I verified it on 3.5 only.

Comment 10 Sandro Bonazzola 2015-08-04 09:23:37 UTC
Didi already answered in comment #9, dropping needinfo on me

Comment 11 Yaniv Lavi 2015-08-20 14:58:31 UTC
How is BZ #1255434 related? this is a upgrade flow the other a restore flow.

Comment 12 Petr Kubica 2015-08-20 15:20:06 UTC
(In reply to Yaniv Dary from comment #11)
> How is BZ #1255434 related? this is a upgrade flow the other a restore flow.

In BZ #1255434 I don't make an upgrade. If I know correctly, I cannot restore database via engine-backup without clean engine. 

In reproduction steps (2 and 3) in comment #0 I must backup all and restore all.

So my steps for verifying this is:

Create a custom dashboard in reports
backup all
engine-cleanup (for restoring the backup)
restore all
make engine-setup (issue described in BZ #1255434) 
Check the dashboard in reports

Comment 13 Petr Kubica 2015-08-20 15:26:50 UTC
Ahh, now I understand what you mean. It confuses me the backup and restore part in comment #0. So if I understand it correctly, just create dashboard in 3.5, upgrade to 3.6 and check the dashboard ? (the issue was in upgrade process ?)

Comment 14 Yaniv Lavi 2015-08-23 10:15:16 UTC
(In reply to Petr Kubica from comment #13)
> Ahh, now I understand what you mean. It confuses me the backup and restore
> part in comment #0. So if I understand it correctly, just create dashboard
> in 3.5, upgrade to 3.6 and check the dashboard ? (the issue was in upgrade
> process ?)

You create a ad hoc report and save it to saved reports folder (any other location is not saved) then upgrade and make sure that it kept and not deleted.

Comment 15 Petr Kubica 2015-09-24 09:59:58 UTC
Verified in rhevm-reports-3.6.0-0.6.el6ev.noarch

Comment 16 Yedidyah Bar David 2016-03-03 08:52:13 UTC
Added some commas, hope that's ok

Comment 17 Megan Lewis 2016-03-04 00:44:25 UTC
Looks good. Thanks for the added commas. :)

Comment 19 errata-xmlrpc 2016-03-09 21:19:22 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