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 1362659 - exit_fail without risk results in needs_inspection
Summary: exit_fail without risk results in needs_inspection
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
unspecified
Target Milestone: rc
: ---
Assignee: Petr Hracek
QA Contact: Alois Mahdal
URL:
Whiteboard:
Depends On:
Blocks: 1335121
TreeView+ depends on / blocked
 
Reported: 2016-08-02 19:12 UTC by Alois Mahdal
Modified: 2016-11-04 08:58 UTC (History)
6 users (show)

Fixed In Version: preupgrade-assistant-2.1.9-3.el6
Doc Type: Bug Fix
Doc Text:
Cause: Let's say, module finishes with return code exit_fail and does not mention any risk. Consequence: In the report is marked as needs_inspection which is weird. Fix: Module finishes with return value error which means, module is not properly written. Before an report generation user can see on command line list of modules which missed log_risk. Result: Module are not marked as needs_inspection in case using only exit_fail.
Clone Of:
Environment:
Last Closed: 2016-11-04 08:58:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2616 0 normal SHIPPED_LIVE preupgrade-assistant bug fix and enhancement update 2016-11-03 16:23:38 UTC

Description Alois Mahdal 2016-08-02 19:12:24 UTC
Description of problem
======================

If module contains only

    exit_fail

rut no risk is logged, preupg reports result 'needs_inspection'.


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

preupgrade-assistant-2.1.8-2.el6


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

Always


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

 1. create a module with only exit_fail in the code (after auto-header)
 2. verify module result


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

Result is "needs_inspection"


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

Result should be "error"

Comment 3 Alois Mahdal 2016-09-01 00:41:27 UTC
Please, this needs to be clarified:

 *  In original use case (only exit_failed, no risks), p-a now sets 'fail'.

 *  This agrees with table you sent to ML:

        http://post-office.corp.redhat.com/archives/rhel-inplaceupgrades/2016-August/msg00028.html

    but not with comment 0 and @pstodulka's comment in mentioned ML thread.

So, how should p-a behave?  If I respect only the table, I could close this bug as verified, but I would perfer if this got discussed more and we had clear consensus.

(If you need opinion, I'm for 'error': exit_fail without risk means without explanation, which is not useful so I guess it should be invalid.)

Comment 4 Petr Hracek 2016-09-01 12:06:07 UTC
You are right, Fail without risk should return 15 as an error. Current version of P-A reports to user a message like:

[root@rhel6workstation ~]# preupg 
The Preupgrade Assistant is a diagnostics tool 
and does not perform the actual upgrade.
Please ensure you have backed up your system and/or data 
in the event of a failed upgrade that would require 
a full re-install of the system from installation media.
Do you want to continue? [Y/n]

[..snip..]

135/135 ...done    (NIS server config file back-up)
Assessment finished (time 04:36s)
Module xccdf_preupg_rule_backup_bacula_check exits as fail but without risk.
Module xccdf_preupg_rule_services_httpd_check_script exits as fail but without risk.
File '/root/preupgrade/dirtyconf/etc/sysconfig/rhn/up2date' already exists in dirtyconf directory
Result table with checks and their results for 'main contents':
-----------------------------------------------
|Migration of the MySQL data stack |notapplicable     |
|Changes related to moving from MySQL to MariaDB |notapplicable     |
|Checking the system version and variant |fail              |
---------------------------------------
[..snip..]
[root@rhel6workstation ~]#

Comment 5 Petr Stodulka 2016-09-01 12:29:30 UTC
(In reply to Petr Hracek from comment #4)
> 135/135 ...done    (NIS server config file back-up)
> Assessment finished (time 04:36s)
> Module xccdf_preupg_rule_backup_bacula_check exits as fail but without risk.
> Module xccdf_preupg_rule_services_httpd_check_script exits as fail but
> without risk.

I think that message would be different - it looks weird and doesn't provide
information for admin. I guess that something like:
---
 Error: The module <module1> failed without expected risk report.
 Error: The module <module2> failed without expected risk report.
 .....
<end>
Preupgrade Assistant detects errors which could ....... Please contact vendor for remedy.
---
or something like that. Of course, we should catch it before user could see this.

Comment 7 Petr Hracek 2016-09-01 13:28:46 UTC
Yeah, this error can be catched by preupg-xccdf-compose or even by preupg-create-group-xml script. or both. An issue to upstream https://github.com/upgrades-migrations/preupgrade-assistant/issues/131

Comment 10 Alois Mahdal 2016-09-01 14:29:13 UTC
(In reply to Petr Hracek from comment #7)
> Yeah, this error can be catched by preupg-xccdf-compose or even by
> preupg-create-group-xml script. or both.

I'd be curious about how you would do it, I'm not aware of any reliable way.

And even if it was possible, I would not count on tools anyway.  People can use tools and then change their check scripts in-place.

Comment 12 Petr Stodulka 2016-09-01 14:39:10 UTC
According to informations from Petr, he want to do only a basic check,
that scripts contain keywords like: log_high_risk, ...
when RESULT_FAIL, exit_fail, ... will be detected.

It is not intended as replacement of other tests, just mini improvement which I guess will be more like notification than real test.

Comment 13 Alois Mahdal 2016-09-01 15:41:37 UTC
(In reply to pstodulk from comment #12)
> According to informations from Petr, he want to do only a basic check,
> that scripts contain keywords like: log_high_risk, ...
> when RESULT_FAIL, exit_fail, ... will be detected.

This is something I can easily add to test suite (TODO taken).


> It is not intended as replacement of other tests, just mini improvement
> which I guess will be more like notification than real test.

I'd still vote for leaving it out of build tools.  If you want to provide such functionality to users (module developers), then I think some `preupg-lint` tool is way to go.

(We're getting off-topic here, though...)

Comment 14 Alois Mahdal 2016-10-07 04:02:10 UTC
According to discussion with @phracek, the case now should behave as 'fail'.

Test has been updated and now -- as of preupgrade-assistant-2.1.10-5.el6 -- passes.

Comment 17 errata-xmlrpc 2016-11-04 08:58:00 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-2616.html


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