Bug 1325393

Summary: Undocumented exit status 255 if --riskcheck ran too soon
Product: Red Hat Enterprise Linux 6 Reporter: Alois Mahdal <amahdal>
Component: preupgrade-assistantAssignee: Petr Hracek <phracek>
Status: CLOSED ERRATA QA Contact: Alois Mahdal <amahdal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: fkluknav, jmazanek, ovasik, phracek, pstodulk, tcerna, ttomecek
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: preupgrade-assistant-2.1.7.post18-1.el6 Doc Type: Bug Fix
Doc Text:
In some cases, the "preupg --riskcheck" command returned the exit status of 225. This status is not documented and could be misinterpreted by scripting utilities. With this update, "preupg --riskcheck" returns the documented exit status of 14.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 08:56:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1335121    

Description Alois Mahdal 2016-04-08 17:02:54 UTC
Description of problem
======================

If `preupg --riskcheck` is ran before `preupg`, it exits with status 255.

This is not a documented exit status, thus could be misinterpreted by
scripting tools, resulting in hidden problems.


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

preupgrade-assistant-2.1.5-4.el6.noarch


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

Always


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

 1. Have a fresh install, or remove /root/preupgrade* directories
 2. DON'T run `preupg` but run `preupg --riskcheck`
 3. Observe exit status


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

Exit status is 255, which is not a documented value (preupg --help)


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

Exit with one of documented values (currently 0-2).

Comment 2 Alois Mahdal 2016-04-08 17:21:16 UTC
Note that I have seen preupg --riskcheck exit with 255 also in other circumstances related to broken modules.  I have not been able to reproduce it reliably, though.

Hopefully once we'll have custom module set (bug 1289977 comment 1), we'll be able to catch that again.  (That would be another ticket than this one, though.)

Comment 9 Alois Mahdal 2016-10-07 04:26:48 UTC
preupgrade-assistant-ui-2.1.10-5.el6.noarch:

    [0 root@qeos-115 ~]# preupg --riskcheck; echo $?
    The 'preupg' command was not run yet. Run it to check for possible risks.
    24
    [0 root@qeos-115 ~]#

Comment 11 errata-xmlrpc 2016-11-04 08:56:49 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