Bug 1361715
| Summary: | preupg exits with 255 with some result combinations | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Alois Mahdal <amahdal> |
| Component: | preupgrade-assistant | Assignee: | Michal Bocek <mbocek> |
| Status: | CLOSED ERRATA | QA Contact: | Alois Mahdal <amahdal> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.8 | CC: | fkluknav, jmazanek, jreznik, mbocek, ovasik, phracek, pstodulk, tcerna |
| Target Milestone: | rc | Keywords: | Extras |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | preupgrade-assistant-2.2.0-1.el6 | Doc Type: | No Doc Update |
| Doc Text: |
undefined
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-03-21 12:09:10 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, 1393496 | ||
This affects mosts tests, giving false positives. OK, I will look on it. It is a pretty hard to test it, though. (In reply to Petr Hracek from comment #4) > OK, I will look on it. > It is a pretty hard to test it, though. It's probably hard to test the failure cases, but the "normal" cases (various result combinations, 0-3) should be relatively straightforward, and those are currently hurting us most. (I'm planning to write test focused on the "normal" cases; and more in future cycles...) *** Bug 1368825 has been marked as a duplicate of this bug. *** In preupgrade-assistant-2.2.0-1.el6, preupg exits with code 1 or 2 on module failure/error. See the below table that show what exit codes are returned based on module results.
MODULE FUNC CALLS || PREUPG BEHAVIOR
------.-------------||--------.-------------.
exit_x | log_x_risk || result | exit status |
=======|============||========|=============|
fail | (none) || fail | 2 |
fail | slight || n_ins | 0 |
fail | medium || n_ins | 0 |
fail | high || n_act | 1 |
fail | extreme || fail | 2 |
-------|------------||--------|-------------|
fixed | * || fixed | 0 |
-------|------------||--------|-------------|
info | * || info | 0 |
-------|------------||--------|-------------|
n_app | * || napp | 0 |
-------|------------||--------|-------------|
pass | * || pass | 0 |
-------|------------||--------|-------------|
error | * || error | 2 |
-------|------------||--------|-------------|
exit_x or || | |
log_x_risk || error | 2 |
not called || | |
-------|------------||--------|-------------|
/CoreOS/preupgrade-assistant/api/mseverity covers this, and it passes, so OK from me. 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-2017-0819.html |
Description of problem ====================== In some cases, `preupg` ends with 255, even though everything else seems to be OK. I found this when running mysql module test, which runs all 4 database modules in loop with varying presence of incompatible options or mysql packages. There seems to be corelation with results: notapplicable notapplicable notapplicable notapplicable FAIL notapplicable pass informational informational FAIL notapplicable notapplicable notapplicable needs_action PASS notapplicable pass informational needs_action PASS notapplicable pass informational needs_inspection PASS It seems as if only cases containing at leasr "needs_inspection" or "needs_action" behave normally. The exact command run in the test is: preupg --force --select-rules 'xccdf_preupg_rule_databases_postgresql_pre,xccdf_preupg_rule_databases_mysql_data_migration_migration,xccdf_preupg_rule_databases_mysql_configuration_changes_configuration,xccdf_preupg_rule_databases_mysql_general_changes_general' Version-Release number of selected component ============================================ preupgrade-assistant-2.1.8-2.el6 preupgrade-assistant-el6toel7-0.6.52-1.el6 How reproducible ================ Always (with this test) Steps to Reproduce ================== Schedule test /CoreOS/preupgrade-assistant/6to7/contents/mysql-configuration_changes: ipu sched -B -t /CoreOS/preupgrade-assistant/6to7/contents/mysql-configuration_changes | bash Actual results ============== Some subtests report failure due to exit status 255 Expected results ================ Exit status should be 0, 1 or 2 in all sub-tests (i.e. the preupg wrapper should always report PASS)