RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1304772 - report generation is broken (openscap rebased)
Summary: report generation is broken (openscap rebased)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: preupgrade-assistant
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Petr Hracek
QA Contact: Tereza Cerna
URL:
Whiteboard:
: 1312702 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-04 15:04 UTC by Alois Mahdal
Modified: 2016-05-11 08:26 UTC (History)
10 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-05-11 08:26:47 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1022 0 normal SHIPPED_LIVE preupgrade-assistant bug fix and enhancement update 2016-05-11 12:23:56 UTC

Description Alois Mahdal 2016-02-04 15:04:22 UTC
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 15:22:02 UTC
Created attachment 1121129 [details]
"broken" result.xml

Comment 3 Alois Mahdal 2016-02-04 15:22:42 UTC
Created attachment 1121130 [details]
output from preupg

Comment 4 Šimon Lukašík 2016-02-04 15:43:12 UTC
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 11:08:45 UTC
The bug is fixed by upstream commit https://github.com/phracek/preupgrade-assistant/commit/06c81b146f24357d95c01c9c443ed945c97c4759

Comment 8 Petr Stodulka 2016-03-01 20:04:28 UTC
See bug #1312702. Actual result is still broken. Just in different way.

Comment 9 Petr Stodulka 2016-03-02 10:40:31 UTC
*** Bug 1312702 has been marked as a duplicate of this bug. ***

Comment 10 Petr Stodulka 2016-03-02 10:46:04 UTC
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 12:51:54 UTC
--------------------------------------------------------------
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 Petr Stodulka 2016-04-22 15:21:54 UTC
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 16:22:55 UTC
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 20:29:27 UTC
(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 08:26:47 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/RHBA-2016-1022.html


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