Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RHELC-568] docs: improve failed conversion message #637

Merged
merged 8 commits into from
Nov 12, 2022
8 changes: 7 additions & 1 deletion convert2rhel/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ def main():
# system rollback without user intervention. If a proper rollback
# solution is necessary it will need to be future implemented here
# or with the use of other backup tools.
loggerinst.warning("Conversion process interrupted and manual user intervention will be necessary.")
loggerinst.warning(
"The conversion process failed.\n\n"
"The system is left in an undetermined state that Convert2RHEL cannot fix. The system might not be"
" fully converted, and might incorrectly be reporting as a Red Hat Enterprise Linux machine.\n\n"
"It is strongly recommended to store the Convert2RHEL logs for later investigation, and restore"
" the system from a backup."
)
subscription.update_rhsm_custom_facts()
return 1

Expand Down
4 changes: 1 addition & 3 deletions convert2rhel/unit_tests/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,5 @@ def test_main_rollback_post_ponr_changes_phase(monkeypatch, caplog):
assert ask_to_continue_mock.call_count == 1
assert post_ponr_conversion_mock.call_count == 1
assert finish_collection_mock.call_count == 1
assert (
"Conversion process interrupted and manual user intervention will be necessary." in caplog.records[-1].message
)
assert "The system is left in an undetermined state that Convert2RHEL cannot fix." in caplog.records[-1].message
assert update_rhsm_custom_facts_mock.call_count == 1