Skip to content

Commit

Permalink
ipa actor: add shortened url for 9-to-10 migration guide
Browse files Browse the repository at this point in the history
During the RHEL 9.5 to RHEL 10.0 Leapp preupgrade process, the
check_ipa_server actor crashes due to a KeyError while trying to
find the URL for the 9-to-10 migration guide.

Add a URL for the key '9' and make the code more robust by
defaulting to "TBD" if the key is not found in the dictionary
storing version/url-of_migration guide.

Fixes: https://issues.redhat.com/browse/RHEL-50829
Co-authored-by: Vojtech Sokol <[email protected]>
Signed-off-by: Florence Blanc-Renaud <[email protected]>
  • Loading branch information
2 people authored and pirat89 committed Aug 12, 2024
1 parent a8c5664 commit 896fe43
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

# TBD: update the doc url when migration guide 8->9 becomes available
MIGRATION_GUIDE_8 = "https://red.ht/IdM-upgrading-RHEL-8-to-RHEL-9"
MIGRATION_GUIDE_9 = "https://red.ht/IdM-upgrading-RHEL-9-to-RHEL-10"
MIGRATION_GUIDES = {
'7': MIGRATION_GUIDE_7,
'8': MIGRATION_GUIDE_8
'8': MIGRATION_GUIDE_8,
'9': MIGRATION_GUIDE_9
}


Expand All @@ -27,7 +29,7 @@ def ipa_inhibit_upgrade(ipainfo):
hint="Follow the IdM RHEL migration guide lines."
),
reporting.ExternalLink(
url=MIGRATION_GUIDES[get_source_major_version()],
url=MIGRATION_GUIDES.get(get_source_major_version(), "TBD"),
title="IdM migration guide",
),
reporting.Severity(reporting.Severity.HIGH),
Expand Down Expand Up @@ -62,8 +64,8 @@ def ipa_warn_pkg_installed(ipainfo):
commands=[["yum", "remove", "-y", "ipa-server"]],
),
reporting.ExternalLink(
url=MIGRATION_GUIDES[get_source_major_version()],
title="Migrating IdM from RHEL 7 to 8",
url=MIGRATION_GUIDES.get(get_source_major_version(), "TBD"),
title="IdM migration guide",
),
reporting.Severity(reporting.Severity.MEDIUM),
reporting.Groups([reporting.Groups.SERVICES]),
Expand Down

0 comments on commit 896fe43

Please sign in to comment.