Skip to content

Commit

Permalink
Fix or TODO some version specific actions in actors
Browse files Browse the repository at this point in the history
  • Loading branch information
matejmatuska committed Jun 28, 2024
1 parent 8dd6283 commit c964c52
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 17 deletions.
5 changes: 4 additions & 1 deletion repos/system_upgrade/common/actors/checkfips/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def process(self):
reporting.ExternalLink(url=fips_7to8_steps_docs_url,
title='Planning an upgrade from RHEL 7 to RHEL 8')
])
else:
elif version.get_target_major_version() == '9':
# FIXME(mhecko): We include these files manually as they are not included automatically when the fips
# module is used due to a bug in dracut. This code should be removed, once the dracut bug is resolved.
# See https://bugzilla.redhat.com/show_bug.cgi?id=2176560
Expand All @@ -53,3 +53,6 @@ def process(self):
]
self.produce(UpgradeInitramfsTasks(include_files=fips_required_initramfs_files,
include_dracut_modules=[DracutModule(name='fips')]))
elif version.get_target_major_version() == '10':
# TODO(mmatuska): What to do with FIPS?
pass
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Supported architectures for upgrades with SAP HANA to RHEL 'X'
SAP_HANA_SUPPORTER_ARCHS = {
'8': [architecture.ARCH_X86_64],
'9': [architecture.ARCH_X86_64, architecture.ARCH_PPC64LE]
'9': [architecture.ARCH_X86_64, architecture.ARCH_PPC64LE],
# TODO(mmatuska): what arches are supported for sap hana for 9to10?
}

SAP_HANA_MINIMAL_MAJOR_VERSION = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def process(self):
self.process7to8(config)
elif get_source_major_version() == '8':
self.process8to9(config)
elif get_source_major_version() == '9':
# TODO(mmatuska): no-op?
pass
else:
api.current_logger().warning('Unknown source major version: {} (expecting 7 or 8)'
.format(get_source_major_version()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
from leapp.models import DistributionSignedRPM, TrackedFilesInfoSource

DEFAULT_OPENSSL_CONF = '/etc/pki/tls/openssl.cnf'
URL_8_CRYPTOPOLICIES = 'https://red.ht/rhel-8-system-wide-crypto-policies'
URL_9_CRYPTOPOLICIES = 'https://red.ht/rhel-9-system-wide-crypto-policies'
URL_CRYPTOPOLICIES = {
'8': 'https://red.ht/rhel-8-system-wide-crypto-policies',
'9': 'https://red.ht/rhel-9-system-wide-crypto-policies',
'10': 'https://red.ht/rhel-10-system-wide-crypto-policies', # TODO actually make the url
}


def check_ibmca():
Expand Down Expand Up @@ -70,7 +73,7 @@ def check_default_openssl():
if not _is_openssl_modified():
return

crypto_url = URL_8_CRYPTOPOLICIES if version.get_target_major_version == '8' else URL_9_CRYPTOPOLICIES
crypto_url = URL_CRYPTOPOLICIES[version.get_target_major_version()]

# TODO(pstodulk): Needs in future some rewording, as OpenSSL engines are
# deprecated since "RHEL 8" and people should use OpenSSL providers instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Personalities : [raid1] [raid6] [raid5] [raid4]
md1 : active raid1 sdb2[1] sda2[0]
136448 blocks [2/2] [UU]

md0 : active raid1 sdb1[1] sda1[0]
16787776 blocks [2/2] [UU]

md127 : active raid5 sdh1[6] sdg1[4] sdf1[3] sde1[2] sdd1[1] sdc1[0]
1464725760 blocks level 5, 64k chunk, algorithm 2 [6/5] [UUUUU_]
[==>..................] recovery = 12.6% (37043392/292945152) finish=127.5min speed=33440K/sec

md_d0 : inactive sdd1[0](S) sdf1[3](S) sde1[2](S) sdb1[1](S)
3907039744 blocks

unused devices: <none>
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
from leapp.libraries.stdlib import api, CalledProcessError, run
from leapp.models import SystemdBrokenSymlinksSource, SystemdBrokenSymlinksTarget, SystemdServicesInfoSource

_INSTALLATION_CHANGED_EL8 = ['rngd.service', 'sysstat.service']
_INSTALLATION_CHANGED_EL9 = []


def _get_installation_changed_units():
version = get_target_major_version()
if version == '8':
return _INSTALLATION_CHANGED_EL8
if version == '9':
return _INSTALLATION_CHANGED_EL9

return []
_INSTALLATION_CHANGED = {
'8': ['rngd.service', 'sysstat.service'],
'9': [],
'10': [],
}


def _service_enabled_source(service_info, name):
Expand Down Expand Up @@ -49,7 +43,7 @@ def _handle_newly_broken_symlinks(symlinks, service_info):


def _handle_bad_symlinks(service_files):
install_changed_units = _get_installation_changed_units()
install_changed_units = _INSTALLATION_CHANGED[get_target_major_version()]
potentially_bad = [s for s in service_files if s.name in install_changed_units]

for unit_file in potentially_bad:
Expand Down
1 change: 1 addition & 0 deletions repos/system_upgrade/common/libraries/rhui.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ def mk_rhui_setup(clients=None, leapp_pkg='', mandatory_files=None, optional_fil
}


# TODO(mmatuska) deprecate or adjust for 9to10?
def get_upg_path():
"""
Get upgrade path in specific string format
Expand Down

0 comments on commit c964c52

Please sign in to comment.