Bug 1304772 - report generation is broken (openscap rebased)
report generation is broken (openscap rebased)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: preupgrade-assistant (Show other bugs)
6.8
Unspecified Unspecified
unspecified Severity urgent
: rc
: ---
Assigned To: Petr Hracek
Tereza Cerna
: Extras, Rebase, TestBlocker
: 1312702 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-04 10:04 EST by Alois Mahdal
Modified: 2016-05-11 04:26 EDT (History)
10 users (show)

See Also:
Fixed In Version: preupgrade-assistant-2.1.6-2.el6
Doc Type: Bug Fix
Doc Text:
Updated OpenSCAP XSLT Entries To keep pace with the latest RHEL version of OpenSCAP, preupgrade-assistant has been updated to reflect the newer XSLT files in use.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-11 04:26:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
"broken" result.xml (664.02 KB, text/plain)
2016-02-04 10:22 EST, Alois Mahdal
no flags Details
output from preupg (10.27 KB, text/plain)
2016-02-04 10:22 EST, Alois Mahdal
no flags Details

  None (edit)
Description Alois Mahdal 2016-02-04 10:04:22 EST
Description of problem
======================

Due to changes in openscap (rebased openscap-1.0.10 to openscap-1.2.8),
report generation stopped working:

 *  result.html is not generated at all,

 *  some strings are not translated in result.xml

and probably also other problems.


Version-Release number of selected component
============================================

    openscap-1.2.8-1.el6.x86_64
    openscap-engine-sce-1.2.8-1.el6.x86_64
    openscap-scanner-1.2.8-1.el6.x86_64
    openscap-utils-1.2.8-1.el6.x86_64
    preupgrade-assistant-2.1.4-6.el6.noarch
    preupgrade-assistant-contents-0.6.43-1.el6.noarch
    preupgrade-assistant-contents-67-0.6.43-1.el6.noarch
    preupgrade-assistant-staticdata-0.1.0-5.el6.noarch
    preupgrade-assistant-staticdata-67-0.1.0-5.el6.noarch


How reproducible
================

Always


Steps to Reproduce
==================

 1. run preupg
 2. see /root/preupgrade/result.html
    and /root/preupgrade/result.xml


Actual results
==============

No html file and the xml file is broken.


Expected results
================

All reports should be OK


Additional info
===============

This completely breaks at least the assessment phase, hence the urgent
severity.
Comment 2 Alois Mahdal 2016-02-04 10:22 EST
Created attachment 1121129 [details]
"broken" result.xml
Comment 3 Alois Mahdal 2016-02-04 10:22 EST
Created attachment 1121130 [details]
output from preupg
Comment 4 Šimon Lukašík 2016-02-04 10:43:12 EST
Ah, I see what happened. Preupgrade branched from our main XSLT and created preup.xsl. That preup.xsl, however, included stock XSLT from OpenSCAP that went unmodified for preupgrade purpose.

We have started work on new OpenSCAP XSLT almost two years ago, and we have notified preupgrade crew. We finish the work and OpenSCAP reports are now way better. However, we forgot to notify you guys, that we want to put this in RHEL. Sorry, it just didn't came to us.

Here is an easy fix however: You can pick the missing XSLTs from the old openscap package and put it to yours. Once you correct the paths in `preup.xsl` it should work just fine.

In the long term guys, I suggest you take a look at the new OpenSCAP's XSLT. We have imprpved user experience tremulously. You just need to rebase your preup.xsl on our latest.
Comment 5 Petr Hracek 2016-02-08 06:08:45 EST
The bug is fixed by upstream commit https://github.com/phracek/preupgrade-assistant/commit/06c81b146f24357d95c01c9c443ed945c97c4759
Comment 8 pstodulk 2016-03-01 15:04:28 EST
See bug #1312702. Actual result is still broken. Just in different way.
Comment 9 pstodulk 2016-03-02 05:40:31 EST
*** Bug 1312702 has been marked as a duplicate of this bug. ***
Comment 10 pstodulk 2016-03-02 05:46:04 EST
Fixed now just in downstream. Upstream solution will be created in future.

Used old xsl files from OpenSCAP v1.0.8 according to Simon's advice.
Thanks to jcerny for help with another modification of preup.xsl file. See bug #1312702
Comment 11 Tereza Cerna 2016-03-08 07:51:54 EST
--------------------------------------------------------------
Verified in:
    preupgrade-assistant-2.1.5-2.el6.noarch
    preupgrade-assistant-el6toel7-0.6.45-1.el6.noarch
    preupgrade-assistant-el6toel7-data-0.20160125-1.el6.noarch
    openscap-1.2.8-2.el6.ppc64
PASS
--------------------------------------------------------------

# preupg --select-rules=xccdf_preupg_rule_databases_mysql_configuration_changes_configuration --force
Assessment of the system, running checks / SCE scripts:
001/001 ...done    (MySQL configuration)
Assessment finished (time 00:01s)
Result table with checks and their results for main contents:
------------------------------------------
|MySQL configuration      |needs_action  |
------------------------------------------
Tarball with results is stored here /root/preupgrade-results/preupg_results-160308040306.tar.gz .
The latest assessment is stored in directory /root/preupgrade .
Summary information:
We found some potential in-place upgrade risks.
Read the full report file /root/preupgrade/result.html for more details.
Read the admin report file /root/preupgrade/result-admin.html for more details.
Upload results to UI by command:
e.g. preupg -u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-160308040306.tar.gz .

# ls /root/preupgrade | grep result
preupg_results-160308040306.tar.gz
result-admin.html
result-admin.xml
result.html
result.xml

--->>> We can see result.html and result.xml files. All files are OK.

--------------------------------------------------------------
Reproduced in:
    preupgrade-assistant-2.1.4-6.el6.noarch
    preupgrade-assistant-contents-0.6.43-1.el6.noarch
    preupgrade-assistant-staticdata-0.1.0-5.el6.noarch
    openscap-1.2.8-1.el6.x86_64
FAIL
--------------------------------------------------------------

# preupg --select-rules=xccdf_preupg_rule_databases_mysql_configuration_changes_configuration --force
Assessment of the system, running checks / SCE scripts:
001/001 ...done    (MySQL configuration)
Assessment finished (time 00:00s)
I/O warning : failed to load external entity "/usr/share/openscap/xsl/security-guide.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 40 element import
xsl:import : unable to load /usr/share/openscap/xsl/security-guide.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/oval-report.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 41 element import
xsl:import : unable to load /usr/share/openscap/xsl/oval-report.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/sce-report.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 42 element import
xsl:import : unable to load /usr/share/openscap/xsl/sce-report.xsl
OpenSCAP Error:: Could not parse XSLT file '/usr/share/preupgrade/xsl/preup.xsl' [xslt.c:146]
I/O warning : failed to load external entity "/usr/share/openscap/xsl/security-guide.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 40 element import
xsl:import : unable to load /usr/share/openscap/xsl/security-guide.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/oval-report.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 41 element import
xsl:import : unable to load /usr/share/openscap/xsl/oval-report.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/sce-report.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 42 element import
xsl:import : unable to load /usr/share/openscap/xsl/sce-report.xsl
OpenSCAP Error:: Could not parse XSLT file '/usr/share/preupgrade/xsl/preup.xsl' [xslt.c:146]
Usage: preupg [options]

preupg: error: [Errno 2] No such file or directory: u'/root/preupgrade/result.html'

--->>> File result.html was not generated and result.xml contains mistakes in some strings.
Comment 12 pstodulk 2016-04-22 11:21:54 EDT
After last rebuild (2.1.6-1) it is broken again: are used new XSL files for generation of html report instead of old and these are not modified, so remediation instructions are not part of report. Moved back to assigned.
Comment 14 Alois Mahdal 2016-04-28 12:22:55 EDT
Terko, /CoreOS/preupgrade-assistant/6to7/assistant/result-files included in ipu-tier1 now checks for validity of generated HTML and XML files; hopefully it should be enough to catch this, even in future.

You can schedule ipu tier1 as:

    ipu tier -B 1 | bash

(brew based) or

    ipu tier -e @pa 1 | bash

(errata based).
Comment 15 Alois Mahdal 2016-04-28 16:29:27 EDT
(In reply to Alois Mahdal from comment #14)
[...]
> 
>     ipu tier -B 1 | bash

throw in -A to schedule on all "our" archs.
Comment 17 errata-xmlrpc 2016-05-11 04:26:47 EDT
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/RHBA-2016-1022.html

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