Skip to content

Commit

Permalink
[RHELC-568] docs: improve failed conversion message (#637)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Venefilyn and pre-commit-ci[bot] authored Nov 12, 2022
1 parent ee869aa commit 9acd944
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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 @@ -593,7 +593,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

0 comments on commit 9acd944

Please sign in to comment.