Bug 1362722
| Summary: | preupg --list-rules prints extra info; hard to use for scripting | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Alois Mahdal <amahdal> |
| Component: | preupgrade-assistant | Assignee: | Petr Hracek <phracek> |
| Status: | CLOSED ERRATA | QA Contact: | Alois Mahdal <amahdal> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.8 | CC: | amahdal, fkluknav, jmazanek, phracek, pstodulk, tcerna |
| Target Milestone: | rc | Keywords: | Extras |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | preupgrade-assistant-2.1.9-1.el6 | Doc Type: | Bug Fix |
| Doc Text: |
Cause:
preupg --list-rules prints relevant information with some
mess
Consequence:
It is hard to parse the output by the script for testing propose
Fix:
preupg --list-rules prints ONLY information without mess.
Result:
Script is able to parse the output properly.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-04 08:58:09 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 | ||
Message like "List of all available rules" is questionable. I don't want to print only a lines of rules for only tests. I would like to inform user about what we are doing right now. The sentence will remain. In case of upgrade RHEL6->RHEL7 and RHEL6->RHEL8 you can have two sets of modules. Therefore we should include upgrade path. This is also mandatory. The last line is valid. I will remove it. The rest stuff is easy to either skip and truncate. Why the needinfo? Please state your question; I'd be happy to help but I'm not sure what exctly is needed from me. :) Upstream commit: https://github.com/upgrades-migrations/preupgrade-assistant/commit/b2fc8efca4b010f8fbd220fbe7b05e593639cb8b Output now looks like: [root@rhel6workstation ~]# preupg --list-rules List of all available rules: RHEL6_7:xccdf_preupg_rule_others_configchanges_check RHEL6_7:xccdf_preupg_rule_others_rsyslog_check RHEL6_7:xccdf_preupg_rule_others_vcsrepos_check_script RHEL6_7:xccdf_preupg_rule_others_NoVersionChangeEtc_nochange [snip] RHEL6_7:xccdf_preupg_rule_networking_openldap_check RHEL6_7:xccdf_preupg_rule_networking_vsftpd_check RHEL6_7:xccdf_preupg_rule_networking_iptables_check_script [root@rhel6workstation ~]# Which is easy for passing. (In reply to Petr Hracek from comment #4) > Upstream commit: > https://github.com/upgrades-migrations/preupgrade-assistant/commit/ > b2fc8efca4b010f8fbd220fbe7b05e593639cb8b > > Output now looks like: > > [root@rhel6workstation ~]# preupg --list-rules > List of all available rules: > RHEL6_7:xccdf_preupg_rule_others_configchanges_check > RHEL6_7:xccdf_preupg_rule_others_rsyslog_check > RHEL6_7:xccdf_preupg_rule_others_vcsrepos_check_script > RHEL6_7:xccdf_preupg_rule_others_NoVersionChangeEtc_nochange > [snip] > RHEL6_7:xccdf_preupg_rule_networking_openldap_check > RHEL6_7:xccdf_preupg_rule_networking_vsftpd_check > RHEL6_7:xccdf_preupg_rule_networking_iptables_check_script > [root@rhel6workstation ~]# > Not exactly... the "List of..." line has been removed, as suggested in comment 0. Also, note that the format is now `UPATH:ruleid`, not `UPATH: ruleid`, i.e. the space has also been dropped. I have updated tests; the format works fine now. Thanks! 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 |
Description of problem ====================== preupg --list-rules currently prints: [0 root@qeos-90 fupath]# preupg --list-rules List of all available rules: RHEL6_7: xccdf_preupg_rule_others_configchanges_check RHEL6_7: xccdf_preupg_rule_others_rsyslog_check RHEL6_7: xccdf_preupg_rule_others_vcsrepos_check_script [...] RHEL6_7: xccdf_preupg_rule_networking_openldap_check RHEL6_7: xccdf_preupg_rule_networking_vsftpd_check RHEL6_7: xccdf_preupg_rule_networking_iptables_check_script [0 root@qeos-90 fupath]# Notice 3 kinds of extraneous output: * "List of" message, * "RHEL6_7: " prefix, * empty line at the end. This makes the command hard to use for scripted use (which was the reason it was added in the first place). Version-Release number of selected component ============================================ preupgrade-assistant-2.1.8-2.el6 How reproducible ================ Always Steps to Reproduce ================== 1. preupg --list-rules Actual results ============== As above Expected results ================ Only rule ids (`^xccdf_preupg_rule_`) Additional info =============== The "List of all" part is useless: since we've *asked* for list of rules, we *know* what should be coming. The RHEL6_7: prefix is arguably not necessary at all. Under normal operation, it's implied that only one upgrade path is in use; it would make sense to assume this also when listing.