Bug 1362659
| Summary: | exit_fail without risk results in needs_inspection | ||
|---|---|---|---|
| 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: | fkluknav, jmazanek, phracek, pstodulk, tcerna, thozza |
| Target Milestone: | rc | Keywords: | Extras |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-04 08:58:00 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 | ||
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.)
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 ~]# (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. Upstream fix: https://github.com/upgrades-migrations/preupgrade-assistant/commit/f71c2e1e9ff294583fe5c209ca1ce1ba35a244fa 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 (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. 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. (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...) 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. 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 ====================== 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"