Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packaging/leapp-repository.spec
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,6 @@ rm -rf %{buildroot}%{leapp_python_sitelib}/leapp/cli/commands/tests
rm -rf %{buildroot}%{repositorydir}/system_upgrade/el8toel9
%else
rm -rf %{buildroot}%{repositorydir}/system_upgrade/el7toel8
# CloudLinux migration only supports el7 to el8
rm -rf %{buildroot}%{repositorydir}/system_upgrade/cloudlinux
%endif

# remove component/unit tests, Makefiles, ... stuff that related to testing only
Expand Down
2 changes: 1 addition & 1 deletion repos/system_upgrade/cloudlinux/.leapp/info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name": "cloudlinux", "id": "427ddd90-9b5e-4400-b21e-73d77791f175", "repos": ["644900a5-c347-43a3-bfab-f448f46d9647", "c47fbc3d-ae38-416e-9176-7163d67d94f6", "efcf9016-f2d1-4609-9329-a298e6587b3c"]}
{"name": "cloudlinux", "id": "427ddd90-9b5e-4400-b21e-73d77791f175", "repos": ["644900a5-c347-43a3-bfab-f448f46d9647", "efcf9016-f2d1-4609-9329-a298e6587b3c"]}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class CheckRhnClientToolsVersion(Actor):

@run_on_cloudlinux
def process(self):
# todo: (CLOS-3202) update the actor
return

title, summary, remediation = None, None, None
# ex:
# Version : 2.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,6 @@ def lua_cjson_handle(self):

@run_on_cloudlinux
def process(self):
self.rpm_lookup = {rpm for rpm in self.consume(InstalledRPM)}
# todo: (CLOS-3205) investigate why set is needed here
self.rpm_lookup = [rpm for rpm in self.consume(InstalledRPM)]
self.alt_python37_handle()
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from leapp.libraries.common.cln_switch import cln_switch, get_target_userspace_path
from leapp import reporting
from leapp.reporting import Report
from leapp.libraries.common.config.version import get_target_major_version



Expand All @@ -29,7 +30,7 @@ class SwitchClnChannelDownload(Actor):
@run_on_cloudlinux
def process(self):
try:
cln_switch(target=8)
cln_switch(target=int(get_target_major_version()))
except CalledProcessError as e:
reporting.create_report(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from leapp.libraries.stdlib import CalledProcessError
from leapp.libraries.common.cllaunch import run_on_cloudlinux
from leapp.libraries.common.cln_switch import cln_switch
from leapp.libraries.common.config.version import get_source_major_version
from leapp import reporting
from leapp.reporting import Report

Expand All @@ -21,12 +22,12 @@ class SwitchClnChannelReset(Actor):
@run_on_cloudlinux
def process(self):
try:
cln_switch(target=7)
cln_switch(target=get_source_major_version())
except CalledProcessError as e:
reporting.create_report(
[
reporting.Title(
"Failed to switch CloudLinux Network channel from to 7."
"Failed to switch CloudLinux Network channel."
),
reporting.Summary(
"Command {} failed with exit code {}."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def _handle_transaction_err_msg_size(err):


def enable_spacewalk_module(context):
enabled_repos = ["cloudlinux8-baseos"]
target_major_version = get_target_major_version()
enabled_repos = ["cloudlinux{version}-baseos".format(version=target_major_version)]
repos_opt = [['--enablerepo', repo] for repo in enabled_repos]
repos_opt = list(itertools.chain(*repos_opt))

Expand Down Expand Up @@ -260,10 +260,17 @@ def prepare_target_userspace(context, userspace_dir, enabled_repos, packages):
_import_gpg_keys(context, install_root_dir, target_major_version)

api.current_logger().debug('Installing cloudlinux-release')
context.call(['rpm', '--import', 'https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux'], callback_raw=utils.logging_handler)
context.call(['dnf', '-y', 'localinstall', 'https://repo.cloudlinux.com/cloudlinux/migrate/release-files/cloudlinux/8/x86_64/cloudlinux8-release-current.x86_64.rpm'], callback_raw=utils.logging_handler)

enable_spacewalk_module(context)
context.call(['rpm', '--import', 'https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux'],
callback_raw=utils.logging_handler)
cloudlinux_release_url = 'https://repo.cloudlinux.com/cloudlinux/migrate/release-files' \
'/cloudlinux/{version}/x86_64/cloudlinux{version}-release-current.x86_64.rpm' \
''.format(version=target_major_version)
context.call(['dnf', '-y', 'localinstall', cloudlinux_release_url],
callback_raw=utils.logging_handler)

# cloudlinux 9 does not have modular packages
if target_major_version == '8':
enable_spacewalk_module(context)

api.current_logger().debug('Installing packages into target userspace: {}'.format(packages))

Expand Down Expand Up @@ -333,7 +340,7 @@ def prepare_target_userspace(context, userspace_dir, enabled_repos, packages):
# transaction check phase is done - so the preupgrade checks won't affect the host system.
# The 'switch_cln_channel_download' actor should take care of switching the channel back to the CL8 channel
# when it's time to download the upgrade packages.
cln_switch(target=8)
cln_switch(target=int(get_target_major_version()))


def _query_rpm_for_pkg_files(context, pkgs):
Expand Down
2 changes: 1 addition & 1 deletion repos/system_upgrade/common/libraries/config/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
_SUPPORTED_VERSIONS = {
# Note: 'rhel-alt' is detected when on 'rhel' with kernel 4.x
'7': {'rhel': ['7.9'], 'rhel-alt': [], 'rhel-saphana': ['7.9'], 'centos': ['7.9'], 'eurolinux': ['7.9'], 'ol': ['7.9'], 'scientific': ['7.9'], 'cloudlinux': ['7.9']},
'8': {'rhel': ['8.8', '8.10'], 'rhel-saphana': ['8.8', '8.10'], 'centos': ['8.5', '8.999'], 'almalinux': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'eurolinux': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'ol': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'rocky': ['8.6', '8.7', '8.8', '8.9', '8.10']},
'8': {'rhel': ['8.8', '8.10'], 'rhel-saphana': ['8.8', '8.10'], 'centos': ['8.5', '8.999'], 'almalinux': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'eurolinux': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'ol': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'rocky': ['8.6', '8.7', '8.8', '8.9', '8.10'], 'cloudlinux': ['8.10']},
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ class CheckDeprecatedRPMSignature(Actor):
tags = (IPUWorkflowTag, ChecksPhaseTag)

def process(self):
checkdeprecatedrpmsignature.process()
# todo: (CLOS-3206) resign all packages and turn the check back on
# checkdeprecatedrpmsignature.process()
pass
Loading