Skip to content

Commit f5b1c1b

Browse files
committed
Change the upgrade paths for SAP HANA
- Drop 7.9 to 8.2 - Add 7.9 to 8.8, but keep 7.9 to 8.6 as default - Add 8.8 to 9.2 - Drop SAP HANA version check for the target releases >=8.8 and >=9.2 - Correct actor.py docstring to support ppc64le for 8to9 upgrade (see PR1042)
1 parent d1a7170 commit f5b1c1b

File tree

5 files changed

+50
-58
lines changed

5 files changed

+50
-58
lines changed

repos/system_upgrade/common/actors/checksaphana/actor.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ class CheckSapHana(Actor):
1212
If the upgrade flavour is 'default' no checks are being executed.
1313
1414
The following checks are executed:
15-
- If this system is _NOT_ running on x86_64, the upgrade is inhibited.
16-
- If SAP HANA 1 has been detected on the system the upgrade is inhibited since it is not supported on RHEL8.
15+
- If the major target release is 8, and this system is _NOT_ running on x86_64, the upgrade is inhibited.
16+
- If the major target release is 9, and this system is _NOT_ running on x86_64 or ppc64le,
17+
the upgrade is inhibited.
18+
- If SAP HANA 1 has been detected on the system the upgrade is inhibited since there is no supported upgrade path
19+
with installed SAP HANA 1.
1720
- If SAP HANA 2 has been detected, the upgrade will be inhibited if an unsupported version for the target release
18-
has been detected.
21+
has been detected (<8.8, <9.2).
22+
- If the target release >=8.8 or >=9.2, the upgrade will be inhibited unless a user confirms to proceed
23+
for the currently installed SAP HANA 2.0 version and the chosen target release.
1924
- If SAP HANA is running the upgrade is inhibited.
2025
"""
2126

repos/system_upgrade/common/actors/checksaphana/libraries/checksaphana.py

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,36 @@
1010
'9': [architecture.ARCH_X86_64, architecture.ARCH_PPC64LE]
1111
}
1212

13-
# SAP HANA 2.00 rev 54 is the minimal supported revision for both RHEL 7.9 and RHEL 8.2
14-
1513
SAP_HANA_MINIMAL_MAJOR_VERSION = 2
16-
# RHEL 8.2 target requirements
17-
SAP_HANA_RHEL82_REQUIRED_PATCH_LEVELS = ((5, 54, 0),)
18-
SAP_HANA_RHEL82_MINIMAL_VERSION_STRING = 'HANA 2.0 SPS05 rev 54 or later'
1914

2015
# RHEL 8.6 target requirements
2116
SAP_HANA_RHEL86_REQUIRED_PATCH_LEVELS = ((5, 59, 2),)
2217
SAP_HANA_RHEL86_MINIMAL_VERSION_STRING = 'HANA 2.0 SPS05 rev 59.02 or later'
2318

24-
# RHEL 9 target requirements
25-
SAP_HANA_RHEL9_REQUIRED_PATCH_LEVELS = ((5, 59, 4), (6, 63, 0))
26-
SAP_HANA_RHEL9_MINIMAL_VERSION_STRING = 'HANA 2.0 SPS05 rev 59.04 or later, or SPS06 rev 63 or later'
19+
# RHEL 9.0 target requirements
20+
SAP_HANA_RHEL90_REQUIRED_PATCH_LEVELS = ((5, 59, 4), (6, 63, 0))
21+
SAP_HANA_RHEL90_MINIMAL_VERSION_STRING = 'HANA 2.0 SPS05 rev 59.04 or later, or SPS06 rev 63 or later'
22+
23+
24+
def _report_skip_check():
25+
summary = (
26+
'For the target RHEL releases >=8.8 and >=9.2 '
27+
'the leapp utility does not check RHEL and SAP HANA 2.0 '
28+
'versions compatibility. Please ensure your SAP HANA 2.0 '
29+
'is supported on the target RHEL release and '
30+
'proceed on your discretion. '
31+
'SAP HANA: Supported Operating Systems '
32+
'https://launchpad.support.sap.com/#/notes/2235581')
33+
remedy_hint = 'Ensure your SAP HANA 2.0 is supported on the target release.'
34+
reporting.create_report([
35+
reporting.Title('SAP HANA 2.0 version should be checked prior the upgrade'),
36+
reporting.Summary(summary),
37+
reporting.Severity(reporting.Severity.MEDIUM),
38+
reporting.Groups([reporting.Groups.SANITY]),
39+
reporting.Remediation(hint=remedy_hint),
40+
reporting.ExternalLink(url='https://launchpad.support.sap.com/#/notes/2235581',
41+
title='SAP HANA: Supported Operating Systems'),
42+
])
2743

2844

2945
def _manifest_get(manifest, key, default_value=None):
@@ -45,7 +61,6 @@ def running_check(info):
4561
reporting.Severity(reporting.Severity.HIGH),
4662
reporting.Groups([reporting.Groups.SANITY]),
4763
reporting.Groups([reporting.Groups.INHIBITOR]),
48-
reporting.Audience('sysadmin')
4964
])
5065

5166

@@ -72,12 +87,10 @@ def _create_detected_instances_list(details):
7287

7388

7489
def _min_ver_string():
75-
if version.get_target_major_version() == '8':
90+
if version.matches_target_version('8.6'):
7691
ver_str = SAP_HANA_RHEL86_MINIMAL_VERSION_STRING
77-
if version.matches_target_version('8.2'):
78-
ver_str = SAP_HANA_RHEL82_MINIMAL_VERSION_STRING
7992
else:
80-
ver_str = SAP_HANA_RHEL9_MINIMAL_VERSION_STRING
93+
ver_str = SAP_HANA_RHEL90_MINIMAL_VERSION_STRING
8194
return ver_str
8295

8396

@@ -89,10 +102,9 @@ def version1_check(info):
89102
_add_hana_details(found, instance)
90103

91104
if found:
92-
min_ver_string = _min_ver_string()
93105
detected = _create_detected_instances_list(found)
94106
reporting.create_report([
95-
reporting.Title('Found SAP HANA 1 which is not supported with the target version of RHEL'),
107+
reporting.Title('Found SAP HANA 1.0 which is not supported with the target version of RHEL'),
96108
reporting.Summary(
97109
('SAP HANA 1.00 is not supported with the version of RHEL you are upgrading to.\n\n'
98110
'The following instances have been detected to be version 1.00:\n'
@@ -101,12 +113,11 @@ def version1_check(info):
101113
reporting.Severity(reporting.Severity.HIGH),
102114
reporting.RemediationHint((
103115
'In order to upgrade RHEL, you will have to upgrade your SAP HANA 1.0 software to '
104-
'{supported}.'.format(supported=min_ver_string))),
116+
'SAP HANA 2.0 supported on the target RHEL release first.')),
105117
reporting.ExternalLink(url='https://launchpad.support.sap.com/#/notes/2235581',
106118
title='SAP HANA: Supported Operating Systems'),
107119
reporting.Groups([reporting.Groups.SANITY]),
108120
reporting.Groups([reporting.Groups.INHIBITOR]),
109-
reporting.Audience('sysadmin')
110121
])
111122

112123

@@ -160,12 +171,10 @@ def _sp_rev_patchlevel_check(instance, patchlevels):
160171

161172
def _fullfills_hana_min_version(instance):
162173
""" Performs a check whether the version of SAP HANA fulfills the minimal requirements for the target RHEL """
163-
if version.get_target_major_version() == '8':
174+
if version.matches_target_version('8.6'):
164175
patchlevels = SAP_HANA_RHEL86_REQUIRED_PATCH_LEVELS
165-
if version.matches_target_version('8.2'):
166-
patchlevels = SAP_HANA_RHEL82_REQUIRED_PATCH_LEVELS
167176
else:
168-
patchlevels = SAP_HANA_RHEL9_REQUIRED_PATCH_LEVELS
177+
patchlevels = SAP_HANA_RHEL90_REQUIRED_PATCH_LEVELS
169178
return _major_version_check(instance) and _sp_rev_patchlevel_check(instance, patchlevels)
170179

171180

@@ -175,6 +184,11 @@ def version2_check(info):
175184
for instance in info.instances:
176185
if _manifest_get(instance.manifest, 'release', None) == '1.00':
177186
continue
187+
if version.matches_target_version('> 8.6', '< 9.0') or version.matches_target_version('> 9.0'):
188+
# if a target release is >=8.8 or >=9.2, the SAP HANA and RHEL versions compatibility is not checked
189+
_report_skip_check()
190+
return
191+
# if a starget release is 8.6 or 9.0 we still check SAP HANA and RHEL versions compatibility
178192
if not _fullfills_hana_min_version(instance):
179193
_add_hana_details(found, instance)
180194

@@ -196,7 +210,6 @@ def version2_check(info):
196210
reporting.Severity(reporting.Severity.HIGH),
197211
reporting.Groups([reporting.Groups.SANITY]),
198212
reporting.Groups([reporting.Groups.INHIBITOR]),
199-
reporting.Audience('sysadmin')
200213
])
201214

202215

repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -166,33 +166,6 @@ def _kv(k, v):
166166
]
167167

168168

169-
@pytest.mark.parametrize(
170-
'major,rev,patchlevel,result', (
171-
(2, 52, 0, True),
172-
(2, 52, 1, True),
173-
(2, 52, 2, True),
174-
(2, 53, 0, True),
175-
(2, 60, 0, True),
176-
(2, 48, 2, True),
177-
(2, 48, 1, False),
178-
(2, 48, 0, False),
179-
(2, 38, 2, False),
180-
(2, 49, 0, True),
181-
)
182-
)
183-
def test_checksaphana__fullfills_rhel82_hana_min_version(monkeypatch, major, rev, patchlevel, result):
184-
monkeypatch.setattr(version, 'get_target_major_version', lambda: '8')
185-
monkeypatch.setattr(version, 'get_target_version', lambda: '8.2')
186-
monkeypatch.setattr(checksaphana, 'SAP_HANA_RHEL82_REQUIRED_PATCH_LEVELS', ((4, 48, 2), (5, 52, 0)))
187-
assert checksaphana._fullfills_hana_min_version(
188-
MockSAPHanaVersionInstance(
189-
major=major,
190-
rev=rev,
191-
patchlevel=patchlevel,
192-
)
193-
) == result
194-
195-
196169
@pytest.mark.parametrize(
197170
'major,rev,patchlevel,result', (
198171
(2, 52, 0, True),
@@ -239,10 +212,10 @@ def test_checksaphana__fullfills_rhel86_hana_min_version(monkeypatch, major, rev
239212
(2, 64, 0, True),
240213
)
241214
)
242-
def test_checksaphana__fullfills_hana_rhel9_min_version(monkeypatch, major, rev, patchlevel, result):
215+
def test_checksaphana__fullfills_hana_rhel90_min_version(monkeypatch, major, rev, patchlevel, result):
243216
monkeypatch.setattr(version, 'get_target_major_version', lambda: '9')
244217
monkeypatch.setattr(version, 'get_target_version', lambda: '9.0')
245-
monkeypatch.setattr(checksaphana, 'SAP_HANA_RHEL9_REQUIRED_PATCH_LEVELS', ((5, 59, 4), (6, 63, 0)))
218+
monkeypatch.setattr(checksaphana, 'SAP_HANA_RHEL90_REQUIRED_PATCH_LEVELS', ((5, 59, 4), (6, 63, 0)))
246219
assert checksaphana._fullfills_hana_min_version(
247220
MockSAPHanaVersionInstance(
248221
major=major,

repos/system_upgrade/common/files/upgrade_paths.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
"8": ["9.2"]
88
},
99
"saphana": {
10-
"7.9": ["8.2", "8.6"],
11-
"7": ["8.2", "8.6"],
10+
"7.9": ["8.8", "8.6"],
11+
"7": ["8.8", "8.6"],
1212
"8.6": ["9.0"],
13-
"8": ["9.0"]
13+
"8.8": ["9.2"],
14+
"8": ["9.2", "9.0"]
1415
}
1516
}

repos/system_upgrade/common/libraries/config/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
_SUPPORTED_VERSIONS = {
1515
# Note: 'rhel-alt' is detected when on 'rhel' with kernel 4.x
1616
'7': {'rhel': ['7.9'], 'rhel-alt': [], 'rhel-saphana': ['7.9']},
17-
'8': {'rhel': ['8.6', '8.8'], 'rhel-saphana': ['8.6']},
17+
'8': {'rhel': ['8.6', '8.8'], 'rhel-saphana': ['8.6', '8.8']},
1818
}
1919

2020

0 commit comments

Comments
 (0)