Bug 1418509

Summary: --list-rules does not work with multiple upgrade paths
Product: Red Hat Enterprise Linux 6 Reporter: Alois Mahdal <amahdal>
Component: preupgrade-assistantAssignee: Michal Bocek <mbocek>
Status: CLOSED ERRATA QA Contact: Tereza Cerna <tcerna>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: jmazanek, mbocek, ovasik, phracek, pstodulk, tcerna
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: preupgrade-assistant-2.4.1-1.el6 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 23:47:15 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: 1429926    

Description Alois Mahdal 2017-02-02 01:16:02 UTC
Description of problem
======================

preupg --list-rules does not work at all if multiple upgrade paths are installed:

    [0 root@qeos-222 ~]# preupg --list-rules 
    Preupgrade Assistant detects more than one set of modules in the /usr/share/preupgrade directory.

    The list of sets of all available modules is: 
    RHEL5_7
    RHEL6_7
    If you would like to use the tool, specify the correct upgrade path mentioned above with a parameter -s.
    [0 root@qeos-222 ~]# preupg --list-rules -s RHEL6_7
    Preupgrade Assistant detects more than one set of modules in the /usr/share/preupgrade directory.

    The list of sets of all available modules is: 
    RHEL5_7
    RHEL6_7
    If you would like to use the tool, specify the correct upgrade path mentioned above with a parameter -s.
    [0 root@qeos-222 ~]# preupg -s RHEL6_7 --list-rules
    Preupgrade Assistant detects more than one set of modules in the /usr/share/preupgrade directory.

    The list of sets of all available modules is: 
    RHEL5_7
    RHEL6_7
    If you would like to use the tool, specify the correct upgrade path mentioned above with a parameter -s.
    [0 root@qeos-222 ~]# 


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

preupgrade-assistant-2.1.10-6.el6.noarch
preupgrade-assistant-2.3.0-1.el6.noarch


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

Always


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

 1. install multiple upgrade paths

 2. preupg --list-rules

 3. preupg --list-rules -s UPATH

    where UPATH is name of the upgrade path, eg. RHEL6_7


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

Either of them should work.  It's not sure if listing modules from
multiple paths should be supported.  If not, only the second one should
work.


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

None of them works

Comment 3 Michal Bocek 2017-05-19 18:55:16 UTC
Fix in upstream prepared: https://github.com/upgrades-migrations/preupgrade-assistant/pull/269

Comment 5 Tereza Cerna 2017-06-29 13:48:55 UTC
==============================================================
Verified in:
    preupgrade-assistant-2.4.1-1.el6.noarch
    preupgrade-assistant-el6toel7-0.6.70-2.el6.noarch
    preupgrade-assistant-el6toel7-data-0.20170620-1.el6.noarch
PASS
==============================================================

# rpm -q preupgrade-assistant-{el5toel7,el6toel7}
preupgrade-assistant-el5toel7-0.6.47-3.el5_11.noarch
preupgrade-assistant-el6toel7-0.6.70-2.el6.noarch

# ls /usr/share/preupgrade | grep RHEL
RHEL5_7
RHEL6_7

# preupg --list-rules
More than one module set is detected in the default directory (/usr/share/preupgrade).
Available module sets: 
RHEL6_7
RHEL5_7
Use option -s to specify which module set should be used.

# preupg -s RHEL5_7 --list-rules
RHEL5_7:xccdf_preupg_rule_others_home-directories_check
RHEL5_7:xccdf_preupg_rule_others_vcsrepos_check
RHEL5_7:xccdf_preupg_rule_selinux_cleanconfigs_check
...

# preupg --list-rules -s RHEL6_7
RHEL6_7:xccdf_preupg_rule_services_freeradius_check
RHEL6_7:xccdf_preupg_rule_services_quota_nld_new_package_check
RHEL6_7:xccdf_preupg_rule_services_quota_nld_configuration_check
...

==============================================================
Reproduced in:
    preupgrade-assistant-2.3.3-2.el6.noarch
    preupgrade-assistant-el6toel7-0.6.66-3.el6.noarch
    preupgrade-assistant-el6toel7-data-0.20170218-1.el6.noarch
FAIL
==============================================================

# rpm -q preupgrade-assistant-{el5toel7,el6toel7}
preupgrade-assistant-el5toel7-0.6.47-3.el5_11.noarch
preupgrade-assistant-el6toel7-0.6.66-3.el6.noarch

# ls /usr/share/preupgrade | grep RHEL
RHEL5_7
RHEL6_7

# preupg --list-rules -s RHEL6_7
Preupgrade Assistant detects more than one set of modules in the /usr/share/preupgrade directory.

The list of sets of all available modules is: 
RHEL6_7
RHEL5_7
If you would like to use the tool, specify the correct upgrade path mentioned above with a parameter -s.

>> Other variants of input were tested and all were wrong:
# preupg --list-rules -s RHEL5_7
# preupg --list-rules -s RHEL6_7
# preupg -s RHEL6_7 --list-rules
# preupg -s RHEL5_7 --list-rules

Comment 7 errata-xmlrpc 2017-08-01 23:47:15 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://access.redhat.com/errata/RHBA-2017:2391