Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,2 +1,5 @@
|
||||
SOURCES/deps-pkgs-13.tar.gz
|
||||
SOURCES/leapp-repository-0.22.0.tar.gz
|
||||
SOURCES/deps-pkgs-9.tar.gz
|
||||
SOURCES/leapp-repository-0.18.0.tar.gz
|
||||
/deps-pkgs-9.tar.gz
|
||||
/deps-pkgs-10.tar.gz
|
||||
/leapp-repository-0.20.0.tar.gz
|
||||
|
@ -1,2 +0,0 @@
|
||||
3590b33b4a79ebe62f5cfa0eeca7efb41d526498 SOURCES/deps-pkgs-13.tar.gz
|
||||
e23b32573b375337b079dd7a0dc07e9232851b1c SOURCES/leapp-repository-0.22.0.tar.gz
|
251
0001-rhui-do-not-bootstrap-target-client-on-aws.patch
Normal file
251
0001-rhui-do-not-bootstrap-target-client-on-aws.patch
Normal file
@ -0,0 +1,251 @@
|
||||
From 921c06892f7550a3a8e2b3fe941c6272bdacf88d Mon Sep 17 00:00:00 2001
|
||||
From: mhecko <mhecko@redhat.com>
|
||||
Date: Thu, 15 Feb 2024 09:56:27 +0100
|
||||
Subject: [PATCH 01/34] rhui: do not bootstrap target client on aws
|
||||
|
||||
Bootstrapping target RHUI client now requires installing the entire
|
||||
RHEL8 RPM stack. Threfore, do not try installing target client
|
||||
and instead rely only on the files from our leapp-rhui-aws package.
|
||||
---
|
||||
.../cloud/checkrhui/libraries/checkrhui.py | 6 +-
|
||||
.../libraries/userspacegen.py | 104 ++++++++++++++----
|
||||
.../system_upgrade/common/models/rhuiinfo.py | 7 ++
|
||||
3 files changed, 92 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/cloud/checkrhui/libraries/checkrhui.py b/repos/system_upgrade/common/actors/cloud/checkrhui/libraries/checkrhui.py
|
||||
index 84ab40e3..e1c158c7 100644
|
||||
--- a/repos/system_upgrade/common/actors/cloud/checkrhui/libraries/checkrhui.py
|
||||
+++ b/repos/system_upgrade/common/actors/cloud/checkrhui/libraries/checkrhui.py
|
||||
@@ -142,7 +142,11 @@ def customize_rhui_setup_for_aws(rhui_family, setup_info):
|
||||
|
||||
target_version = version.get_target_major_version()
|
||||
if target_version == '8':
|
||||
- return # The rhel8 plugin is packed into leapp-rhui-aws as we need python2 compatible client
|
||||
+ # RHEL8 rh-amazon-rhui-client depends on amazon-libdnf-plugin that depends
|
||||
+ # essentially on the entire RHEL8 RPM stack, so we cannot just swap the clients
|
||||
+ # The leapp-rhui-aws will provide all necessary files to access entire RHEL8 content
|
||||
+ setup_info.bootstrap_target_client = False
|
||||
+ return
|
||||
|
||||
amazon_plugin_copy_task = CopyFile(src='/usr/lib/python3.9/site-packages/dnf-plugins/amazon-id.py',
|
||||
dst='/usr/lib/python3.6/site-packages/dnf-plugins/')
|
||||
diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
index d917bfd5..d60bc75f 100644
|
||||
--- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
+++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
@@ -853,9 +853,9 @@ def _get_rhui_available_repoids(context, cloud_repo):
|
||||
return set(repoids)
|
||||
|
||||
|
||||
-def get_copy_location_from_copy_in_task(context, copy_task):
|
||||
+def get_copy_location_from_copy_in_task(context_basepath, copy_task):
|
||||
basename = os.path.basename(copy_task.src)
|
||||
- dest_in_container = context.full_path(copy_task.dst)
|
||||
+ dest_in_container = os.path.join(context_basepath, copy_task.dst)
|
||||
if os.path.isdir(dest_in_container):
|
||||
return os.path.join(copy_task.dst, basename)
|
||||
return copy_task.dst
|
||||
@@ -871,7 +871,10 @@ def _get_rh_available_repoids(context, indata):
|
||||
|
||||
# If we are upgrading a RHUI system, check what repositories are provided by the (already installed) target clients
|
||||
if indata and indata.rhui_info:
|
||||
- files_provided_by_clients = _query_rpm_for_pkg_files(context, indata.rhui_info.target_client_pkg_names)
|
||||
+ setup_info = indata.rhui_info.target_client_setup_info
|
||||
+ target_content_access_files = set()
|
||||
+ if setup_info.bootstrap_target_client:
|
||||
+ target_content_access_files = _query_rpm_for_pkg_files(context, indata.rhui_info.target_client_pkg_names)
|
||||
|
||||
def is_repofile(path):
|
||||
return os.path.dirname(path) == '/etc/yum.repos.d' and os.path.basename(path).endswith('.repo')
|
||||
@@ -884,24 +887,33 @@ def _get_rh_available_repoids(context, indata):
|
||||
|
||||
yum_repos_d = context.full_path('/etc/yum.repos.d')
|
||||
all_repofiles = {os.path.join(yum_repos_d, path) for path in os.listdir(yum_repos_d) if path.endswith('.repo')}
|
||||
- client_repofiles = {context.full_path(path) for path in files_provided_by_clients if is_repofile(path)}
|
||||
+ api.current_logger().debug('(RHUI Setup) All available repofiles: {0}'.format(' '.join(all_repofiles)))
|
||||
+
|
||||
+ target_access_repofiles = {
|
||||
+ context.full_path(path) for path in target_content_access_files if is_repofile(path)
|
||||
+ }
|
||||
|
||||
# Exclude repofiles used to setup the target rhui access as on some platforms the repos provided by
|
||||
# the client are not sufficient to install the client into target userspace (GCP)
|
||||
rhui_setup_repofile_tasks = [task for task in setup_tasks if task.src.endswith('repo')]
|
||||
rhui_setup_repofiles = (
|
||||
- get_copy_location_from_copy_in_task(context, copy_task) for copy_task in rhui_setup_repofile_tasks
|
||||
+ get_copy_location_from_copy_in_task(context.base_dir, copy) for copy in rhui_setup_repofile_tasks
|
||||
)
|
||||
rhui_setup_repofiles = {context.full_path(repofile) for repofile in rhui_setup_repofiles}
|
||||
|
||||
- foreign_repofiles = all_repofiles - client_repofiles - rhui_setup_repofiles
|
||||
+ foreign_repofiles = all_repofiles - target_access_repofiles - rhui_setup_repofiles
|
||||
+
|
||||
+ api.current_logger().debug(
|
||||
+ 'The following repofiles are considered as unknown to'
|
||||
+ ' the target RHUI content setup and will be ignored: {0}'.format(' '.join(foreign_repofiles))
|
||||
+ )
|
||||
|
||||
# Rename non-client repofiles so they will not be recognized when running dnf repolist
|
||||
for foreign_repofile in foreign_repofiles:
|
||||
os.rename(foreign_repofile, '{0}.back'.format(foreign_repofile))
|
||||
|
||||
try:
|
||||
- dnf_cmd = ['dnf', 'repolist', '--releasever', target_ver, '-v']
|
||||
+ dnf_cmd = ['dnf', 'repolist', '--releasever', target_ver, '-v', '--enablerepo', '*']
|
||||
repolist_result = context.call(dnf_cmd)['stdout']
|
||||
repoid_lines = [line for line in repolist_result.split('\n') if line.startswith('Repo-id')]
|
||||
rhui_repoids = {extract_repoid_from_line(line) for line in repoid_lines}
|
||||
@@ -919,6 +931,9 @@ def _get_rh_available_repoids(context, indata):
|
||||
for foreign_repofile in foreign_repofiles:
|
||||
os.rename('{0}.back'.format(foreign_repofile), foreign_repofile)
|
||||
|
||||
+ api.current_logger().debug(
|
||||
+ 'The following repofiles are considered as provided by RedHat: {0}'.format(' '.join(rh_repoids))
|
||||
+ )
|
||||
return rh_repoids
|
||||
|
||||
|
||||
@@ -1086,7 +1101,7 @@ def _get_target_userspace():
|
||||
return constants.TARGET_USERSPACE.format(get_target_major_version())
|
||||
|
||||
|
||||
-def _create_target_userspace(context, packages, files, target_repoids):
|
||||
+def _create_target_userspace(context, indata, packages, files, target_repoids):
|
||||
"""Create the target userspace."""
|
||||
target_path = _get_target_userspace()
|
||||
prepare_target_userspace(context, target_path, target_repoids, list(packages))
|
||||
@@ -1096,12 +1111,57 @@ def _create_target_userspace(context, packages, files, target_repoids):
|
||||
_copy_files(target_context, files)
|
||||
dnfplugin.install(_get_target_userspace())
|
||||
|
||||
+ # If we used only repofiles from leapp-rhui-<provider> then remove these as they provide
|
||||
+ # duplicit definitions as the target clients already installed in the target container
|
||||
+ if indata.rhui_info:
|
||||
+ api.current_logger().debug(
|
||||
+ 'Target container should have access to content. '
|
||||
+ 'Removing repofiles from leapp-rhui-<provider> from the target..'
|
||||
+ )
|
||||
+ setup_info = indata.rhui_info.target_client_setup_info
|
||||
+ if not setup_info.bootstrap_target_client:
|
||||
+ target_userspace_path = _get_target_userspace()
|
||||
+ for copy in setup_info.preinstall_tasks.files_to_copy_into_overlay:
|
||||
+ dst_in_container = get_copy_location_from_copy_in_task(target_userspace_path, copy)
|
||||
+ dst_in_container = dst_in_container.strip('/')
|
||||
+ dst_in_host = os.path.join(target_userspace_path, dst_in_container)
|
||||
+ if os.path.isfile(dst_in_host) and dst_in_host.endswith('.repo'):
|
||||
+ api.current_logger().debug('Removing repofile: {0}'.format(dst_in_host))
|
||||
+ os.remove(dst_in_host)
|
||||
+
|
||||
# and do not forget to set the rhsm into the container mode again
|
||||
with mounting.NspawnActions(_get_target_userspace()) as target_context:
|
||||
rhsm.set_container_mode(target_context)
|
||||
|
||||
|
||||
-def install_target_rhui_client_if_needed(context, indata):
|
||||
+def _apply_rhui_access_preinstall_tasks(context, rhui_setup_info):
|
||||
+ if rhui_setup_info.preinstall_tasks:
|
||||
+ api.current_logger().debug('Applying RHUI preinstall tasks.')
|
||||
+ preinstall_tasks = rhui_setup_info.preinstall_tasks
|
||||
+
|
||||
+ for file_to_remove in preinstall_tasks.files_to_remove:
|
||||
+ api.current_logger().debug('Removing {0} from the scratch container.'.format(file_to_remove))
|
||||
+ context.remove(file_to_remove)
|
||||
+
|
||||
+ for copy_info in preinstall_tasks.files_to_copy_into_overlay:
|
||||
+ api.current_logger().debug(
|
||||
+ 'Copying {0} in {1} into the scratch container.'.format(copy_info.src, copy_info.dst)
|
||||
+ )
|
||||
+ context.makedirs(os.path.dirname(copy_info.dst), exists_ok=True)
|
||||
+ context.copy_to(copy_info.src, copy_info.dst)
|
||||
+
|
||||
+
|
||||
+def _apply_rhui_access_postinstall_tasks(context, rhui_setup_info):
|
||||
+ if rhui_setup_info.postinstall_tasks:
|
||||
+ api.current_logger().debug('Applying RHUI postinstall tasks.')
|
||||
+ for copy_info in rhui_setup_info.postinstall_tasks.files_to_copy:
|
||||
+ context.makedirs(os.path.dirname(copy_info.dst), exists_ok=True)
|
||||
+ debug_msg = 'Copying {0} to {1} (inside the scratch container).'
|
||||
+ api.current_logger().debug(debug_msg.format(copy_info.src, copy_info.dst))
|
||||
+ context.call(['cp', copy_info.src, copy_info.dst])
|
||||
+
|
||||
+
|
||||
+def setup_target_rhui_access_if_needed(context, indata):
|
||||
if not indata.rhui_info:
|
||||
return
|
||||
|
||||
@@ -1110,15 +1170,14 @@ def install_target_rhui_client_if_needed(context, indata):
|
||||
_create_target_userspace_directories(userspace_dir)
|
||||
|
||||
setup_info = indata.rhui_info.target_client_setup_info
|
||||
- if setup_info.preinstall_tasks:
|
||||
- preinstall_tasks = setup_info.preinstall_tasks
|
||||
+ _apply_rhui_access_preinstall_tasks(context, setup_info)
|
||||
|
||||
- for file_to_remove in preinstall_tasks.files_to_remove:
|
||||
- context.remove(file_to_remove)
|
||||
-
|
||||
- for copy_info in preinstall_tasks.files_to_copy_into_overlay:
|
||||
- context.makedirs(os.path.dirname(copy_info.dst), exists_ok=True)
|
||||
- context.copy_to(copy_info.src, copy_info.dst)
|
||||
+ if not setup_info.bootstrap_target_client:
|
||||
+ # Installation of the target RHUI client is not possible and we bundle all necessary
|
||||
+ # files into the leapp-rhui-<provider> packages.
|
||||
+ api.current_logger().debug('Bootstrapping target RHUI client is disabled, leapp will rely '
|
||||
+ 'only on files budled in leapp-rhui-<provider> package.')
|
||||
+ return
|
||||
|
||||
cmd = ['dnf', '-y']
|
||||
|
||||
@@ -1149,16 +1208,13 @@ def install_target_rhui_client_if_needed(context, indata):
|
||||
|
||||
context.call(cmd, callback_raw=utils.logging_handler, stdin='\n'.join(dnf_transaction_steps))
|
||||
|
||||
- if setup_info.postinstall_tasks:
|
||||
- for copy_info in setup_info.postinstall_tasks.files_to_copy:
|
||||
- context.makedirs(os.path.dirname(copy_info.dst), exists_ok=True)
|
||||
- context.call(['cp', copy_info.src, copy_info.dst])
|
||||
+ _apply_rhui_access_postinstall_tasks(context, setup_info)
|
||||
|
||||
# Do a cleanup so there are not duplicit repoids
|
||||
files_owned_by_clients = _query_rpm_for_pkg_files(context, indata.rhui_info.target_client_pkg_names)
|
||||
|
||||
for copy_task in setup_info.preinstall_tasks.files_to_copy_into_overlay:
|
||||
- dest = get_copy_location_from_copy_in_task(context, copy_task)
|
||||
+ dest = get_copy_location_from_copy_in_task(context.base_dir, copy_task)
|
||||
can_be_cleaned_up = copy_task.src not in setup_info.files_supporting_client_operation
|
||||
if dest not in files_owned_by_clients and can_be_cleaned_up:
|
||||
context.remove(dest)
|
||||
@@ -1184,10 +1240,10 @@ def perform():
|
||||
target_iso = next(api.consume(TargetOSInstallationImage), None)
|
||||
with mounting.mount_upgrade_iso_to_root_dir(overlay.target, target_iso):
|
||||
|
||||
- install_target_rhui_client_if_needed(context, indata)
|
||||
+ setup_target_rhui_access_if_needed(context, indata)
|
||||
|
||||
target_repoids = _gather_target_repositories(context, indata, prod_cert_path)
|
||||
- _create_target_userspace(context, indata.packages, indata.files, target_repoids)
|
||||
+ _create_target_userspace(context, indata, indata.packages, indata.files, target_repoids)
|
||||
# TODO: this is tmp solution as proper one needs significant refactoring
|
||||
target_repo_facts = repofileutils.get_parsed_repofiles(context)
|
||||
api.produce(TMPTargetRepositoriesFacts(repositories=target_repo_facts))
|
||||
diff --git a/repos/system_upgrade/common/models/rhuiinfo.py b/repos/system_upgrade/common/models/rhuiinfo.py
|
||||
index 3eaa4826..0a2e45af 100644
|
||||
--- a/repos/system_upgrade/common/models/rhuiinfo.py
|
||||
+++ b/repos/system_upgrade/common/models/rhuiinfo.py
|
||||
@@ -36,6 +36,13 @@ class TargetRHUISetupInfo(Model):
|
||||
files_supporting_client_operation = fields.List(fields.String(), default=[])
|
||||
"""A subset of files copied in preinstall tasks that should not be cleaned up."""
|
||||
|
||||
+ bootstrap_target_client = fields.Boolean(default=True)
|
||||
+ """
|
||||
+ Swap the current RHUI client for the target one to facilitate access to the target content.
|
||||
+
|
||||
+ When False, only files from the leapp-rhui-<provider> will be used to access target content.
|
||||
+ """
|
||||
+
|
||||
|
||||
class RHUIInfo(Model):
|
||||
"""
|
||||
--
|
||||
2.42.0
|
||||
|
830
0002-Packit-Drop-tests-for-obsoleted-upgrade-paths-restru.patch
Normal file
830
0002-Packit-Drop-tests-for-obsoleted-upgrade-paths-restru.patch
Normal file
@ -0,0 +1,830 @@
|
||||
From b875ae256cc61336c76ea83f5e40eb7895cab0fc Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 9 Feb 2024 13:00:16 +0100
|
||||
Subject: [PATCH 02/34] Packit: Drop tests for obsoleted upgrade paths +
|
||||
restructuralization
|
||||
|
||||
Dropping upgrade paths related to following releases: 8.6, 8.9, 9.0,
|
||||
9.3. See the previous commit for more info.
|
||||
|
||||
During the drop of these release, I've realized the current structure
|
||||
of tests is not suitable for such operations as current test/job
|
||||
definitions has been chained. So e.g. tests for 8.10 -> 9.4 depended
|
||||
on 8.9 -> 9.3, which depended on 8.8 -> 8.6, etc... Even going deeper,
|
||||
IPU 8->9 definitions have been based on 7 -> 8 definitions.
|
||||
|
||||
So I updated the structure, separating tests for IPU 7 -> 8 and 8 -> 9
|
||||
and also deps between all upgrade paths. Now, particular tests
|
||||
can inherit one of *abstract* jobs definitions, so dropping or removing
|
||||
tests for an upgrade path does not affect other tests.
|
||||
|
||||
Also fixed some incorrect definitions in tests, like a fixed label
|
||||
for `beaker-minimal-88to92` (orig "8.6to9.2").
|
||||
|
||||
Update welcome-PR bot msg to reflect changes in upgrade paths.
|
||||
|
||||
Jira: OAMG-10451
|
||||
---
|
||||
.github/workflows/pr-welcome-msg.yml | 11 +-
|
||||
.packit.yaml | 530 ++++++++++-----------------
|
||||
2 files changed, 191 insertions(+), 350 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/pr-welcome-msg.yml b/.github/workflows/pr-welcome-msg.yml
|
||||
index e791340e..e23c9bbb 100644
|
||||
--- a/.github/workflows/pr-welcome-msg.yml
|
||||
+++ b/.github/workflows/pr-welcome-msg.yml
|
||||
@@ -24,18 +24,15 @@ jobs:
|
||||
- **review please @oamg/developers** to notify leapp developers of the review request
|
||||
- **/packit copr-build** to submit a public copr build using packit
|
||||
|
||||
- Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build. If you need a different version of leapp from PR#42, use `/packit test oamg/leapp#42`
|
||||
+ Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build. If you need a different version of leapp, e.g. from PR#42, use `/packit test oamg/leapp#42`
|
||||
+ Note that first time contributors cannot run tests automatically - they will be started by a reviewer.
|
||||
|
||||
It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported, `beaker-minimal` and `kernel-rt`, both can be used to be run on all upgrade paths or just a couple of specific ones.
|
||||
To launch on-demand tests with packit:
|
||||
- **/packit test --labels kernel-rt** to schedule `kernel-rt` tests set for all upgrade paths
|
||||
- - **/packit test --labels beaker-minimal-8.9to9.3,kernel-rt-8.9to9.3** to schedule `kernel-rt` and `beaker-minimal` test sets for 8.9->9.3 upgrade path
|
||||
+ - **/packit test --labels beaker-minimal-8.10to9.4,kernel-rt-8.10to9.4** to schedule `kernel-rt` and `beaker-minimal` test sets for 8.10->9.4 upgrade path
|
||||
|
||||
- [Deprecated] To launch on-demand regression testing public members of oamg organization can leave the following comment:
|
||||
- - **/rerun** to schedule basic regression tests using this pr build and latest upstream leapp build as artifacts
|
||||
- - **/rerun 42** to schedule basic regression tests using this pr build and leapp\*PR42\* as artifacts
|
||||
- - **/rerun-sst** to schedule sst tests using this pr build and latest upstream leapp build as artifacts
|
||||
- - **/rerun-sst 42** to schedule sst tests using this pr build and leapp\*PR42\* as artifacts
|
||||
+ See other labels for particular jobs defined in the `.packit.yaml` file.
|
||||
|
||||
Please [open ticket](https://url.corp.redhat.com/oamg-ci-issue) in case you experience technical problem with the CI. (RH internal only)
|
||||
|
||||
diff --git a/.packit.yaml b/.packit.yaml
|
||||
index 491b1450..bce97bad 100644
|
||||
--- a/.packit.yaml
|
||||
+++ b/.packit.yaml
|
||||
@@ -85,18 +85,31 @@ jobs:
|
||||
# builds from master branch should start with 100 release, to have high priority
|
||||
- bash -c "sed -i \"s/1%{?dist}/100%{?dist}/g\" packaging/leapp-repository.spec"
|
||||
|
||||
-- &sanity-79to86
|
||||
+
|
||||
+# NOTE: to see what envars, targets, .. can be set in tests, see
|
||||
+# the configuration of tests here:
|
||||
+# https://gitlab.cee.redhat.com/oamg/leapp-tests/-/blob/main/config.yaml
|
||||
+# Available only to RH Employees.
|
||||
+
|
||||
+# ###################################################################### #
|
||||
+# ############################### 7 TO 8 ############################### #
|
||||
+# ###################################################################### #
|
||||
+
|
||||
+# ###################################################################### #
|
||||
+# ### Abstract job definitions to make individual tests/jobs smaller ### #
|
||||
+# ###################################################################### #
|
||||
+- &sanity-abstract-7to8
|
||||
job: tests
|
||||
+ trigger: ignore
|
||||
fmf_url: "https://gitlab.cee.redhat.com/oamg/leapp-tests"
|
||||
fmf_ref: "main"
|
||||
use_internal_tf: True
|
||||
- trigger: pull_request
|
||||
labels:
|
||||
- sanity
|
||||
targets:
|
||||
epel-7-x86_64:
|
||||
distros: [RHEL-7.9-ZStream]
|
||||
- identifier: sanity-7.9to8.6
|
||||
+ identifier: sanity-abstract-7to8
|
||||
tmt_plan: ""
|
||||
tf_extra_params:
|
||||
test:
|
||||
@@ -110,20 +123,16 @@ jobs:
|
||||
provisioning:
|
||||
tags:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.6"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-- &sanity-79to86-aws
|
||||
- <<: *sanity-79to86
|
||||
+- &sanity-abstract-7to8-aws
|
||||
+ <<: *sanity-abstract-7to8
|
||||
labels:
|
||||
- sanity
|
||||
- aws
|
||||
targets:
|
||||
epel-7-x86_64:
|
||||
distros: [RHEL-7.9-rhui]
|
||||
- identifier: sanity-7.9to8.6-aws
|
||||
+ identifier: sanity-abstract-7to8-aws
|
||||
# NOTE(ivasilev) Unfortunately to use yaml templates we need to rewrite the whole tf_extra_params dict
|
||||
# to use plan_filter (can't just specify one section test.tmt.plan_filter, need to specify environments.* as well)
|
||||
tf_extra_params:
|
||||
@@ -139,57 +148,14 @@ jobs:
|
||||
post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; yum-config-manager --enable rhel-7-server-rhui-optional-rpms"
|
||||
tags:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.6"
|
||||
- RHUI: "aws"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_NO_RHSM: "1"
|
||||
- USE_CUSTOM_REPOS: rhui
|
||||
-
|
||||
-- &sanity-79to88-aws
|
||||
- <<: *sanity-79to86-aws
|
||||
- identifier: sanity-7.9to8.8-aws
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.8"
|
||||
- RHUI: "aws"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_NO_RHSM: "1"
|
||||
- USE_CUSTOM_REPOS: rhui
|
||||
-
|
||||
-- &sanity-79to89-aws
|
||||
- <<: *sanity-79to86-aws
|
||||
- identifier: sanity-7.9to8.9-aws
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.9"
|
||||
- RHUI: "aws"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_NO_RHSM: "1"
|
||||
- USE_CUSTOM_REPOS: rhui
|
||||
-
|
||||
-# NOTE(mkluson) RHEL 8.10 content is not publicly available (via RHUI)
|
||||
-#- &sanity-79to810-aws
|
||||
-# <<: *sanity-79to86-aws
|
||||
-# identifier: sanity-7.9to8.10-aws
|
||||
-# env:
|
||||
-# SOURCE_RELEASE: "7.9"
|
||||
-# TARGET_RELEASE: "8.10"
|
||||
-# RHUI: "aws"
|
||||
-# LEAPPDATA_BRANCH: "upstream"
|
||||
-# LEAPP_NO_RHSM: "1"
|
||||
-# USE_CUSTOM_REPOS: rhui
|
||||
|
||||
# On-demand minimal beaker tests
|
||||
-- &beaker-minimal-79to86
|
||||
- <<: *sanity-79to86
|
||||
+- &beaker-minimal-7to8-abstract-ondemand
|
||||
+ <<: *sanity-abstract-7to8
|
||||
manual_trigger: True
|
||||
labels:
|
||||
- beaker-minimal
|
||||
- - beaker-minimal-7.9to8.6
|
||||
- - 7.9to8.6
|
||||
- identifier: sanity-7.9to8.6-beaker-minimal
|
||||
+ identifier: beaker-minimal-7to8-abstract-ondemand
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
@@ -204,13 +170,11 @@ jobs:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
|
||||
# On-demand kernel-rt tests
|
||||
-- &kernel-rt-79to86
|
||||
- <<: *beaker-minimal-79to86
|
||||
+- &kernel-rt-abstract-7to8-ondemand
|
||||
+ <<: *beaker-minimal-7to8-abstract-ondemand
|
||||
labels:
|
||||
- kernel-rt
|
||||
- - kernel-rt-7.9to8.6
|
||||
- - 7.9to8.6
|
||||
- identifier: sanity-7.9to8.6-kernel-rt
|
||||
+ identifier: sanity-7to8-kernel-rt-abstract-ondemand
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
@@ -224,114 +188,133 @@ jobs:
|
||||
tags:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
|
||||
+
|
||||
+# ###################################################################### #
|
||||
+# ######################### Individual tests ########################### #
|
||||
+# ###################################################################### #
|
||||
+
|
||||
+# Tests: 7.9 -> 8.8
|
||||
+- &sanity-79to88-aws
|
||||
+ <<: *sanity-abstract-7to8-aws
|
||||
+ trigger: pull_request
|
||||
+ identifier: sanity-7.9to8.8-aws
|
||||
+ env:
|
||||
+ SOURCE_RELEASE: "7.9"
|
||||
+ TARGET_RELEASE: "8.8"
|
||||
+ RHUI: "aws"
|
||||
+ LEAPPDATA_BRANCH: "upstream"
|
||||
+ LEAPP_NO_RHSM: "1"
|
||||
+ USE_CUSTOM_REPOS: rhui
|
||||
+
|
||||
- &sanity-79to88
|
||||
- <<: *sanity-79to86
|
||||
+ <<: *sanity-abstract-7to8
|
||||
+ trigger: pull_request
|
||||
identifier: sanity-7.9to8.8
|
||||
env:
|
||||
SOURCE_RELEASE: "7.9"
|
||||
TARGET_RELEASE: "8.8"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-# On-demand minimal beaker tests
|
||||
- &beaker-minimal-79to88
|
||||
- <<: *beaker-minimal-79to86
|
||||
+ <<: *beaker-minimal-7to8-abstract-ondemand
|
||||
+ trigger: pull_request
|
||||
labels:
|
||||
- beaker-minimal
|
||||
- beaker-minimal-7.9to8.8
|
||||
- 7.9to8.8
|
||||
- identifier: sanity-7.9to8.8-beaker-minimal
|
||||
+ identifier: sanity-7.9to8.8-beaker-minimal-ondemand
|
||||
env:
|
||||
SOURCE_RELEASE: "7.9"
|
||||
TARGET_RELEASE: "8.8"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-# On-demand kernel-rt tests
|
||||
- &kernel-rt-79to88
|
||||
- <<: *kernel-rt-79to86
|
||||
+ <<: *kernel-rt-abstract-7to8-ondemand
|
||||
+ trigger: pull_request
|
||||
labels:
|
||||
- kernel-rt
|
||||
- kernel-rt-7.9to8.8
|
||||
- 7.9to8.8
|
||||
- identifier: sanity-7.9to8.8-kernel-rt
|
||||
+ identifier: sanity-7.9to8.8-kernel-rt-ondemand
|
||||
env:
|
||||
SOURCE_RELEASE: "7.9"
|
||||
TARGET_RELEASE: "8.8"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-- &sanity-79to89
|
||||
- <<: *sanity-79to86
|
||||
- identifier: sanity-7.9to8.9
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.9"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
-
|
||||
-# On-demand minimal beaker tests
|
||||
-- &beaker-minimal-79to89
|
||||
- <<: *beaker-minimal-79to86
|
||||
- labels:
|
||||
- - beaker-minimal
|
||||
- - beaker-minimal-7.9to8.9
|
||||
- - 7.9to8.9
|
||||
- identifier: sanity-7.9to8.9-beaker-minimal
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.9"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
-
|
||||
-# On-demand kernel-rt tests
|
||||
-- &kernel-rt-79to89
|
||||
- <<: *kernel-rt-79to88
|
||||
- labels:
|
||||
- - kernel-rt
|
||||
- - kernel-rt-7.9to8.9
|
||||
- - 7.9to8.9
|
||||
- identifier: sanity-7.9to8.9-kernel-rt
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.9"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
-
|
||||
+# Tests: 7.9 -> 8.10
|
||||
- &sanity-79to810
|
||||
- <<: *sanity-79to86
|
||||
+ <<: *sanity-abstract-7to8
|
||||
+ trigger: pull_request
|
||||
identifier: sanity-7.9to8.10
|
||||
env:
|
||||
SOURCE_RELEASE: "7.9"
|
||||
TARGET_RELEASE: "8.10"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-# On-demand minimal beaker tests
|
||||
+# NOTE(mkluson) RHEL 8.10 content is not publicly available (via RHUI)
|
||||
+#- &sanity-79to810-aws
|
||||
+# <<: *sanity-abstract-7to8-aws
|
||||
+# trigger: pull_request
|
||||
+# identifier: sanity-7.9to8.10-aws
|
||||
+# env:
|
||||
+# SOURCE_RELEASE: "7.9"
|
||||
+# TARGET_RELEASE: "8.10"
|
||||
+# RHUI: "aws"
|
||||
+# LEAPPDATA_BRANCH: "upstream"
|
||||
+# LEAPP_NO_RHSM: "1"
|
||||
+# USE_CUSTOM_REPOS: rhui
|
||||
+
|
||||
- &beaker-minimal-79to810
|
||||
- <<: *beaker-minimal-79to86
|
||||
+ <<: *beaker-minimal-7to8-abstract-ondemand
|
||||
+ trigger: pull_request
|
||||
labels:
|
||||
- beaker-minimal
|
||||
- beaker-minimal-7.9to8.10
|
||||
- 7.9to8.10
|
||||
- identifier: sanity-7.9to8.10-beaker-minimal
|
||||
+ identifier: sanity-7.9to8.10-beaker-minimal-ondemand
|
||||
env:
|
||||
SOURCE_RELEASE: "7.9"
|
||||
TARGET_RELEASE: "8.10"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-# On-demand kernel-rt tests
|
||||
- &kernel-rt-79to810
|
||||
- <<: *kernel-rt-79to88
|
||||
+ <<: *kernel-rt-abstract-7to8-ondemand
|
||||
+ trigger: pull_request
|
||||
labels:
|
||||
- kernel-rt
|
||||
- kernel-rt-7.9to8.10
|
||||
- 7.9to8.10
|
||||
- identifier: sanity-7.9to8.10-kernel-rt
|
||||
+ identifier: sanity-7.9to8.10-kernel-rt-ondemand
|
||||
env:
|
||||
SOURCE_RELEASE: "7.9"
|
||||
TARGET_RELEASE: "8.10"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-- &sanity-86to90
|
||||
- <<: *sanity-79to86
|
||||
+
|
||||
+# ###################################################################### #
|
||||
+# ############################## 8 TO 10 ############################### #
|
||||
+# ###################################################################### #
|
||||
+
|
||||
+# ###################################################################### #
|
||||
+# ### Abstract job definitions to make individual tests/jobs smaller ### #
|
||||
+# ###################################################################### #
|
||||
+
|
||||
+#NOTE(pstodulk) putting default values in abstract jobs as from 8.10, as this
|
||||
+# is the last RHEL 8 release and all new future tests will start from this
|
||||
+# one release.
|
||||
+
|
||||
+- &sanity-abstract-8to9
|
||||
+ job: tests
|
||||
+ trigger: ignore
|
||||
+ fmf_url: "https://gitlab.cee.redhat.com/oamg/leapp-tests"
|
||||
+ fmf_ref: "main"
|
||||
+ use_internal_tf: True
|
||||
+ labels:
|
||||
+ - sanity
|
||||
targets:
|
||||
epel-8-x86_64:
|
||||
- distros: [RHEL-8.6.0-Nightly]
|
||||
- identifier: sanity-8.6to9.0
|
||||
+ distros: [RHEL-8.10.0-Nightly]
|
||||
+ identifier: sanity-abstract-8to9
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
@@ -339,28 +322,44 @@ jobs:
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
- distro: "rhel-8.6"
|
||||
+ distro: "rhel-8.10"
|
||||
settings:
|
||||
provisioning:
|
||||
tags:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "8.6"
|
||||
- TARGET_RELEASE: "9.0"
|
||||
- RHSM_REPOS_EUS: "eus"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-# On-demand minimal beaker tests
|
||||
-- &beaker-minimal-86to90
|
||||
- <<: *beaker-minimal-79to86
|
||||
+- &sanity-abstract-8to9-aws
|
||||
+ <<: *sanity-abstract-8to9
|
||||
+ labels:
|
||||
+ - sanity
|
||||
+ - aws
|
||||
+ targets:
|
||||
+ epel-8-x86_64:
|
||||
+ distros: [RHEL-8.10-rhui]
|
||||
+ identifier: sanity-abstract-8to9-aws
|
||||
+ tf_extra_params:
|
||||
+ test:
|
||||
+ tmt:
|
||||
+ plan_filter: 'tag:upgrade_happy_path & enabled:true'
|
||||
+ environments:
|
||||
+ - tmt:
|
||||
+ context:
|
||||
+ distro: "rhel-8.10"
|
||||
+ settings:
|
||||
+ provisioning:
|
||||
+ post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
|
||||
+ tags:
|
||||
+ BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
+
|
||||
+- &beaker-minimal-8to9-abstract-ondemand
|
||||
+ <<: *sanity-abstract-8to9
|
||||
+ manual_trigger: True
|
||||
labels:
|
||||
- beaker-minimal
|
||||
- - beaker-minimal-8.6to9.0
|
||||
- - 8.6to9.0
|
||||
targets:
|
||||
epel-8-x86_64:
|
||||
- distros: [RHEL-8.6.0-Nightly]
|
||||
- identifier: sanity-8.6to9.0-beaker-minimal
|
||||
+ distros: [RHEL-8.10.0-Nightly]
|
||||
+ identifier: beaker-minimal-8to9-abstract-ondemand
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
@@ -368,25 +367,17 @@ jobs:
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
- distro: "rhel-8.6"
|
||||
+ distro: "rhel-8.10"
|
||||
settings:
|
||||
provisioning:
|
||||
tags:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "8.6"
|
||||
- TARGET_RELEASE: "9.0"
|
||||
- RHSM_REPOS_EUS: "eus"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
|
||||
-# On-demand kernel-rt tests
|
||||
-- &kernel-rt-86to90
|
||||
- <<: *beaker-minimal-86to90
|
||||
+- &kernel-rt-abstract-8to9-ondemand
|
||||
+ <<: *beaker-minimal-8to9-abstract-ondemand
|
||||
labels:
|
||||
- kernel-rt
|
||||
- - kernel-rt-8.6to9.0
|
||||
- - 8.6to9.0
|
||||
- identifier: sanity-8.6to9.0-kernel-rt
|
||||
+ identifier: sanity-8to9-kernel-rt-abstract-ondemand
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
@@ -394,14 +385,21 @@ jobs:
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
- distro: "rhel-8.6"
|
||||
+ distro: "rhel-8.10"
|
||||
settings:
|
||||
provisioning:
|
||||
tags:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
|
||||
+
|
||||
+# ###################################################################### #
|
||||
+# ######################### Individual tests ########################### #
|
||||
+# ###################################################################### #
|
||||
+
|
||||
+# Tests: 8.8 -> 9.2
|
||||
- &sanity-88to92
|
||||
- <<: *sanity-86to90
|
||||
+ <<: *sanity-abstract-8to9
|
||||
+ trigger: pull_request
|
||||
targets:
|
||||
epel-8-x86_64:
|
||||
distros: [RHEL-8.8.0-Nightly]
|
||||
@@ -425,21 +423,18 @@ jobs:
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
LEAPP_DEVEL_TARGET_RELEASE: "9.2"
|
||||
|
||||
-# On-demand minimal beaker tests
|
||||
-- &beaker-minimal-88to92
|
||||
- <<: *beaker-minimal-86to90
|
||||
- labels:
|
||||
- - beaker-minimal
|
||||
- - beaker-minimal-8.8to9.2
|
||||
- - 8.6to9.2
|
||||
+- &sanity-88to92-aws
|
||||
+ <<: *sanity-abstract-8to9-aws
|
||||
+ trigger: pull_request
|
||||
targets:
|
||||
epel-8-x86_64:
|
||||
- distros: [RHEL-8.8.0-Nightly]
|
||||
- identifier: sanity-8.8to9.2-beaker-minimal
|
||||
+ distros: [RHEL-8.8-rhui]
|
||||
+ identifier: sanity-8.8to9.2-aws
|
||||
+ # NOTE(mkluson) Unfortunately to use yaml templates we need to rewrite the whole tf_extra_params dict
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
- plan_filter: 'tag:partitioning & tag:8to9 & enabled:true'
|
||||
+ plan_filter: 'tag:upgrade_happy_path & enabled:true'
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
@@ -452,122 +447,77 @@ jobs:
|
||||
env:
|
||||
SOURCE_RELEASE: "8.8"
|
||||
TARGET_RELEASE: "9.2"
|
||||
+ RHSM_REPOS: "rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms"
|
||||
+ RHUI: "aws"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_DEVEL_TARGET_RELEASE: "9.2"
|
||||
+ LEAPP_NO_RHSM: "1"
|
||||
+ USE_CUSTOM_REPOS: rhui
|
||||
|
||||
-# On-demand kernel-rt tests
|
||||
-- &kernel-rt-88to92
|
||||
- <<: *beaker-minimal-88to92
|
||||
+- &beaker-minimal-88to92
|
||||
+ <<: *beaker-minimal-8to9-abstract-ondemand
|
||||
+ trigger: pull_request
|
||||
labels:
|
||||
- - kernel-rt
|
||||
- - kernel-rt-8.8to9.2
|
||||
+ - beaker-minimal
|
||||
+ - beaker-minimal-8.8to9.2
|
||||
- 8.8to9.2
|
||||
- identifier: sanity-8.8to9.2-kernel-rt
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:kernel-rt & tag:8to9 & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-8.8"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
-
|
||||
-- &sanity-89to93
|
||||
- <<: *sanity-88to92
|
||||
targets:
|
||||
epel-8-x86_64:
|
||||
- distros: [RHEL-8.9.0-Nightly]
|
||||
- identifier: sanity-8.9to9.3
|
||||
+ distros: [RHEL-8.8.0-Nightly]
|
||||
+ identifier: sanity-8.8to9.2-beaker-minimal-ondemand
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
- plan_filter: 'tag:sanity & tag:8to9 & enabled:true'
|
||||
+ plan_filter: 'tag:partitioning & tag:8to9 & enabled:true'
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
- distro: "rhel-8.9"
|
||||
+ distro: "rhel-8.8"
|
||||
settings:
|
||||
provisioning:
|
||||
+ post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
|
||||
tags:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
env:
|
||||
- SOURCE_RELEASE: "8.9"
|
||||
- TARGET_RELEASE: "9.3"
|
||||
+ SOURCE_RELEASE: "8.8"
|
||||
+ TARGET_RELEASE: "9.2"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_DEVEL_TARGET_RELEASE: "9.3"
|
||||
+ LEAPP_DEVEL_TARGET_RELEASE: "9.2"
|
||||
|
||||
-# On-demand minimal beaker tests
|
||||
-- &beaker-minimal-89to93
|
||||
- <<: *beaker-minimal-88to92
|
||||
+- &kernel-rt-88to92
|
||||
+ <<: *kernel-rt-abstract-8to9-ondemand
|
||||
+ trigger: pull_request
|
||||
labels:
|
||||
- - beaker-minimal
|
||||
- - beaker-minimal-8.9to9.3
|
||||
- - 8.9to9.3
|
||||
+ - kernel-rt
|
||||
+ - kernel-rt-8.8to9.2
|
||||
+ - 8.8to9.2
|
||||
+ identifier: sanity-8.8to9.2-kernel-rt-ondemand
|
||||
targets:
|
||||
epel-8-x86_64:
|
||||
- distros: [RHEL-8.9.0-Nightly]
|
||||
- identifier: sanity-8.9to9.3-beaker-minimal
|
||||
+ distros: [RHEL-8.8.0-Nightly]
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
- plan_filter: 'tag:partitioning & tag:8to9 & enabled:true'
|
||||
+ plan_filter: 'tag:kernel-rt & tag:8to9 & enabled:true'
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
- distro: "rhel-8.9"
|
||||
+ distro: "rhel-8.8"
|
||||
settings:
|
||||
provisioning:
|
||||
tags:
|
||||
BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
env:
|
||||
- SOURCE_RELEASE: "8.9"
|
||||
- TARGET_RELEASE: "9.3"
|
||||
+ SOURCE_RELEASE: "8.8"
|
||||
+ TARGET_RELEASE: "9.2"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_DEVEL_TARGET_RELEASE: "9.3"
|
||||
+ LEAPP_DEVEL_TARGET_RELEASE: "9.2"
|
||||
|
||||
-# On-demand kernel-rt tests
|
||||
-- &kernel-rt-89to93
|
||||
- <<: *beaker-minimal-89to93
|
||||
- labels:
|
||||
- - kernel-rt
|
||||
- - kernel-rt-8.9to9.3
|
||||
- - 8.9to9.3
|
||||
- identifier: sanity-8.9to9.3-kernel-rt
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:kernel-rt & tag:8to9 & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-8.9"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
|
||||
+# Tests: 8.10 -> 9.4
|
||||
- &sanity-810to94
|
||||
- <<: *sanity-88to92
|
||||
- targets:
|
||||
- epel-8-x86_64:
|
||||
- distros: [RHEL-8.10.0-Nightly]
|
||||
+ <<: *sanity-abstract-8to9
|
||||
+ trigger: pull_request
|
||||
identifier: sanity-8.10to9.4
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:sanity & tag:8to9 & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
env:
|
||||
SOURCE_RELEASE: "8.10"
|
||||
TARGET_RELEASE: "9.4"
|
||||
@@ -576,27 +526,13 @@ jobs:
|
||||
|
||||
# On-demand minimal beaker tests
|
||||
- &beaker-minimal-810to94
|
||||
- <<: *beaker-minimal-88to92
|
||||
+ <<: *beaker-minimal-8to9-abstract-ondemand
|
||||
+ trigger: pull_request
|
||||
labels:
|
||||
- beaker-minimal
|
||||
- beaker-minimal-8.10to9.4
|
||||
- 8.10to9.4
|
||||
- targets:
|
||||
- epel-8-x86_64:
|
||||
- distros: [RHEL-8.10.0-Nightly]
|
||||
- identifier: sanity-8.10to9.4-beaker-minimal
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:partitioning & tag:8to9 & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
+ identifier: sanity-8.10to9.4-beaker-minimal-ondemand
|
||||
env:
|
||||
SOURCE_RELEASE: "8.10"
|
||||
TARGET_RELEASE: "9.4"
|
||||
@@ -604,107 +540,15 @@ jobs:
|
||||
|
||||
# On-demand kernel-rt tests
|
||||
- &kernel-rt-810to94
|
||||
- <<: *beaker-minimal-810to94
|
||||
+ <<: *kernel-rt-abstract-8to9-ondemand
|
||||
+ trigger: pull_request
|
||||
labels:
|
||||
- kernel-rt
|
||||
- kernel-rt-8.10to9.4
|
||||
- 8.10to9.4
|
||||
- identifier: sanity-8.10to9.4-kernel-rt
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:kernel-rt & tag:8to9 & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
-
|
||||
-- &sanity-86to90-aws
|
||||
- <<: *sanity-79to86-aws
|
||||
- targets:
|
||||
- epel-8-x86_64:
|
||||
- distros: [RHEL-8.6-rhui]
|
||||
- identifier: sanity-8.6to9.0-aws
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:upgrade_happy_path & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-8.6"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "8.6"
|
||||
- TARGET_RELEASE: "9.0"
|
||||
- RHSM_REPOS: "rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms"
|
||||
- RHUI: "aws"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_NO_RHSM: "1"
|
||||
- USE_CUSTOM_REPOS: rhui
|
||||
-
|
||||
-- &sanity-88to92-aws
|
||||
- <<: *sanity-86to90-aws
|
||||
- targets:
|
||||
- epel-8-x86_64:
|
||||
- distros: [RHEL-8.8-rhui]
|
||||
- identifier: sanity-8.8to9.2-aws
|
||||
- # NOTE(mkluson) Unfortunately to use yaml templates we need to rewrite the whole tf_extra_params dict
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:upgrade_happy_path & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-8.8"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
+ identifier: sanity-8.10to9.4-kernel-rt-ondemand
|
||||
env:
|
||||
- SOURCE_RELEASE: "8.8"
|
||||
- TARGET_RELEASE: "9.2"
|
||||
- RHSM_REPOS: "rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms"
|
||||
- RHUI: "aws"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_NO_RHSM: "1"
|
||||
- USE_CUSTOM_REPOS: rhui
|
||||
-
|
||||
-- &sanity-89to93-aws
|
||||
- <<: *sanity-86to90-aws
|
||||
- targets:
|
||||
- epel-8-x86_64:
|
||||
- distros: [RHEL-8.9-rhui]
|
||||
- identifier: sanity-8.9to9.3-aws
|
||||
- # NOTE(mkluson) Unfortunately to use yaml templates we need to rewrite the whole tf_extra_params dict
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:upgrade_happy_path & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-8.9"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "8.9"
|
||||
- TARGET_RELEASE: "9.3"
|
||||
- RHSM_REPOS: "rhel-8-for-x86_64-appstream-rpms,rhel-8-for-x86_64-baseos-rpms"
|
||||
- RHUI: "aws"
|
||||
+ SOURCE_RELEASE: "8.10"
|
||||
+ TARGET_RELEASE: "9.4"
|
||||
+ RHSM_REPOS: "rhel-8-for-x86_64-appstream-beta-rpms,rhel-8-for-x86_64-baseos-beta-rpms"
|
||||
LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_NO_RHSM: "1"
|
||||
- USE_CUSTOM_REPOS: rhui
|
||||
--
|
||||
2.42.0
|
||||
|
25
0003-silence-use-yield-from-from-pylint-3.1.patch
Normal file
25
0003-silence-use-yield-from-from-pylint-3.1.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From db8a0cf5c66ced0ed49990a40a45a08373b34af5 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Fri, 1 Mar 2024 20:30:04 +0100
|
||||
Subject: [PATCH 03/34] silence use-yield-from from pylint 3.1
|
||||
|
||||
yield from cannot be used until we require python3.3 or greater
|
||||
---
|
||||
.pylintrc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/.pylintrc b/.pylintrc
|
||||
index 57259bcb..f78c1c3f 100644
|
||||
--- a/.pylintrc
|
||||
+++ b/.pylintrc
|
||||
@@ -57,6 +57,7 @@ disable=
|
||||
redundant-u-string-prefix, # still have py2 to support
|
||||
logging-format-interpolation,
|
||||
logging-not-lazy,
|
||||
+ use-yield-from, # yield from cannot be used until we require python 3.3 or greater
|
||||
too-many-lines # we do not want to take care about that one
|
||||
|
||||
[FORMAT]
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,23 @@
|
||||
From 214ed9b57c5e291cda5ff6baf7c7a790038fef34 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 11 Mar 2024 18:30:23 +0100
|
||||
Subject: [PATCH 04/34] rocescanner: Actually call process() in
|
||||
test_roce_notibmz test
|
||||
|
||||
---
|
||||
.../el8toel9/actors/rocescanner/tests/unit_test_rocescanner.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/rocescanner/tests/unit_test_rocescanner.py b/repos/system_upgrade/el8toel9/actors/rocescanner/tests/unit_test_rocescanner.py
|
||||
index a4889328..ee9e4498 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/rocescanner/tests/unit_test_rocescanner.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/rocescanner/tests/unit_test_rocescanner.py
|
||||
@@ -151,4 +151,5 @@ def test_roce_noibmz(monkeypatch, arch):
|
||||
monkeypatch.setattr(rocescanner.api, 'current_actor', CurrentActorMocked(arch=arch))
|
||||
monkeypatch.setattr(rocescanner.api.current_actor(), 'produce', mocked_produce)
|
||||
monkeypatch.setattr(rocescanner, 'get_roce_nics_lines', lambda: mocked_roce_lines)
|
||||
+ rocescanner.process()
|
||||
assert not mocked_produce.called
|
||||
--
|
||||
2.42.0
|
||||
|
624
0005-Fix-incorrect-parsing-of-lscpu-output.patch
Normal file
624
0005-Fix-incorrect-parsing-of-lscpu-output.patch
Normal file
@ -0,0 +1,624 @@
|
||||
From 050620eabe52a2184b40a7ac2818d927516d8b6d Mon Sep 17 00:00:00 2001
|
||||
From: David Kubek <dkubek@redhat.com>
|
||||
Date: Tue, 20 Feb 2024 20:54:16 +0100
|
||||
Subject: [PATCH 05/34] Fix incorrect parsing of `lscpu` output
|
||||
|
||||
Original solution expected always ``key: val`` pair on each line.
|
||||
However, it has not been expected that val could be actually empty
|
||||
string, which would lead to situation where the following line is
|
||||
interpreted as a value.
|
||||
|
||||
The new solution updates the parsing for output on RHEL 7, but also
|
||||
calls newly ``lscpu -J`` on RHEL 8+ to obtain data in the JSON format,
|
||||
which drops all possible parsing problems from our side.
|
||||
|
||||
Fixes #1182
|
||||
---
|
||||
.github/workflows/codespell.yml | 2 +-
|
||||
.../actors/scancpu/libraries/scancpu.py | 39 +++++----
|
||||
.../actors/scancpu/tests/files/json/invalid | 2 +
|
||||
.../scancpu/tests/files/json/lscpu_aarch64 | 29 +++++++
|
||||
.../scancpu/tests/files/json/lscpu_ppc64le | 19 +++++
|
||||
.../scancpu/tests/files/json/lscpu_s390x | 30 +++++++
|
||||
.../scancpu/tests/files/json/lscpu_x86_64 | 31 +++++++
|
||||
.../actors/scancpu/tests/files/lscpu_aarch64 | 26 ------
|
||||
.../actors/scancpu/tests/files/lscpu_ppc64le | 24 ------
|
||||
.../actors/scancpu/tests/files/lscpu_s390x | 38 ---------
|
||||
.../scancpu/tests/files/txt/lscpu_aarch64 | 25 ++++++
|
||||
.../scancpu/tests/files/txt/lscpu_empty_field | 4 +
|
||||
.../scancpu/tests/files/txt/lscpu_ppc64le | 15 ++++
|
||||
.../scancpu/tests/files/txt/lscpu_s390x | 26 ++++++
|
||||
.../tests/files/{ => txt}/lscpu_x86_64 | 0
|
||||
.../actors/scancpu/tests/test_scancpu.py | 82 ++++++++++++++++---
|
||||
16 files changed, 279 insertions(+), 113 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/json/invalid
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_aarch64
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_ppc64le
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_s390x
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_x86_64
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_aarch64
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_ppc64le
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_s390x
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_aarch64
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_empty_field
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_ppc64le
|
||||
create mode 100644 repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_s390x
|
||||
rename repos/system_upgrade/common/actors/scancpu/tests/files/{ => txt}/lscpu_x86_64 (100%)
|
||||
|
||||
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
|
||||
index 24add3fb..4921bc90 100644
|
||||
--- a/.github/workflows/codespell.yml
|
||||
+++ b/.github/workflows/codespell.yml
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
./repos/system_upgrade/el8toel9/actors/xorgdrvfact/tests/files/journalctl-xorg-intel,\
|
||||
./repos/system_upgrade/el8toel9/actors/xorgdrvfact/tests/files/journalctl-xorg-qxl,\
|
||||
./repos/system_upgrade/el8toel9/actors/xorgdrvfact/tests/files/journalctl-xorg-without-qxl,\
|
||||
- ./repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_s390x,\
|
||||
+ ./repos/system_upgrade/common/actors/scancpu/tests/files,\
|
||||
./etc/leapp/files/device_driver_deprecation_data.json,\
|
||||
./etc/leapp/files/pes-events.json,\
|
||||
./etc/leapp/files/repomap.json,\
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py b/repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py
|
||||
index 9de50fae..7451066a 100644
|
||||
--- a/repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py
|
||||
@@ -1,22 +1,41 @@
|
||||
+import json
|
||||
import re
|
||||
|
||||
from leapp.libraries.common.config import architecture
|
||||
+from leapp.libraries.common.config.version import get_source_major_version
|
||||
from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
from leapp.models import CPUInfo, DetectedDeviceOrDriver, DeviceDriverDeprecationData
|
||||
|
||||
-LSCPU_NAME_VALUE = re.compile(r'(?P<name>[^:]+):\s+(?P<value>.+)\n?')
|
||||
+LSCPU_NAME_VALUE = re.compile(r'^(?P<name>[^:]+):[^\S\n]+(?P<value>.+)\n?', flags=re.MULTILINE)
|
||||
PPC64LE_MODEL = re.compile(r'\d+\.\d+ \(pvr (?P<family>[0-9a-fA-F]+) 0*[0-9a-fA-F]+\)')
|
||||
|
||||
|
||||
-def _get_lscpu_output():
|
||||
+def _get_lscpu_output(output_json=False):
|
||||
try:
|
||||
- result = run(['lscpu'])
|
||||
+ result = run(['lscpu', '-J' if output_json else ''])
|
||||
return result.get('stdout', '')
|
||||
except (OSError, CalledProcessError):
|
||||
api.current_logger().debug('Executing `lscpu` failed', exc_info=True)
|
||||
return ''
|
||||
|
||||
|
||||
+def _parse_lscpu_output():
|
||||
+ if get_source_major_version() == '7':
|
||||
+ return dict(LSCPU_NAME_VALUE.findall(_get_lscpu_output()))
|
||||
+
|
||||
+ lscpu = _get_lscpu_output(output_json=True)
|
||||
+ try:
|
||||
+ parsed_json = json.loads(lscpu)
|
||||
+ # The json contains one entry "lscpu" which is a list of dictionaries
|
||||
+ # with 2 keys "field" (name of the field from lscpu) and "data" (value
|
||||
+ # of the field).
|
||||
+ return dict((entry['field'].rstrip(':'), entry['data']) for entry in parsed_json['lscpu'])
|
||||
+ except ValueError:
|
||||
+ api.current_logger().debug('Failed to parse json output from `lscpu`. Got:\n{}'.format(lscpu))
|
||||
+
|
||||
+ return dict()
|
||||
+
|
||||
+
|
||||
def _get_cpu_flags(lscpu):
|
||||
flags = lscpu.get('Flags', '')
|
||||
return flags.split()
|
||||
@@ -128,24 +147,16 @@ def _find_deprecation_data_entries(lscpu):
|
||||
arch_prefix, is_detected = architecture.ARCH_ARM64, _is_detected_aarch64
|
||||
|
||||
if arch_prefix and is_detected:
|
||||
- return [
|
||||
- _to_detected_device(entry) for entry in _get_cpu_entries_for(arch_prefix)
|
||||
- if is_detected(lscpu, entry)
|
||||
- ]
|
||||
+ return [_to_detected_device(entry) for entry in _get_cpu_entries_for(arch_prefix) if is_detected(lscpu, entry)]
|
||||
|
||||
api.current_logger().warning('Unsupported platform could not detect relevant CPU information')
|
||||
return []
|
||||
|
||||
|
||||
def process():
|
||||
- lscpu = dict(LSCPU_NAME_VALUE.findall(_get_lscpu_output()))
|
||||
+ lscpu = _parse_lscpu_output()
|
||||
api.produce(*_find_deprecation_data_entries(lscpu))
|
||||
# Backwards compatibility
|
||||
machine_type = lscpu.get('Machine type')
|
||||
flags = _get_cpu_flags(lscpu)
|
||||
- api.produce(
|
||||
- CPUInfo(
|
||||
- machine_type=int(machine_type) if machine_type else None,
|
||||
- flags=flags
|
||||
- )
|
||||
- )
|
||||
+ api.produce(CPUInfo(machine_type=int(machine_type) if machine_type else None, flags=flags))
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/json/invalid b/repos/system_upgrade/common/actors/scancpu/tests/files/json/invalid
|
||||
new file mode 100644
|
||||
index 00000000..422c2b7a
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/json/invalid
|
||||
@@ -0,0 +1,2 @@
|
||||
+a
|
||||
+b
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_aarch64 b/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_aarch64
|
||||
new file mode 100644
|
||||
index 00000000..79186695
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_aarch64
|
||||
@@ -0,0 +1,29 @@
|
||||
+{
|
||||
+ "lscpu": [
|
||||
+ {"field": "Architecture:", "data": "aarch64"},
|
||||
+ {"field": "Byte Order:", "data": "Little Endian"},
|
||||
+ {"field": "CPU(s):", "data": "160"},
|
||||
+ {"field": "On-line CPU(s) list:", "data": "0-159"},
|
||||
+ {"field": "Thread(s) per core:", "data": "1"},
|
||||
+ {"field": "Core(s) per socket:", "data": "80"},
|
||||
+ {"field": "Socket(s):", "data": "2"},
|
||||
+ {"field": "NUMA node(s):", "data": "4"},
|
||||
+ {"field": "Vendor ID:", "data": "ARM"},
|
||||
+ {"field": "BIOS Vendor ID:", "data": "Ampere(R)"},
|
||||
+ {"field": "Model:", "data": "1"},
|
||||
+ {"field": "Model name:", "data": "Neoverse-N1"},
|
||||
+ {"field": "BIOS Model name:", "data": "Ampere(R) Altra(R) Processor"},
|
||||
+ {"field": "Stepping:", "data": "r3p1"},
|
||||
+ {"field": "CPU max MHz:", "data": "3000.0000"},
|
||||
+ {"field": "CPU min MHz:", "data": "1000.0000"},
|
||||
+ {"field": "BogoMIPS:", "data": "50.00"},
|
||||
+ {"field": "L1d cache:", "data": "64K"},
|
||||
+ {"field": "L1i cache:", "data": "64K"},
|
||||
+ {"field": "L2 cache:", "data": "1024K"},
|
||||
+ {"field": "NUMA node0 CPU(s):", "data": "0-79"},
|
||||
+ {"field": "NUMA node1 CPU(s):", "data": "80-159"},
|
||||
+ {"field": "NUMA node2 CPU(s):", "data": null},
|
||||
+ {"field": "NUMA node3 CPU(s):", "data": null},
|
||||
+ {"field": "Flags:", "data": "fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs"}
|
||||
+ ]
|
||||
+}
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_ppc64le b/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_ppc64le
|
||||
new file mode 100644
|
||||
index 00000000..cc51c4ac
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_ppc64le
|
||||
@@ -0,0 +1,19 @@
|
||||
+{
|
||||
+ "lscpu": [
|
||||
+ {"field": "Architecture:", "data": "ppc64le"},
|
||||
+ {"field": "Byte Order:", "data": "Little Endian"},
|
||||
+ {"field": "CPU(s):", "data": "8"},
|
||||
+ {"field": "On-line CPU(s) list:", "data": "0-7"},
|
||||
+ {"field": "Thread(s) per core:", "data": "1"},
|
||||
+ {"field": "Core(s) per socket:", "data": "1"},
|
||||
+ {"field": "Socket(s):", "data": "8"},
|
||||
+ {"field": "NUMA node(s):", "data": "1"},
|
||||
+ {"field": "Model:", "data": "2.1 (pvr 004b 0201)"},
|
||||
+ {"field": "Model name:", "data": "POWER8E (raw), altivec supported"},
|
||||
+ {"field": "Hypervisor vendor:", "data": "KVM"},
|
||||
+ {"field": "Virtualization type:", "data": "para"},
|
||||
+ {"field": "L1d cache:", "data": "64K"},
|
||||
+ {"field": "L1i cache:", "data": "32K"},
|
||||
+ {"field": "NUMA node0 CPU(s):", "data": "0-7"}
|
||||
+ ]
|
||||
+}
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_s390x b/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_s390x
|
||||
new file mode 100644
|
||||
index 00000000..950da2de
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_s390x
|
||||
@@ -0,0 +1,30 @@
|
||||
+{
|
||||
+ "lscpu": [
|
||||
+ {"field": "Architecture:", "data": "s390x"},
|
||||
+ {"field": "CPU op-mode(s):", "data": "32-bit, 64-bit"},
|
||||
+ {"field": "Byte Order:", "data": "Big Endian"},
|
||||
+ {"field": "CPU(s):", "data": "4"},
|
||||
+ {"field": "On-line CPU(s) list:", "data": "0-3"},
|
||||
+ {"field": "Thread(s) per core:", "data": "1"},
|
||||
+ {"field": "Core(s) per socket:", "data": "1"},
|
||||
+ {"field": "Socket(s) per book:", "data": "1"},
|
||||
+ {"field": "Book(s) per drawer:", "data": "1"},
|
||||
+ {"field": "Drawer(s):", "data": "4"},
|
||||
+ {"field": "NUMA node(s):", "data": "1"},
|
||||
+ {"field": "Vendor ID:", "data": "IBM/S390"},
|
||||
+ {"field": "Machine type:", "data": "3931"},
|
||||
+ {"field": "CPU dynamic MHz:", "data": "5200"},
|
||||
+ {"field": "CPU static MHz:", "data": "5200"},
|
||||
+ {"field": "BogoMIPS:", "data": "3331.00"},
|
||||
+ {"field": "Hypervisor:", "data": "KVM/Linux"},
|
||||
+ {"field": "Hypervisor vendor:", "data": "KVM"},
|
||||
+ {"field": "Virtualization type:", "data": "full"},
|
||||
+ {"field": "Dispatching mode:", "data": "horizontal"},
|
||||
+ {"field": "L1d cache:", "data": "128K"},
|
||||
+ {"field": "L1i cache:", "data": "128K"},
|
||||
+ {"field": "L2 cache:", "data": "32768K"},
|
||||
+ {"field": "L3 cache:", "data": "262144K"},
|
||||
+ {"field": "NUMA node0 CPU(s):", "data": "0-3"},
|
||||
+ {"field": "Flags:", "data": "esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx vxd vxe gs vxe2 vxp sort dflt vxp2 nnpa sie"}
|
||||
+ ]
|
||||
+}
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_x86_64 b/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_x86_64
|
||||
new file mode 100644
|
||||
index 00000000..da75a3fa
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_x86_64
|
||||
@@ -0,0 +1,31 @@
|
||||
+{
|
||||
+ "lscpu": [
|
||||
+ {"field": "Architecture:", "data": "x86_64"},
|
||||
+ {"field": "CPU op-mode(s):", "data": "32-bit, 64-bit"},
|
||||
+ {"field": "Byte Order:", "data": "Little Endian"},
|
||||
+ {"field": "CPU(s):", "data": "2"},
|
||||
+ {"field": "On-line CPU(s) list:", "data": "0,1"},
|
||||
+ {"field": "Thread(s) per core:", "data": "1"},
|
||||
+ {"field": "Core(s) per socket:", "data": "1"},
|
||||
+ {"field": "Socket(s):", "data": "2"},
|
||||
+ {"field": "NUMA node(s):", "data": "1"},
|
||||
+ {"field": "Vendor ID:", "data": "GenuineIntel"},
|
||||
+ {"field": "BIOS Vendor ID:", "data": "QEMU"},
|
||||
+ {"field": "CPU family:", "data": "6"},
|
||||
+ {"field": "Model:", "data": "165"},
|
||||
+ {"field": "Model name:", "data": "Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz"},
|
||||
+ {"field": "BIOS Model name:", "data": "pc-i440fx-7.2"},
|
||||
+ {"field": "Stepping:", "data": "2"},
|
||||
+ {"field": "CPU MHz:", "data": "2712.006"},
|
||||
+ {"field": "BogoMIPS:", "data": "5424.01"},
|
||||
+ {"field": "Virtualization:", "data": "VT-x"},
|
||||
+ {"field": "Hypervisor vendor:", "data": "KVM"},
|
||||
+ {"field": "Virtualization type:", "data": "full"},
|
||||
+ {"field": "L1d cache:", "data": "32K"},
|
||||
+ {"field": "L1i cache:", "data": "32K"},
|
||||
+ {"field": "L2 cache:", "data": "4096K"},
|
||||
+ {"field": "L3 cache:", "data": "16384K"},
|
||||
+ {"field": "NUMA node0 CPU(s):", "data": "0,1"},
|
||||
+ {"field": "Flags:", "data": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts md_clear flush_l1d"}
|
||||
+ ]
|
||||
+}
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_aarch64 b/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_aarch64
|
||||
deleted file mode 100644
|
||||
index 5b6c3470..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_aarch64
|
||||
+++ /dev/null
|
||||
@@ -1,26 +0,0 @@
|
||||
-Architecture: aarch64
|
||||
-CPU op-mode(s): 32-bit, 64-bit
|
||||
-Byte Order: Little Endian
|
||||
-CPU(s): 5
|
||||
-On-line CPU(s) list: 0-4
|
||||
-Vendor ID: APM
|
||||
-Model name: -
|
||||
-Model: 2
|
||||
-Thread(s) per core: 1
|
||||
-Core(s) per cluster: 5
|
||||
-Socket(s): -
|
||||
-Cluster(s): 1
|
||||
-Stepping: 0x3
|
||||
-BogoMIPS: 80.00
|
||||
-Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
|
||||
-NUMA node(s): 1
|
||||
-NUMA node0 CPU(s): 0-4
|
||||
-Vulnerability Itlb multihit: Not affected
|
||||
-Vulnerability L1tf: Not affected
|
||||
-Vulnerability Mds: Not affected
|
||||
-Vulnerability Meltdown: Mitigation; PTI
|
||||
-Vulnerability Spec store bypass: Vulnerable
|
||||
-Vulnerability Spectre v1: Mitigation; __user pointer sanitization
|
||||
-Vulnerability Spectre v2: Vulnerable
|
||||
-Vulnerability Srbds: Not affected
|
||||
-Vulnerability Tsx async abort: Not affected
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_ppc64le b/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_ppc64le
|
||||
deleted file mode 100644
|
||||
index 259dd19d..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_ppc64le
|
||||
+++ /dev/null
|
||||
@@ -1,24 +0,0 @@
|
||||
-Architecture: ppc64le
|
||||
-Byte Order: Little Endian
|
||||
-CPU(s): 8
|
||||
-On-line CPU(s) list: 0-7
|
||||
-Model name: POWER9 (architected), altivec supported
|
||||
-Model: 2.2 (pvr 004e 1202)
|
||||
-Thread(s) per core: 1
|
||||
-Core(s) per socket: 1
|
||||
-Socket(s): 8
|
||||
-Hypervisor vendor: KVM
|
||||
-Virtualization type: para
|
||||
-L1d cache: 256 KiB (8 instances)
|
||||
-L1i cache: 256 KiB (8 instances)
|
||||
-NUMA node(s): 1
|
||||
-NUMA node0 CPU(s): 0-7
|
||||
-Vulnerability Itlb multihit: Not affected
|
||||
-Vulnerability L1tf: Mitigation; RFI Flush, L1D private per thread
|
||||
-Vulnerability Mds: Not affected
|
||||
-Vulnerability Meltdown: Mitigation; RFI Flush, L1D private per thread
|
||||
-Vulnerability Spec store bypass: Mitigation; Kernel entry/exit barrier (eieio)
|
||||
-Vulnerability Spectre v1: Mitigation; __user pointer sanitization, ori31 speculation barrier enabled
|
||||
-Vulnerability Spectre v2: Mitigation; Software count cache flush (hardware accelerated), Software link stack flush
|
||||
-Vulnerability Srbds: Not affected
|
||||
-Vulnerability Tsx async abort: Not affected
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_s390x b/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_s390x
|
||||
deleted file mode 100644
|
||||
index 3c0a0ac3..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_s390x
|
||||
+++ /dev/null
|
||||
@@ -1,38 +0,0 @@
|
||||
-Architecture: s390x
|
||||
-CPU op-mode(s): 32-bit, 64-bit
|
||||
-Byte Order: Big Endian
|
||||
-CPU(s): 2
|
||||
-On-line CPU(s) list: 0,1
|
||||
-Vendor ID: IBM/S390
|
||||
-Model name: -
|
||||
-Machine type: 2827
|
||||
-Thread(s) per core: 1
|
||||
-Core(s) per socket: 1
|
||||
-Socket(s) per book: 1
|
||||
-Book(s) per drawer: 1
|
||||
-Drawer(s): 2
|
||||
-CPU dynamic MHz: 5200
|
||||
-CPU static MHz: 5200
|
||||
-BogoMIPS: 3241.00
|
||||
-Dispatching mode: horizontal
|
||||
-Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx vxd vxe gs vxe2 vxp sort dflt sie
|
||||
-Hypervisor: z/VM 7.2.0
|
||||
-Hypervisor vendor: IBM
|
||||
-Virtualization type: full
|
||||
-L1d cache: 256 KiB (2 instances)
|
||||
-L1i cache: 256 KiB (2 instances)
|
||||
-L2d cache: 8 MiB (2 instances)
|
||||
-L2i cache: 8 MiB (2 instances)
|
||||
-L3 cache: 256 MiB
|
||||
-L4 cache: 960 MiB
|
||||
-NUMA node(s): 1
|
||||
-NUMA node0 CPU(s): 0,1
|
||||
-Vulnerability Itlb multihit: Not affected
|
||||
-Vulnerability L1tf: Not affected
|
||||
-Vulnerability Mds: Not affected
|
||||
-Vulnerability Meltdown: Not affected
|
||||
-Vulnerability Spec store bypass: Not affected
|
||||
-Vulnerability Spectre v1: Mitigation; __user pointer sanitization
|
||||
-Vulnerability Spectre v2: Mitigation; etokens
|
||||
-Vulnerability Srbds: Not affected
|
||||
-Vulnerability Tsx async abort: Not affected
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_aarch64 b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_aarch64
|
||||
new file mode 100644
|
||||
index 00000000..3b9619ef
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_aarch64
|
||||
@@ -0,0 +1,25 @@
|
||||
+Architecture: aarch64
|
||||
+Byte Order: Little Endian
|
||||
+CPU(s): 160
|
||||
+On-line CPU(s) list: 0-159
|
||||
+Thread(s) per core: 1
|
||||
+Core(s) per socket: 80
|
||||
+Socket(s): 2
|
||||
+NUMA node(s): 4
|
||||
+Vendor ID: ARM
|
||||
+BIOS Vendor ID: Ampere(R)
|
||||
+Model: 1
|
||||
+Model name: Neoverse-N1
|
||||
+BIOS Model name: Ampere(R) Altra(R) Processor
|
||||
+Stepping: r3p1
|
||||
+CPU max MHz: 3000.0000
|
||||
+CPU min MHz: 1000.0000
|
||||
+BogoMIPS: 50.00
|
||||
+L1d cache: 64K
|
||||
+L1i cache: 64K
|
||||
+L2 cache: 1024K
|
||||
+NUMA node0 CPU(s): 0-79
|
||||
+NUMA node1 CPU(s): 80-159
|
||||
+NUMA node2 CPU(s):
|
||||
+NUMA node3 CPU(s):
|
||||
+Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_empty_field b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_empty_field
|
||||
new file mode 100644
|
||||
index 00000000..f830b7fe
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_empty_field
|
||||
@@ -0,0 +1,4 @@
|
||||
+Empyt 1:
|
||||
+Empyt 2:
|
||||
+Empyt 3:
|
||||
+Flags: flag
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_ppc64le b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_ppc64le
|
||||
new file mode 100644
|
||||
index 00000000..07d2ed65
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_ppc64le
|
||||
@@ -0,0 +1,15 @@
|
||||
+Architecture: ppc64le
|
||||
+Byte Order: Little Endian
|
||||
+CPU(s): 8
|
||||
+On-line CPU(s) list: 0-7
|
||||
+Thread(s) per core: 1
|
||||
+Core(s) per socket: 1
|
||||
+Socket(s): 8
|
||||
+NUMA node(s): 1
|
||||
+Model: 2.1 (pvr 004b 0201)
|
||||
+Model name: POWER8E (raw), altivec supported
|
||||
+Hypervisor vendor: KVM
|
||||
+Virtualization type: para
|
||||
+L1d cache: 64K
|
||||
+L1i cache: 32K
|
||||
+NUMA node0 CPU(s): 0-7
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_s390x b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_s390x
|
||||
new file mode 100644
|
||||
index 00000000..2c0de9f9
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_s390x
|
||||
@@ -0,0 +1,26 @@
|
||||
+Architecture: s390x
|
||||
+CPU op-mode(s): 32-bit, 64-bit
|
||||
+Byte Order: Big Endian
|
||||
+CPU(s): 4
|
||||
+On-line CPU(s) list: 0-3
|
||||
+Thread(s) per core: 1
|
||||
+Core(s) per socket: 1
|
||||
+Socket(s) per book: 1
|
||||
+Book(s) per drawer: 1
|
||||
+Drawer(s): 4
|
||||
+NUMA node(s): 1
|
||||
+Vendor ID: IBM/S390
|
||||
+Machine type: 3931
|
||||
+CPU dynamic MHz: 5200
|
||||
+CPU static MHz: 5200
|
||||
+BogoMIPS: 3331.00
|
||||
+Hypervisor: KVM/Linux
|
||||
+Hypervisor vendor: KVM
|
||||
+Virtualization type: full
|
||||
+Dispatching mode: horizontal
|
||||
+L1d cache: 128K
|
||||
+L1i cache: 128K
|
||||
+L2 cache: 32768K
|
||||
+L3 cache: 262144K
|
||||
+NUMA node0 CPU(s): 0-3
|
||||
+Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx vxd vxe gs vxe2 vxp sort dflt vxp2 nnpa sie
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_x86_64 b/repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_x86_64
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/actors/scancpu/tests/files/lscpu_x86_64
|
||||
rename to repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_x86_64
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/tests/test_scancpu.py b/repos/system_upgrade/common/actors/scancpu/tests/test_scancpu.py
|
||||
index 894fae08..dc9d1ffc 100644
|
||||
--- a/repos/system_upgrade/common/actors/scancpu/tests/test_scancpu.py
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/tests/test_scancpu.py
|
||||
@@ -3,7 +3,6 @@ import os
|
||||
import pytest
|
||||
|
||||
from leapp.libraries.actor import scancpu
|
||||
-from leapp.libraries.common import testutils
|
||||
from leapp.libraries.common.config.architecture import (
|
||||
ARCH_ARM64,
|
||||
ARCH_PPC64LE,
|
||||
@@ -11,6 +10,7 @@ from leapp.libraries.common.config.architecture import (
|
||||
ARCH_SUPPORTED,
|
||||
ARCH_X86_64
|
||||
)
|
||||
+from leapp.libraries.common.testutils import CurrentActorMocked, logger_mocked, produce_mocked
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import CPUInfo
|
||||
|
||||
@@ -18,8 +18,12 @@ CUR_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
LSCPU = {
|
||||
ARCH_ARM64: {
|
||||
- "machine_type": None,
|
||||
- "flags": ['fp', 'asimd', 'evtstrm', 'aes', 'pmull', 'sha1', 'sha2', 'crc32', 'cpuid'],
|
||||
+ "machine_type":
|
||||
+ None,
|
||||
+ "flags": [
|
||||
+ 'fp', 'asimd', 'evtstrm', 'aes', 'pmull', 'sha1', 'sha2', 'crc32', 'atomics', 'fphp', 'asimdhp', 'cpuid',
|
||||
+ 'asimdrdm', 'lrcpc', 'dcpop', 'asimddp', 'ssbs'
|
||||
+ ]
|
||||
},
|
||||
ARCH_PPC64LE: {
|
||||
"machine_type": None,
|
||||
@@ -27,10 +31,10 @@ LSCPU = {
|
||||
},
|
||||
ARCH_S390X: {
|
||||
"machine_type":
|
||||
- 2827,
|
||||
+ 3931,
|
||||
"flags": [
|
||||
'esan3', 'zarch', 'stfle', 'msa', 'ldisp', 'eimm', 'dfp', 'edat', 'etf3eh', 'highgprs', 'te', 'vx', 'vxd',
|
||||
- 'vxe', 'gs', 'vxe2', 'vxp', 'sort', 'dflt', 'sie'
|
||||
+ 'vxe', 'gs', 'vxe2', 'vxp', 'sort', 'dflt', 'vxp2', 'nnpa', 'sie'
|
||||
]
|
||||
},
|
||||
ARCH_X86_64: {
|
||||
@@ -57,23 +61,34 @@ class mocked_get_cpuinfo(object):
|
||||
def __init__(self, filename):
|
||||
self.filename = filename
|
||||
|
||||
- def __call__(self):
|
||||
+ def __call__(self, output_json=False):
|
||||
"""
|
||||
Return lines of the self.filename test file located in the files directory.
|
||||
|
||||
Those files contain /proc/cpuinfo content from several machines.
|
||||
"""
|
||||
- with open(os.path.join(CUR_DIR, 'files', self.filename), 'r') as fp:
|
||||
+
|
||||
+ filename = self.filename
|
||||
+ if output_json:
|
||||
+ filename = os.path.join('json', filename)
|
||||
+ else:
|
||||
+ filename = os.path.join('txt', filename)
|
||||
+ filename = os.path.join(CUR_DIR, 'files', filename)
|
||||
+
|
||||
+ with open(filename, 'r') as fp:
|
||||
return '\n'.join(fp.read().splitlines())
|
||||
|
||||
|
||||
@pytest.mark.parametrize("arch", ARCH_SUPPORTED)
|
||||
-def test_scancpu(monkeypatch, arch):
|
||||
+@pytest.mark.parametrize("version", ['7', '8'])
|
||||
+def test_scancpu(monkeypatch, arch, version):
|
||||
+
|
||||
+ monkeypatch.setattr('leapp.libraries.actor.scancpu.get_source_major_version', lambda: version)
|
||||
|
||||
mocked_cpuinfo = mocked_get_cpuinfo('lscpu_' + arch)
|
||||
monkeypatch.setattr(scancpu, '_get_lscpu_output', mocked_cpuinfo)
|
||||
- monkeypatch.setattr(api, 'produce', testutils.produce_mocked())
|
||||
- current_actor = testutils.CurrentActorMocked(arch=arch)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+ current_actor = CurrentActorMocked(arch=arch)
|
||||
monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
|
||||
scancpu.process()
|
||||
@@ -89,3 +104,50 @@ def test_scancpu(monkeypatch, arch):
|
||||
|
||||
# Did not produce anything extra
|
||||
assert expected == produced
|
||||
+
|
||||
+
|
||||
+def test_lscpu_with_empty_field(monkeypatch):
|
||||
+
|
||||
+ def mocked_cpuinfo(*args, **kwargs):
|
||||
+ return mocked_get_cpuinfo('lscpu_empty_field')(output_json=False)
|
||||
+
|
||||
+ monkeypatch.setattr(scancpu, '_get_lscpu_output', mocked_cpuinfo)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+ current_actor = CurrentActorMocked()
|
||||
+ monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
+
|
||||
+ scancpu.process()
|
||||
+
|
||||
+ expected = CPUInfo(machine_type=None, flags=['flag'])
|
||||
+ produced = api.produce.model_instances[0]
|
||||
+
|
||||
+ assert api.produce.called == 1
|
||||
+
|
||||
+ assert expected.machine_type == produced.machine_type
|
||||
+ assert sorted(expected.flags) == sorted(produced.flags)
|
||||
+
|
||||
+
|
||||
+def test_parse_invalid_json(monkeypatch):
|
||||
+
|
||||
+ monkeypatch.setattr('leapp.libraries.actor.scancpu.get_source_major_version', lambda: '8')
|
||||
+
|
||||
+ def mocked_cpuinfo(*args, **kwargs):
|
||||
+ return mocked_get_cpuinfo('invalid')(output_json=True)
|
||||
+
|
||||
+ monkeypatch.setattr(scancpu, '_get_lscpu_output', mocked_cpuinfo)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+ monkeypatch.setattr(api, 'current_logger', logger_mocked())
|
||||
+ current_actor = CurrentActorMocked()
|
||||
+ monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
+
|
||||
+ scancpu.process()
|
||||
+
|
||||
+ assert api.produce.called == 1
|
||||
+
|
||||
+ assert any('Failed to parse json output' in msg for msg in api.current_logger().dbgmsg)
|
||||
+
|
||||
+ expected = CPUInfo(machine_type=None, flags=[])
|
||||
+ produced = api.produce.model_instances[0]
|
||||
+
|
||||
+ assert expected.machine_type == produced.machine_type
|
||||
+ assert sorted(expected.flags) == sorted(produced.flags)
|
||||
--
|
||||
2.42.0
|
||||
|
254
0006-Add-unit-tests-for-actor-udevamdinfo.patch
Normal file
254
0006-Add-unit-tests-for-actor-udevamdinfo.patch
Normal file
@ -0,0 +1,254 @@
|
||||
From b65ef94be64f16eacb79a55d1185e37aa401832e Mon Sep 17 00:00:00 2001
|
||||
From: tomasfratrik <tomasfratrik8@gmail.com>
|
||||
Date: Mon, 4 Mar 2024 09:10:02 +0100
|
||||
Subject: [PATCH 06/34] Add unit tests for actor udevamdinfo
|
||||
|
||||
* Move actor's process to its library
|
||||
* Add check for run in process
|
||||
* Create file with short output of 'udevamd info -e' for testing
|
||||
purposes
|
||||
* Add unit tests for actor
|
||||
|
||||
Jira: OAMG-1277
|
||||
---
|
||||
.../common/actors/udev/udevadminfo/actor.py | 5 +-
|
||||
.../udev/udevadminfo/libraries/udevadminfo.py | 19 +++
|
||||
.../udevadminfo/tests/files/udevadm_database | 134 ++++++++++++++++++
|
||||
.../udevadminfo/tests/test_udevadminfo.py | 40 ++++++
|
||||
4 files changed, 195 insertions(+), 3 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/actors/udev/udevadminfo/libraries/udevadminfo.py
|
||||
create mode 100644 repos/system_upgrade/common/actors/udev/udevadminfo/tests/files/udevadm_database
|
||||
create mode 100644 repos/system_upgrade/common/actors/udev/udevadminfo/tests/test_udevadminfo.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/udev/udevadminfo/actor.py b/repos/system_upgrade/common/actors/udev/udevadminfo/actor.py
|
||||
index b674e56c..ac702914 100644
|
||||
--- a/repos/system_upgrade/common/actors/udev/udevadminfo/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/udev/udevadminfo/actor.py
|
||||
@@ -1,5 +1,5 @@
|
||||
from leapp.actors import Actor
|
||||
-from leapp.libraries.stdlib import run
|
||||
+from leapp.libraries.actor import udevadminfo
|
||||
from leapp.models import UdevAdmInfoData
|
||||
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
|
||||
@@ -15,5 +15,4 @@ class UdevAdmInfo(Actor):
|
||||
tags = (IPUWorkflowTag, FactsPhaseTag,)
|
||||
|
||||
def process(self):
|
||||
- out = run(['udevadm', 'info', '-e'])['stdout']
|
||||
- self.produce(UdevAdmInfoData(db=out))
|
||||
+ udevadminfo.process()
|
||||
diff --git a/repos/system_upgrade/common/actors/udev/udevadminfo/libraries/udevadminfo.py b/repos/system_upgrade/common/actors/udev/udevadminfo/libraries/udevadminfo.py
|
||||
new file mode 100644
|
||||
index 00000000..dabe49e0
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/udev/udevadminfo/libraries/udevadminfo.py
|
||||
@@ -0,0 +1,19 @@
|
||||
+from leapp.exceptions import StopActorExecutionError
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
+from leapp.models import UdevAdmInfoData
|
||||
+
|
||||
+
|
||||
+def process():
|
||||
+ try:
|
||||
+ out = run(['udevadm', 'info', '-e'])['stdout']
|
||||
+ except (CalledProcessError, OSError) as err:
|
||||
+ raise StopActorExecutionError(
|
||||
+ message=(
|
||||
+ "Unable to gather information about the system devices"
|
||||
+ ),
|
||||
+ details={
|
||||
+ 'details': 'Failed to execute `udevadm info -e` command.',
|
||||
+ 'error': str(err)
|
||||
+ }
|
||||
+ )
|
||||
+ api.produce(UdevAdmInfoData(db=out))
|
||||
diff --git a/repos/system_upgrade/common/actors/udev/udevadminfo/tests/files/udevadm_database b/repos/system_upgrade/common/actors/udev/udevadminfo/tests/files/udevadm_database
|
||||
new file mode 100644
|
||||
index 00000000..219fb574
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/udev/udevadminfo/tests/files/udevadm_database
|
||||
@@ -0,0 +1,134 @@
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:LNXCPU:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1698543
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:01
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:01
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:LNXCPU:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1698839
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0103:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0103:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:PNP0103:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1697906
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:PNP0A03:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1698109
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0A06:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0A06:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:PNP0A06:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1702939
|
||||
+P: /devices/LNXSYSTM:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:LNXSYSTM:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1694509
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXPWRBN:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXPWRBN:00
|
||||
+E: DRIVER=button
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:LNXPWRBN:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1695034
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
|
||||
+E: EV=3
|
||||
+E: ID_FOR_SEAT=input-acpi-LNXPWRBN_00
|
||||
+E: ID_INPUT=1
|
||||
+E: ID_INPUT_KEY=1
|
||||
+E: ID_PATH=acpi-LNXPWRBN:00
|
||||
+E: ID_PATH_TAG=acpi-LNXPWRBN_00
|
||||
+E: KEY=10000000000000 0
|
||||
+E: MODALIAS=input:b0019v0000p0001e0000-e0,1,k74,ramlsfw
|
||||
+E: NAME="Power Button"
|
||||
+E: PHYS="LNXPWRBN/button/input0"
|
||||
+E: PRODUCT=19/0/1/0
|
||||
+E: PROP=0
|
||||
+E: SUBSYSTEM=input
|
||||
+E: TAGS=:seat:
|
||||
+E: USEC_INITIALIZED=1697068
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0/event0
|
||||
+N: input/event0
|
||||
+E: DEVNAME=/dev/input/event0
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0/event0
|
||||
+E: ID_INPUT=1
|
||||
+E: ID_INPUT_KEY=1
|
||||
+E: ID_PATH=acpi-LNXPWRBN:00
|
||||
+E: ID_PATH_TAG=acpi-LNXPWRBN_00
|
||||
+E: MAJOR=13
|
||||
+E: MINOR=64
|
||||
+E: SUBSYSTEM=input
|
||||
+E: TAGS=:power-switch:
|
||||
+E: USEC_INITIALIZED=1744996
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXPWRBN:00/wakeup/wakeup10
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXPWRBN:00/wakeup/wakeup10
|
||||
+E: SUBSYSTEM=wakeup
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:LNXSYBUS:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1695925
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:ACPI0010:PNP0A05:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1698058
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:LNXCPU:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1698543
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:01
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:01
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:LNXCPU:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1698839
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0103:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0103:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:PNP0103:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1697906
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:PNP0A03:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1698109
|
||||
+
|
||||
+P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0A06:00
|
||||
+E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0A06:00
|
||||
+E: ID_VENDOR_FROM_DATABASE=The Linux Foundation
|
||||
+E: MODALIAS=acpi:PNP0A06:
|
||||
+E: SUBSYSTEM=acpi
|
||||
+E: USEC_INITIALIZED=1702939
|
||||
+
|
||||
diff --git a/repos/system_upgrade/common/actors/udev/udevadminfo/tests/test_udevadminfo.py b/repos/system_upgrade/common/actors/udev/udevadminfo/tests/test_udevadminfo.py
|
||||
new file mode 100644
|
||||
index 00000000..f465d6f6
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/udev/udevadminfo/tests/test_udevadminfo.py
|
||||
@@ -0,0 +1,40 @@
|
||||
+import os
|
||||
+
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.exceptions import StopActorExecutionError
|
||||
+from leapp.libraries.actor import udevadminfo
|
||||
+from leapp.libraries.common import testutils
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError
|
||||
+from leapp.models import UdevAdmInfoData
|
||||
+
|
||||
+CUR_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
+
|
||||
+
|
||||
+def _raise_call_error(*args):
|
||||
+ raise CalledProcessError(
|
||||
+ message='A Leapp Command Error occurred.',
|
||||
+ command=args,
|
||||
+ result={'signal': None, 'exit_code': 1, 'pid': 0, 'stdout': 'fake', 'stderr': 'fake'}
|
||||
+ )
|
||||
+
|
||||
+
|
||||
+def test_failed_run(monkeypatch):
|
||||
+ monkeypatch.setattr(api, 'produce', testutils.produce_mocked())
|
||||
+ monkeypatch.setattr(udevadminfo, 'run', _raise_call_error)
|
||||
+
|
||||
+ with pytest.raises(StopActorExecutionError):
|
||||
+ udevadminfo.process()
|
||||
+
|
||||
+
|
||||
+def test_udevadminfo(monkeypatch):
|
||||
+
|
||||
+ with open(os.path.join(CUR_DIR, 'files', 'udevadm_database'), 'r') as fp:
|
||||
+ mocked_data = fp.read()
|
||||
+ monkeypatch.setattr(api, 'produce', testutils.produce_mocked())
|
||||
+ monkeypatch.setattr(udevadminfo, 'run', lambda *args: {'stdout': mocked_data})
|
||||
+ udevadminfo.process()
|
||||
+
|
||||
+ assert api.produce.called == 1
|
||||
+ assert isinstance(api.produce.model_instances[0], UdevAdmInfoData)
|
||||
+ assert api.produce.model_instances[0].db == mocked_data
|
||||
--
|
||||
2.42.0
|
||||
|
166
0007-Add-unit-tests-for-scansourcefiles-actor-1190.patch
Normal file
166
0007-Add-unit-tests-for-scansourcefiles-actor-1190.patch
Normal file
@ -0,0 +1,166 @@
|
||||
From 3066cad4e7a2a440a93f01fd0c0cbec84bb5485f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Fr=C3=A1trik?=
|
||||
<93993694+tomasfratrik@users.noreply.github.com>
|
||||
Date: Thu, 11 Apr 2024 13:48:31 +0200
|
||||
Subject: [PATCH 07/34] Add unit tests for scansourcefiles actor (#1190)
|
||||
|
||||
Jira: OAMG-10367
|
||||
---
|
||||
.../tests/unit_test_scansourcefiles.py | 147 +++++++++++++++++-
|
||||
1 file changed, 142 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/scansourcefiles/tests/unit_test_scansourcefiles.py b/repos/system_upgrade/common/actors/scansourcefiles/tests/unit_test_scansourcefiles.py
|
||||
index 6a6b009a..40ae2408 100644
|
||||
--- a/repos/system_upgrade/common/actors/scansourcefiles/tests/unit_test_scansourcefiles.py
|
||||
+++ b/repos/system_upgrade/common/actors/scansourcefiles/tests/unit_test_scansourcefiles.py
|
||||
@@ -1,5 +1,142 @@
|
||||
-def test_scansourcefiles():
|
||||
- # TODO(pstodulk): keeping unit tests for later after I check the idea
|
||||
- # of this actor with the team.
|
||||
- # JIRA: OAMG-10367
|
||||
- pass
|
||||
+import os
|
||||
+
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.actor import scansourcefiles
|
||||
+from leapp.libraries.common import testutils
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError
|
||||
+from leapp.models import FileInfo, TrackedFilesInfoSource
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('run_output', 'expected_output_is_modified'),
|
||||
+ (
|
||||
+ ({'exit_code': 0}, False),
|
||||
+ ({'exit_code': 1, 'stdout': 'missing /boot/efi/EFI (Permission denied)'}, True),
|
||||
+ ({'exit_code': 1, 'stdout': 'S.5...... c /etc/openldap/ldap.conf'}, True),
|
||||
+ ({'exit_code': 1, 'stdout': '..?...... c /etc/libaudit.conf'}, False),
|
||||
+ ({'exit_code': 1, 'stdout': '.....UG.. g /var/run/avahi-daemon'}, False),
|
||||
+ )
|
||||
+)
|
||||
+def test_is_modified(monkeypatch, run_output, expected_output_is_modified):
|
||||
+ input_file = '/file'
|
||||
+
|
||||
+ def mocked_run(cmd, *args, **kwargs):
|
||||
+ assert cmd == ['rpm', '-Vf', '--nomtime', input_file]
|
||||
+ return run_output
|
||||
+
|
||||
+ monkeypatch.setattr(scansourcefiles, 'run', mocked_run)
|
||||
+ assert scansourcefiles.is_modified(input_file) == expected_output_is_modified
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ 'run_output',
|
||||
+ [
|
||||
+ {'stdout': ['']},
|
||||
+ {'stdout': ['rpm']},
|
||||
+ {'stdout': ['rpm1', 'rpm2']},
|
||||
+ ]
|
||||
+)
|
||||
+def test_get_rpm_name(monkeypatch, run_output):
|
||||
+ input_file = '/file'
|
||||
+
|
||||
+ def mocked_run(cmd, *args, **kwargs):
|
||||
+ assert cmd == ['rpm', '-qf', '--queryformat', r'%{NAME}\n', input_file]
|
||||
+ return run_output
|
||||
+
|
||||
+ monkeypatch.setattr(scansourcefiles, 'run', mocked_run)
|
||||
+ monkeypatch.setattr(api, 'current_logger', testutils.logger_mocked())
|
||||
+ assert scansourcefiles._get_rpm_name(input_file) == run_output['stdout'][0]
|
||||
+
|
||||
+ if len(run_output['stdout']) > 1:
|
||||
+ expected_warnmsg = ('The {} file is owned by multiple rpms: {}.'
|
||||
+ .format(input_file, ', '.join(run_output['stdout'])))
|
||||
+ assert api.current_logger.warnmsg == [expected_warnmsg]
|
||||
+
|
||||
+
|
||||
+def test_get_rpm_name_error(monkeypatch):
|
||||
+ input_file = '/file'
|
||||
+
|
||||
+ def mocked_run(cmd, *args, **kwargs):
|
||||
+ assert cmd == ['rpm', '-qf', '--queryformat', r'%{NAME}\n', input_file]
|
||||
+ raise CalledProcessError("mocked error", cmd, "result")
|
||||
+
|
||||
+ monkeypatch.setattr(scansourcefiles, 'run', mocked_run)
|
||||
+ assert scansourcefiles._get_rpm_name(input_file) == ''
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('input_file', 'exists', 'rpm_name', 'is_modified'),
|
||||
+ (
|
||||
+ ('/not_existing_file', False, '', False),
|
||||
+ ('/not_existing_file_rpm_owned', False, 'rpm', False),
|
||||
+ ('/not_existing_file_rpm_owned_modified', False, 'rpm', True),
|
||||
+ ('/existing_file_not_modified', True, '', False),
|
||||
+ ('/existing_file_owned_by_rpm_not_modified', True, 'rpm', False),
|
||||
+ ('/existing_file_owned_by_rpm_modified', True, 'rpm', True),
|
||||
+ )
|
||||
+)
|
||||
+def test_scan_file(monkeypatch, input_file, exists, rpm_name, is_modified):
|
||||
+ monkeypatch.setattr(scansourcefiles, 'is_modified', lambda _: is_modified)
|
||||
+ monkeypatch.setattr(scansourcefiles, '_get_rpm_name', lambda _: rpm_name)
|
||||
+ monkeypatch.setattr(os.path, 'exists', lambda _: exists)
|
||||
+
|
||||
+ expected_model_output = FileInfo(path=input_file, exists=exists, rpm_name=rpm_name, is_modified=is_modified)
|
||||
+ assert scansourcefiles.scan_file(input_file) == expected_model_output
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('input_files'),
|
||||
+ (
|
||||
+ ([]),
|
||||
+ (['/file1']),
|
||||
+ (['/file1', '/file2']),
|
||||
+ )
|
||||
+)
|
||||
+def test_scan_files(monkeypatch, input_files):
|
||||
+ base_data = {
|
||||
+ 'exists': False,
|
||||
+ 'rpm_name': '',
|
||||
+ 'is_modified': False
|
||||
+ }
|
||||
+
|
||||
+ def scan_file_mocked(input_file):
|
||||
+ return FileInfo(path=input_file, **base_data)
|
||||
+
|
||||
+ monkeypatch.setattr(scansourcefiles, 'scan_file', scan_file_mocked)
|
||||
+ expected_output_list = [FileInfo(path=input_file, **base_data) for input_file in input_files]
|
||||
+ assert scansourcefiles.scan_files(input_files) == expected_output_list
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ 'rhel_major_version', ['8', '9']
|
||||
+)
|
||||
+def test_tracked_files(monkeypatch, rhel_major_version):
|
||||
+ TRACKED_FILES_MOCKED = {
|
||||
+ 'common': [
|
||||
+ '/file1',
|
||||
+ ],
|
||||
+ '8': [
|
||||
+ '/file2',
|
||||
+ ],
|
||||
+ '9': [
|
||||
+ '/file3',
|
||||
+ ],
|
||||
+ }
|
||||
+
|
||||
+ def scan_files_mocked(files):
|
||||
+ return [FileInfo(path=file_path, exists=False, rpm_name='', is_modified=False) for file_path in files]
|
||||
+
|
||||
+ monkeypatch.setattr(api, 'produce', testutils.produce_mocked())
|
||||
+ monkeypatch.setattr(scansourcefiles, 'TRACKED_FILES', TRACKED_FILES_MOCKED)
|
||||
+ monkeypatch.setattr(scansourcefiles, 'get_source_major_version', lambda: rhel_major_version)
|
||||
+ monkeypatch.setattr(scansourcefiles, 'scan_files', scan_files_mocked)
|
||||
+
|
||||
+ scansourcefiles.process()
|
||||
+
|
||||
+ tracked_files_model = api.produce.model_instances[0]
|
||||
+ assert api.produce.called == 1
|
||||
+ assert isinstance(tracked_files_model, TrackedFilesInfoSource)
|
||||
+ # assert only 1 common and 1 version file were scanned
|
||||
+ assert len(tracked_files_model.files) == 2
|
||||
+ assert all(isinstance(files_list_item, FileInfo) for files_list_item in tracked_files_model.files)
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,72 @@
|
||||
From 82070789813ae64f8fadc31a5096bf8df4124f75 Mon Sep 17 00:00:00 2001
|
||||
From: mhecko <mhecko@redhat.com>
|
||||
Date: Tue, 2 Apr 2024 11:24:49 +0200
|
||||
Subject: [PATCH 08/34] pes_events_scanner: overwrite repositories when
|
||||
applying an event
|
||||
|
||||
The Package class has custom __hash__ and __eq__ methods in order to
|
||||
achieve a straightforward presentation via set manipulation. However,
|
||||
this causes problems, e.g., when applying split events. For example:
|
||||
Applying the event Split(in={(A, repo1)}, out={(A, repo2), (B, repo2)})
|
||||
to the package state {(A, repo1), (B, repo1)} results in the following:
|
||||
{(A, repo1), (B, repo1)} --apply--> {(A, repo2), (B, repo1)}
|
||||
which is undesired as repo1 is a source system repository. Such
|
||||
a package will get reported to the user as potentially removed during
|
||||
the upgrade. This patch addresses this unwanted behavior.
|
||||
---
|
||||
.../peseventsscanner/libraries/pes_events_scanner.py | 9 ++++++++-
|
||||
.../peseventsscanner/tests/test_pes_event_scanner.py | 9 +++++++++
|
||||
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py b/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py
|
||||
index f9411dfe..f5cb2613 100644
|
||||
--- a/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py
|
||||
@@ -139,8 +139,11 @@ def compute_pkg_changes_between_consequent_releases(source_installed_pkgs,
|
||||
if event.action == Action.PRESENT:
|
||||
for pkg in event.in_pkgs:
|
||||
if pkg in seen_pkgs:
|
||||
+ # First remove the package with the old repository and add it back, but now with the new
|
||||
+ # repository. As the Package class has a custom __hash__ and __eq__ comparing only name
|
||||
+ # and modulestream, the pkg.repository field is ignore and therefore the add() call
|
||||
+ # does not update the entry.
|
||||
if pkg in target_pkgs:
|
||||
- # Remove the package with the old repository, add the one with the new one
|
||||
target_pkgs.remove(pkg)
|
||||
target_pkgs.add(pkg)
|
||||
elif event.action == Action.DEPRECATED:
|
||||
@@ -163,7 +166,11 @@ def compute_pkg_changes_between_consequent_releases(source_installed_pkgs,
|
||||
event.id, event.action, removed_pkgs_str, added_pkgs_str)
|
||||
|
||||
# In pkgs are present, event can be applied
|
||||
+ # Note: We do a .difference(event.out_packages) followed by an .union(event.out_packages) to overwrite
|
||||
+ # # repositories of the packages (Package has overwritten __hash__ and __eq__, ignoring
|
||||
+ # # the repository field)
|
||||
target_pkgs = target_pkgs.difference(event.in_pkgs)
|
||||
+ target_pkgs = target_pkgs.difference(event.out_pkgs)
|
||||
target_pkgs = target_pkgs.union(event.out_pkgs)
|
||||
|
||||
pkgs_to_demodularize = pkgs_to_demodularize.difference(event.in_pkgs)
|
||||
diff --git a/repos/system_upgrade/common/actors/peseventsscanner/tests/test_pes_event_scanner.py b/repos/system_upgrade/common/actors/peseventsscanner/tests/test_pes_event_scanner.py
|
||||
index 7cdcf820..80ece770 100644
|
||||
--- a/repos/system_upgrade/common/actors/peseventsscanner/tests/test_pes_event_scanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/peseventsscanner/tests/test_pes_event_scanner.py
|
||||
@@ -123,6 +123,15 @@ def pkgs_into_tuples(pkgs):
|
||||
[(8, 0)],
|
||||
{Package('renamed-out', 'rhel8-repo', None)}
|
||||
),
|
||||
+ (
|
||||
+ {Package('A', 'rhel7-repo', None), Package('B', 'rhel7-repo', None)},
|
||||
+ [
|
||||
+ Event(1, Action.SPLIT, {Package('A', 'rhel7-repo', None)},
|
||||
+ {Package('A', 'rhel8-repo', None), Package('B', 'rhel8-repo', None)}, (7, 6), (8, 0), [])
|
||||
+ ],
|
||||
+ [(8, 0)],
|
||||
+ {Package('A', 'rhel8-repo', None), Package('B', 'rhel8-repo', None)}
|
||||
+ ),
|
||||
)
|
||||
)
|
||||
def test_event_application_fundamentals(monkeypatch, installed_pkgs, events, releases, expected_target_pkgs):
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 1f8b8f3259d7daff63dff0a4d630b36e615e416d Mon Sep 17 00:00:00 2001
|
||||
From: David Kubek <dkubek@redhat.com>
|
||||
Date: Wed, 10 Apr 2024 12:08:23 +0200
|
||||
Subject: [PATCH 09/34] Modify upgrade not terminate after lockfile detected
|
||||
|
||||
Previously, when the upgrade failed in the initram the file
|
||||
/sysroot/root/tmp_leapp_py3/.leapp_upgrade_failed has been generated and
|
||||
upon detecting this file leapp triggered an emergency shell. This caused
|
||||
the original failure to be hidden from the customer.
|
||||
|
||||
With this commit, we no longer crash immediately upon detecting the file
|
||||
but rather continue and "wait" for the underlying issue and error to
|
||||
emerge.
|
||||
|
||||
RHEL-24148
|
||||
---
|
||||
.../files/dracut/85sys-upgrade-redhat/do-upgrade.sh | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh b/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh
|
||||
index 4a6f7b62..56a94b5d 100755
|
||||
--- a/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh
|
||||
+++ b/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh
|
||||
@@ -282,6 +282,11 @@ do_upgrade() {
|
||||
local dirname
|
||||
dirname="$("$NEWROOT/bin/dirname" "$NEWROOT$LEAPP_FAILED_FLAG_FILE")"
|
||||
[ -d "$dirname" ] || mkdir "$dirname"
|
||||
+
|
||||
+ echo >&2 "Creating file $NEWROOT$LEAPP_FAILED_FLAG_FILE"
|
||||
+ echo >&2 "Warning: Leapp upgrade failed and there is an issue blocking the upgrade."
|
||||
+ echo >&2 "Please file a support case with /var/log/leapp/leapp-upgrade.log attached"
|
||||
+
|
||||
"$NEWROOT/bin/touch" "$NEWROOT$LEAPP_FAILED_FLAG_FILE"
|
||||
fi
|
||||
|
||||
@@ -358,10 +363,10 @@ mount -o "remount,rw" "$NEWROOT"
|
||||
# check if leapp previously failed in the initramfs, if it did return to the emergency shell
|
||||
[ -f "$NEWROOT$LEAPP_FAILED_FLAG_FILE" ] && {
|
||||
echo >&2 "Found file $NEWROOT$LEAPP_FAILED_FLAG_FILE"
|
||||
- echo >&2 "Error: Leapp previously failed and cannot continue, returning back to emergency shell"
|
||||
- echo >&2 "Please file a support case with $NEWROOT/var/log/leapp/leapp-upgrade.log attached"
|
||||
- echo >&2 "To rerun the upgrade upon exiting the dracut shell remove the $NEWROOT$LEAPP_FAILED_FLAG_FILE file"
|
||||
- exit 1
|
||||
+ echo >&2 "Warning: Leapp failed on a previous execution and something might be blocking the upgrade."
|
||||
+ echo >&2 "Continuing with the upgrade anyway. Note that any subsequent error might be potentially misleading due to a previous failure."
|
||||
+ echo >&2 "A log file will be generated at $NEWROOT/var/log/leapp/leapp-upgrade.log."
|
||||
+ echo >&2 "In case of persisting failure, if possible, try to boot to the original system and file a support case with /var/log/leapp/leapp-upgrade.log attached."
|
||||
}
|
||||
|
||||
[ ! -x "$NEWROOT$LEAPPBIN" ] && {
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 1fb7e78bfa86163c27c309d6244298d4b3075762 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Fri, 2 Feb 2024 12:32:15 +0100
|
||||
Subject: [PATCH 10/34] Make the reboot required text more visible in the
|
||||
console output
|
||||
|
||||
The "A reboot is required to continue. Please reboot your system."
|
||||
message is printed before the reports summary and thus is easily
|
||||
overlooked by users.
|
||||
|
||||
This patch adds a second such message after the report summary to
|
||||
improve this.
|
||||
|
||||
Jira: RHEL-22736
|
||||
---
|
||||
commands/upgrade/__init__.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/commands/upgrade/__init__.py b/commands/upgrade/__init__.py
|
||||
index c42b7cba..cc5fe647 100644
|
||||
--- a/commands/upgrade/__init__.py
|
||||
+++ b/commands/upgrade/__init__.py
|
||||
@@ -113,6 +113,11 @@ def upgrade(args, breadcrumbs):
|
||||
|
||||
if workflow.failure:
|
||||
sys.exit(1)
|
||||
+ elif not args.resume:
|
||||
+ sys.stdout.write(
|
||||
+ 'Reboot the system to continue with the upgrade.'
|
||||
+ ' This might take a while depending on the system configuration.\n'
|
||||
+ )
|
||||
|
||||
|
||||
def register(base_command):
|
||||
--
|
||||
2.42.0
|
||||
|
176
0011-check_grub_legacy-inhibit-when-GRUB-legacy-is-presen.patch
Normal file
176
0011-check_grub_legacy-inhibit-when-GRUB-legacy-is-presen.patch
Normal file
@ -0,0 +1,176 @@
|
||||
From 8fe2a2d35395a43b8449354d68479d8339ef49ab Mon Sep 17 00:00:00 2001
|
||||
From: mhecko <mhecko@redhat.com>
|
||||
Date: Sun, 21 Apr 2024 22:40:38 +0200
|
||||
Subject: [PATCH 11/34] check_grub_legacy: inhibit when GRUB legacy is present
|
||||
|
||||
Adds a new actor checking for whether any of the GRUB devices
|
||||
have the old GRUB Legacy installed. If any of such devices
|
||||
is detected, the upgrade is inhibited. The GRUB Legacy is detected
|
||||
by searching for the string 'GRUB version 0.94' in `file -s`
|
||||
of the device.
|
||||
---
|
||||
.../el7toel8/actors/checklegacygrub/actor.py | 20 ++++++
|
||||
.../libraries/check_legacy_grub.py | 71 +++++++++++++++++++
|
||||
.../tests/test_check_legacy_grub.py | 45 ++++++++++++
|
||||
3 files changed, 136 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/checklegacygrub/actor.py
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/checklegacygrub/libraries/check_legacy_grub.py
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/checklegacygrub/tests/test_check_legacy_grub.py
|
||||
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checklegacygrub/actor.py b/repos/system_upgrade/el7toel8/actors/checklegacygrub/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..1fc7dde4
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checklegacygrub/actor.py
|
||||
@@ -0,0 +1,20 @@
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.libraries.actor import check_legacy_grub as check_legacy_grub_lib
|
||||
+from leapp.reporting import Report
|
||||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+
|
||||
+class CheckLegacyGrub(Actor):
|
||||
+ """
|
||||
+ Check whether GRUB Legacy is installed in the MBR.
|
||||
+
|
||||
+ GRUB Legacy is deprecated since RHEL 7 in favour of GRUB2.
|
||||
+ """
|
||||
+
|
||||
+ name = 'check_grub_legacy'
|
||||
+ consumes = ()
|
||||
+ produces = (Report,)
|
||||
+ tags = (FactsPhaseTag, IPUWorkflowTag)
|
||||
+
|
||||
+ def process(self):
|
||||
+ check_legacy_grub_lib.check_grub_disks_for_legacy_grub()
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checklegacygrub/libraries/check_legacy_grub.py b/repos/system_upgrade/el7toel8/actors/checklegacygrub/libraries/check_legacy_grub.py
|
||||
new file mode 100644
|
||||
index 00000000..d02c14f9
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checklegacygrub/libraries/check_legacy_grub.py
|
||||
@@ -0,0 +1,71 @@
|
||||
+from leapp import reporting
|
||||
+from leapp.exceptions import StopActorExecution
|
||||
+from leapp.libraries.common import grub as grub_lib
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
+from leapp.reporting import create_report
|
||||
+
|
||||
+# There is no grub legacy package on RHEL7, therefore, the system must have been upgraded from RHEL6
|
||||
+MIGRATION_TO_GRUB2_GUIDE_URL = 'https://access.redhat.com/solutions/2643721'
|
||||
+
|
||||
+
|
||||
+def has_legacy_grub(device):
|
||||
+ try:
|
||||
+ output = run(['file', '-s', device])
|
||||
+ except CalledProcessError as err:
|
||||
+ msg = 'Failed to determine the file type for the special device `{0}`. Full error: `{1}`'
|
||||
+ api.current_logger().warning(msg.format(device, str(err)))
|
||||
+
|
||||
+ # According to `file` manpage, the exit code > 0 iff the file does not exists (meaning)
|
||||
+ # that grub_lib.get_grub_devices() is unreliable for some reason (better stop the upgrade),
|
||||
+ # or because the file type could not be determined. However, its manpage directly gives examples
|
||||
+ # of file -s being used on block devices, so this should be unlikely - especially if one would
|
||||
+ # consider that get_grub_devices was able to determine that it is a grub device.
|
||||
+ raise StopActorExecution()
|
||||
+
|
||||
+ grub_legacy_version_string = 'GRUB version 0.94'
|
||||
+ return grub_legacy_version_string in output['stdout']
|
||||
+
|
||||
+
|
||||
+def check_grub_disks_for_legacy_grub():
|
||||
+ # Both GRUB2 and Grub Legacy are recognized by `get_grub_devices`
|
||||
+ grub_devices = grub_lib.get_grub_devices()
|
||||
+
|
||||
+ legacy_grub_devices = []
|
||||
+ for device in grub_devices:
|
||||
+ if has_legacy_grub(device):
|
||||
+ legacy_grub_devices.append(device)
|
||||
+
|
||||
+ if legacy_grub_devices:
|
||||
+ details = (
|
||||
+ 'Leapp detected GRUB Legacy to be installed on the system. '
|
||||
+ 'The GRUB Legacy bootloader is unsupported on RHEL7 and GRUB2 must be used instead. '
|
||||
+ 'The presence of GRUB Legacy is possible on systems that have been upgraded from RHEL 6 in the past, '
|
||||
+ 'but required manual post-upgrade steps have not been performed. '
|
||||
+ 'Note that the in-place upgrade from RHEL 6 to RHEL 7 systems is in such a case '
|
||||
+ 'considered as unfinished.\n\n'
|
||||
+
|
||||
+ 'GRUB Legacy has been detected on following devices:\n'
|
||||
+ '{block_devices_fmt}\n'
|
||||
+ )
|
||||
+
|
||||
+ hint = (
|
||||
+ 'Migrate to the GRUB2 bootloader on the reported devices. '
|
||||
+ 'Also finish other post-upgrade steps related to the previous in-place upgrade, the majority of which '
|
||||
+ 'is a part of the related preupgrade report for upgrades from RHEL 6 to RHEL 7.'
|
||||
+ 'If you are not sure whether all previously required post-upgrade steps '
|
||||
+ 'have been performed, consider a clean installation of the RHEL 8 system instead. '
|
||||
+ 'Note that the in-place upgrade to RHEL 8 can fail in various ways '
|
||||
+ 'if the RHEL 7 system is misconfigured.'
|
||||
+ )
|
||||
+
|
||||
+ block_devices_fmt = '\n'.join(legacy_grub_devices)
|
||||
+ create_report([
|
||||
+ reporting.Title("GRUB Legacy is used on the system"),
|
||||
+ reporting.Summary(details.format(block_devices_fmt=block_devices_fmt)),
|
||||
+ reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Groups([reporting.Groups.BOOT]),
|
||||
+ reporting.Remediation(hint=hint),
|
||||
+ reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
+ reporting.ExternalLink(url=MIGRATION_TO_GRUB2_GUIDE_URL,
|
||||
+ title='How to install GRUB2 after a RHEL6 to RHEL7 upgrade'),
|
||||
+ ])
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checklegacygrub/tests/test_check_legacy_grub.py b/repos/system_upgrade/el7toel8/actors/checklegacygrub/tests/test_check_legacy_grub.py
|
||||
new file mode 100644
|
||||
index 00000000..d6e5008e
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checklegacygrub/tests/test_check_legacy_grub.py
|
||||
@@ -0,0 +1,45 @@
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.actor import check_legacy_grub as check_legacy_grub_lib
|
||||
+from leapp.libraries.common import grub as grub_lib
|
||||
+from leapp.libraries.common.testutils import create_report_mocked
|
||||
+from leapp.utils.report import is_inhibitor
|
||||
+
|
||||
+VDA_WITH_LEGACY_GRUB = (
|
||||
+ '/dev/vda: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, '
|
||||
+ 'stage2 address 0x2000, stage2 segment 0x200, GRUB version 0.94; partition 1: ID=0x83, '
|
||||
+ 'active, starthead 32, startsector 2048, 1024000 sectors; partition 2: ID=0x83, starthead 221, '
|
||||
+ 'startsector 1026048, 19945472 sectors, code offset 0x48\n'
|
||||
+)
|
||||
+
|
||||
+NVME0N1_VDB_WITH_GRUB = (
|
||||
+ '/dev/nvme0n1: x86 boot sector; partition 1: ID=0x83, active, starthead 32, startsector 2048, 6291456 sectors; '
|
||||
+ 'partition 2: ID=0x83, starthead 191, startsector 6293504, 993921024 sectors, code offset 0x63'
|
||||
+)
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('grub_device_to_file_output', 'should_inhibit'),
|
||||
+ [
|
||||
+ ({'/dev/vda': VDA_WITH_LEGACY_GRUB}, True),
|
||||
+ ({'/dev/nvme0n1': NVME0N1_VDB_WITH_GRUB}, False),
|
||||
+ ({'/dev/vda': VDA_WITH_LEGACY_GRUB, '/dev/nvme0n1': NVME0N1_VDB_WITH_GRUB}, True)
|
||||
+ ]
|
||||
+)
|
||||
+def test_check_legacy_grub(monkeypatch, grub_device_to_file_output, should_inhibit):
|
||||
+
|
||||
+ def file_cmd_mock(cmd, *args, **kwargs):
|
||||
+ assert cmd[:2] == ['file', '-s']
|
||||
+ return {'stdout': grub_device_to_file_output[cmd[2]]}
|
||||
+
|
||||
+ monkeypatch.setattr(check_legacy_grub_lib, 'create_report', create_report_mocked())
|
||||
+ monkeypatch.setattr(grub_lib, 'get_grub_devices', lambda: list(grub_device_to_file_output.keys()))
|
||||
+ monkeypatch.setattr(check_legacy_grub_lib, 'run', file_cmd_mock)
|
||||
+
|
||||
+ check_legacy_grub_lib.check_grub_disks_for_legacy_grub()
|
||||
+
|
||||
+ assert bool(check_legacy_grub_lib.create_report.called) == should_inhibit
|
||||
+ if should_inhibit:
|
||||
+ assert len(check_legacy_grub_lib.create_report.reports) == 1
|
||||
+ report = check_legacy_grub_lib.create_report.reports[0]
|
||||
+ assert is_inhibitor(report)
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,46 @@
|
||||
From a4e3906fff5d11e0fb94f5dbe10ed653dc2d0bee Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Matej=20Matu=C5=A1ka?= <mmatuska@redhat.com>
|
||||
Date: Tue, 23 Apr 2024 23:56:57 +0200
|
||||
Subject: [PATCH 12/34] Default channel to GA is not specified otherwise
|
||||
(#1205)
|
||||
|
||||
Originally we tried to map by default repositories from particular channels on the source system to their equivalents on the target system. IOW:
|
||||
|
||||
* eus -> eus
|
||||
* aus -> aus
|
||||
* e4s -> e4s
|
||||
* "ga" -> "ga"
|
||||
...
|
||||
|
||||
However, it has been revealed this logic should not apply on minor releases for which these non-ga (premium) repositories do not exist. So doing upgrade e.g. to 8.9, 8.10 , 9.3 for which specific eus, etc.. repositories are not defined lead to 404 error.
|
||||
|
||||
Discussing this deeply between stakeholders, it has been decided to drop this logic and target always to "ga" repositories unless the leapp is executed with instructions to choose a different channel (using envars, --channel .. option). To prevent this issue.
|
||||
|
||||
It's still possible to require mistakenly e.g. "eus" channel for the target release for which the related repositories are not defined. e.g.:
|
||||
> leapp upgrade --channel eus --target 8.10
|
||||
|
||||
In such a case, the previous errors (404 Not found) can be hit again. But it will not happen by default. In this case, we expect and request people to understand what they want when they use the option.
|
||||
|
||||
@pirat89 : Updated commit msg
|
||||
|
||||
jira: RHEL-24720
|
||||
---
|
||||
commands/upgrade/util.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
||||
index b11265ee..9eff0ad1 100644
|
||||
--- a/commands/upgrade/util.py
|
||||
+++ b/commands/upgrade/util.py
|
||||
@@ -207,6 +207,8 @@ def prepare_configuration(args):
|
||||
|
||||
if args.channel:
|
||||
os.environ['LEAPP_TARGET_PRODUCT_CHANNEL'] = args.channel
|
||||
+ elif 'LEAPP_TARGET_PRODUCT_CHANNEL' not in os.environ:
|
||||
+ os.environ['LEAPP_TARGET_PRODUCT_CHANNEL'] = 'ga'
|
||||
|
||||
if args.iso:
|
||||
os.environ['LEAPP_TARGET_ISO'] = args.iso
|
||||
--
|
||||
2.42.0
|
||||
|
39
0013-Enhance-grub2-install-failure-message.patch
Normal file
39
0013-Enhance-grub2-install-failure-message.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 6d05575efdd6c3c728e784add3017d072eda4d5e Mon Sep 17 00:00:00 2001
|
||||
From: Toshio Kuratomi <tkuratom@redhat.com>
|
||||
Date: Tue, 23 Apr 2024 14:03:44 -0700
|
||||
Subject: [PATCH 13/34] Enhance grub2 install failure message.
|
||||
|
||||
The new message informs the useir will happen (they will boot into the old RHEL's kernel) so they
|
||||
understand why they need to run the remediation.
|
||||
|
||||
jira: https://issues.redhat.com/browse/RHEL-29683
|
||||
---
|
||||
.../common/actors/checkgrubcore/actor.py | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkgrubcore/actor.py b/repos/system_upgrade/common/actors/checkgrubcore/actor.py
|
||||
index ae9e53ef..662c4d64 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkgrubcore/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkgrubcore/actor.py
|
||||
@@ -46,11 +46,15 @@ class CheckGrubCore(Actor):
|
||||
reporting.Title('Leapp could not identify where GRUB2 core is located'),
|
||||
reporting.Summary(
|
||||
'We assumed GRUB2 core is located on the same device(s) as /boot, '
|
||||
- 'however Leapp could not detect GRUB2 on the device(s). '
|
||||
- 'GRUB2 core needs to be updated maually on legacy (BIOS) systems. '
|
||||
+ 'however Leapp could not detect GRUB2 on those device(s). '
|
||||
+ 'This means GRUB2 core will not be updated during the upgrade process and '
|
||||
+ 'the system will probably ' 'boot into the old kernel after the upgrade. '
|
||||
+ 'GRUB2 core needs to be updated manually on legacy (BIOS) systems to '
|
||||
+ 'fix this.'
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.BOOT]),
|
||||
reporting.Remediation(
|
||||
- hint='Please run "grub2-install <GRUB_DEVICE> command manually after the upgrade'),
|
||||
+ hint='Please run the "grub2-install <GRUB_DEVICE>" command manually '
|
||||
+ 'after the upgrade'),
|
||||
])
|
||||
--
|
||||
2.42.0
|
||||
|
388
0014-boot-check-first-partition-offset-on-GRUB-devices.patch
Normal file
388
0014-boot-check-first-partition-offset-on-GRUB-devices.patch
Normal file
@ -0,0 +1,388 @@
|
||||
From ea6cd7912ce650f033a972921a2b29636ac304db Mon Sep 17 00:00:00 2001
|
||||
From: mhecko <mhecko@redhat.com>
|
||||
Date: Tue, 2 Apr 2024 19:29:16 +0200
|
||||
Subject: [PATCH 14/34] boot: check first partition offset on GRUB devices
|
||||
|
||||
Check that the first partition starts at least at 1MiB (2048 cylinders),
|
||||
as too small first-partition offsets lead to failures when doing
|
||||
grub2-install. The limit (1MiB) has been chosen as it is a common
|
||||
value set by the disk formatting tools nowadays.
|
||||
|
||||
jira: https://issues.redhat.com/browse/RHEL-3341
|
||||
---
|
||||
.../actors/checkfirstpartitionoffset/actor.py | 24 ++++++
|
||||
.../libraries/check_first_partition_offset.py | 52 +++++++++++++
|
||||
.../test_check_first_partition_offset.py | 51 ++++++++++++
|
||||
.../scangrubdevpartitionlayout/actor.py | 18 +++++
|
||||
.../libraries/scan_layout.py | 64 +++++++++++++++
|
||||
.../tests/test_scan_partition_layout.py | 78 +++++++++++++++++++
|
||||
.../el7toel8/models/partitionlayout.py | 28 +++++++
|
||||
7 files changed, 315 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/actor.py
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/libraries/check_first_partition_offset.py
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/tests/test_check_first_partition_offset.py
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/actor.py
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py
|
||||
create mode 100644 repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/tests/test_scan_partition_layout.py
|
||||
create mode 100644 repos/system_upgrade/el7toel8/models/partitionlayout.py
|
||||
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/actor.py b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..cde27c2a
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/actor.py
|
||||
@@ -0,0 +1,24 @@
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.libraries.actor import check_first_partition_offset
|
||||
+from leapp.models import FirmwareFacts, GRUBDevicePartitionLayout
|
||||
+from leapp.reporting import Report
|
||||
+from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+
|
||||
+class CheckFirstPartitionOffset(Actor):
|
||||
+ """
|
||||
+ Check whether the first partition starts at the offset >=1MiB.
|
||||
+
|
||||
+ The alignment of the first partition plays role in disk access speeds. Older tools placed the start of the first
|
||||
+ partition at cylinder 63 (due to historical reasons connected to the INT13h BIOS API). However, grub core
|
||||
+ binary is placed before the start of the first partition, meaning that not enough space causes bootloader
|
||||
+ installation to fail. Modern partitioning tools place the first partition at >= 1MiB (cylinder 2048+).
|
||||
+ """
|
||||
+
|
||||
+ name = 'check_first_partition_offset'
|
||||
+ consumes = (FirmwareFacts, GRUBDevicePartitionLayout,)
|
||||
+ produces = (Report,)
|
||||
+ tags = (ChecksPhaseTag, IPUWorkflowTag,)
|
||||
+
|
||||
+ def process(self):
|
||||
+ check_first_partition_offset.check_first_partition_offset()
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/libraries/check_first_partition_offset.py b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/libraries/check_first_partition_offset.py
|
||||
new file mode 100644
|
||||
index 00000000..fbd4e178
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/libraries/check_first_partition_offset.py
|
||||
@@ -0,0 +1,52 @@
|
||||
+from leapp import reporting
|
||||
+from leapp.libraries.common.config import architecture
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import FirmwareFacts, GRUBDevicePartitionLayout
|
||||
+
|
||||
+SAFE_OFFSET_BYTES = 1024*1024 # 1MiB
|
||||
+
|
||||
+
|
||||
+def check_first_partition_offset():
|
||||
+ if architecture.matches_architecture(architecture.ARCH_S390X):
|
||||
+ return
|
||||
+
|
||||
+ for fact in api.consume(FirmwareFacts):
|
||||
+ if fact.firmware == 'efi':
|
||||
+ return # Skip EFI system
|
||||
+
|
||||
+ problematic_devices = []
|
||||
+ for grub_dev in api.consume(GRUBDevicePartitionLayout):
|
||||
+ first_partition = min(grub_dev.partitions, key=lambda partition: partition.start_offset)
|
||||
+ if first_partition.start_offset < SAFE_OFFSET_BYTES:
|
||||
+ problematic_devices.append(grub_dev.device)
|
||||
+
|
||||
+ if problematic_devices:
|
||||
+ summary = (
|
||||
+ 'On the system booting by using BIOS, the in-place upgrade fails '
|
||||
+ 'when upgrading the GRUB2 bootloader if the boot disk\'s embedding area '
|
||||
+ 'does not contain enough space for the core image installation. '
|
||||
+ 'This results in a broken system, and can occur when the disk has been '
|
||||
+ 'partitioned manually, for example using the RHEL 6 fdisk utility.\n\n'
|
||||
+
|
||||
+ 'The list of devices with small embedding area:\n'
|
||||
+ '{0}.'
|
||||
+ )
|
||||
+ problematic_devices_fmt = ['- {0}'.format(dev) for dev in problematic_devices]
|
||||
+
|
||||
+ hint = (
|
||||
+ 'We recommend to perform a fresh installation of the RHEL 8 system '
|
||||
+ 'instead of performing the in-place upgrade.\n'
|
||||
+ 'Another possibility is to reformat the devices so that there is '
|
||||
+ 'at least {0} kiB space before the first partition. '
|
||||
+ 'Note that this operation is not supported and does not have to be '
|
||||
+ 'always possible.'
|
||||
+ )
|
||||
+
|
||||
+ reporting.create_report([
|
||||
+ reporting.Title('Found GRUB devices with too little space reserved before the first partition'),
|
||||
+ reporting.Summary(summary.format('\n'.join(problematic_devices_fmt))),
|
||||
+ reporting.Remediation(hint=hint.format(SAFE_OFFSET_BYTES // 1024)),
|
||||
+ reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Groups([reporting.Groups.BOOT]),
|
||||
+ reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
+ ])
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/tests/test_check_first_partition_offset.py b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/tests/test_check_first_partition_offset.py
|
||||
new file mode 100644
|
||||
index 00000000..e349ff7d
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/tests/test_check_first_partition_offset.py
|
||||
@@ -0,0 +1,51 @@
|
||||
+import pytest
|
||||
+
|
||||
+from leapp import reporting
|
||||
+from leapp.libraries.actor import check_first_partition_offset
|
||||
+from leapp.libraries.common import grub
|
||||
+from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import FirmwareFacts, GRUBDevicePartitionLayout, PartitionInfo
|
||||
+from leapp.reporting import Report
|
||||
+from leapp.utils.report import is_inhibitor
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('devices', 'should_report'),
|
||||
+ [
|
||||
+ (
|
||||
+ [
|
||||
+ GRUBDevicePartitionLayout(device='/dev/vda',
|
||||
+ partitions=[PartitionInfo(part_device='/dev/vda1', start_offset=32256)])
|
||||
+ ],
|
||||
+ True
|
||||
+ ),
|
||||
+ (
|
||||
+ [
|
||||
+ GRUBDevicePartitionLayout(device='/dev/vda',
|
||||
+ partitions=[PartitionInfo(part_device='/dev/vda1', start_offset=1024*1025)])
|
||||
+ ],
|
||||
+ False
|
||||
+ ),
|
||||
+ (
|
||||
+ [
|
||||
+ GRUBDevicePartitionLayout(device='/dev/vda',
|
||||
+ partitions=[PartitionInfo(part_device='/dev/vda1', start_offset=1024*1024)])
|
||||
+ ],
|
||||
+ False
|
||||
+ )
|
||||
+ ]
|
||||
+)
|
||||
+def test_bad_offset_reported(monkeypatch, devices, should_report):
|
||||
+ def consume_mocked(model_cls):
|
||||
+ if model_cls == FirmwareFacts:
|
||||
+ return [FirmwareFacts(firmware='bios')]
|
||||
+ return devices
|
||||
+
|
||||
+ monkeypatch.setattr(api, 'consume', consume_mocked)
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
+ monkeypatch.setattr(reporting, 'create_report', create_report_mocked())
|
||||
+
|
||||
+ check_first_partition_offset.check_first_partition_offset()
|
||||
+
|
||||
+ assert bool(reporting.create_report.called) == should_report
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/actor.py b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..0db93aba
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/actor.py
|
||||
@@ -0,0 +1,18 @@
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.libraries.actor import scan_layout as scan_layout_lib
|
||||
+from leapp.models import GRUBDevicePartitionLayout, GrubInfo
|
||||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+
|
||||
+class ScanGRUBDevicePartitionLayout(Actor):
|
||||
+ """
|
||||
+ Scan all identified GRUB devices for their partition layout.
|
||||
+ """
|
||||
+
|
||||
+ name = 'scan_grub_device_partition_layout'
|
||||
+ consumes = (GrubInfo,)
|
||||
+ produces = (GRUBDevicePartitionLayout,)
|
||||
+ tags = (FactsPhaseTag, IPUWorkflowTag,)
|
||||
+
|
||||
+ def process(self):
|
||||
+ scan_layout_lib.scan_grub_device_partition_layout()
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py
|
||||
new file mode 100644
|
||||
index 00000000..bb2e6d9e
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py
|
||||
@@ -0,0 +1,64 @@
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
+from leapp.models import GRUBDevicePartitionLayout, GrubInfo, PartitionInfo
|
||||
+
|
||||
+SAFE_OFFSET_BYTES = 1024*1024 # 1MiB
|
||||
+
|
||||
+
|
||||
+def split_on_space_segments(line):
|
||||
+ fragments = (fragment.strip() for fragment in line.split(' '))
|
||||
+ return [fragment for fragment in fragments if fragment]
|
||||
+
|
||||
+
|
||||
+def get_partition_layout(device):
|
||||
+ try:
|
||||
+ partition_table = run(['fdisk', '-l', '-u=sectors', device], split=True)['stdout']
|
||||
+ except CalledProcessError as err:
|
||||
+ # Unlikely - if the disk has no partition table, `fdisk` terminates with 0 (no err). Fdisk exits with an err
|
||||
+ # when the device does not exists, or if it is too small to contain a partition table.
|
||||
+
|
||||
+ err_msg = 'Failed to run `fdisk` to obtain the partition table of the device {0}. Full error: \'{1}\''
|
||||
+ api.current_logger().error(err_msg.format(device, str(err)))
|
||||
+ return None
|
||||
+
|
||||
+ table_iter = iter(partition_table)
|
||||
+
|
||||
+ for line in table_iter:
|
||||
+ if not line.startswith('Units'):
|
||||
+ # We are still reading general device information and not the table itself
|
||||
+ continue
|
||||
+
|
||||
+ unit = line.split('=')[2].strip() # Contains '512 bytes'
|
||||
+ unit = int(unit.split(' ')[0].strip())
|
||||
+ break # First line of the partition table header
|
||||
+
|
||||
+ for line in table_iter:
|
||||
+ line = line.strip()
|
||||
+ if not line.startswith('Device'):
|
||||
+ continue
|
||||
+
|
||||
+ part_all_attrs = split_on_space_segments(line)
|
||||
+ break
|
||||
+
|
||||
+ partitions = []
|
||||
+ for partition_line in table_iter:
|
||||
+ # Fields: Device Boot Start End Sectors Size Id Type
|
||||
+ # The line looks like: `/dev/vda1 * 2048 2099199 2097152 1G 83 Linux`
|
||||
+ part_info = split_on_space_segments(partition_line)
|
||||
+
|
||||
+ # If the partition is not bootable, the Boot column might be empty
|
||||
+ part_device = part_info[0]
|
||||
+ part_start = int(part_info[2]) if len(part_info) == len(part_all_attrs) else int(part_info[1])
|
||||
+ partitions.append(PartitionInfo(part_device=part_device, start_offset=part_start*unit))
|
||||
+
|
||||
+ return GRUBDevicePartitionLayout(device=device, partitions=partitions)
|
||||
+
|
||||
+
|
||||
+def scan_grub_device_partition_layout():
|
||||
+ grub_devices = next(api.consume(GrubInfo), None)
|
||||
+ if not grub_devices:
|
||||
+ return
|
||||
+
|
||||
+ for device in grub_devices.orig_devices:
|
||||
+ dev_info = get_partition_layout(device)
|
||||
+ if dev_info:
|
||||
+ api.produce(dev_info)
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/tests/test_scan_partition_layout.py b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/tests/test_scan_partition_layout.py
|
||||
new file mode 100644
|
||||
index 00000000..37bb5bcf
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/tests/test_scan_partition_layout.py
|
||||
@@ -0,0 +1,78 @@
|
||||
+from collections import namedtuple
|
||||
+
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.actor import scan_layout as scan_layout_lib
|
||||
+from leapp.libraries.common import grub
|
||||
+from leapp.libraries.common.testutils import create_report_mocked, produce_mocked
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import GRUBDevicePartitionLayout, GrubInfo
|
||||
+from leapp.utils.report import is_inhibitor
|
||||
+
|
||||
+Device = namedtuple('Device', ['name', 'partitions', 'sector_size'])
|
||||
+Partition = namedtuple('Partition', ['name', 'start_offset'])
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ 'devices',
|
||||
+ [
|
||||
+ (
|
||||
+ Device(name='/dev/vda', sector_size=512,
|
||||
+ partitions=[Partition(name='/dev/vda1', start_offset=63),
|
||||
+ Partition(name='/dev/vda2', start_offset=1000)]),
|
||||
+ Device(name='/dev/vdb', sector_size=1024,
|
||||
+ partitions=[Partition(name='/dev/vdb1', start_offset=100),
|
||||
+ Partition(name='/dev/vdb2', start_offset=20000)])
|
||||
+ ),
|
||||
+ (
|
||||
+ Device(name='/dev/vda', sector_size=512,
|
||||
+ partitions=[Partition(name='/dev/vda1', start_offset=111),
|
||||
+ Partition(name='/dev/vda2', start_offset=1000)]),
|
||||
+ )
|
||||
+ ]
|
||||
+)
|
||||
+def test_get_partition_layout(monkeypatch, devices):
|
||||
+ device_to_fdisk_output = {}
|
||||
+ for device in devices:
|
||||
+ fdisk_output = [
|
||||
+ 'Disk {0}: 42.9 GB, 42949672960 bytes, 83886080 sectors'.format(device.name),
|
||||
+ 'Units = sectors of 1 * {sector_size} = {sector_size} bytes'.format(sector_size=device.sector_size),
|
||||
+ 'Sector size (logical/physical): 512 bytes / 512 bytes',
|
||||
+ 'I/O size (minimum/optimal): 512 bytes / 512 bytes',
|
||||
+ 'Disk label type: dos',
|
||||
+ 'Disk identifier: 0x0000000da',
|
||||
+ '',
|
||||
+ ' Device Boot Start End Blocks Id System',
|
||||
+ ]
|
||||
+ for part in device.partitions:
|
||||
+ part_line = '{0} * {1} 2099199 1048576 83 Linux'.format(part.name, part.start_offset)
|
||||
+ fdisk_output.append(part_line)
|
||||
+
|
||||
+ device_to_fdisk_output[device.name] = fdisk_output
|
||||
+
|
||||
+ def mocked_run(cmd, *args, **kwargs):
|
||||
+ assert cmd[:3] == ['fdisk', '-l', '-u=sectors']
|
||||
+ device = cmd[3]
|
||||
+ output = device_to_fdisk_output[device]
|
||||
+ return {'stdout': output}
|
||||
+
|
||||
+ def consume_mocked(*args, **kwargs):
|
||||
+ yield GrubInfo(orig_devices=[device.name for device in devices])
|
||||
+
|
||||
+ monkeypatch.setattr(scan_layout_lib, 'run', mocked_run)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+ monkeypatch.setattr(api, 'consume', consume_mocked)
|
||||
+
|
||||
+ scan_layout_lib.scan_grub_device_partition_layout()
|
||||
+
|
||||
+ assert api.produce.called == len(devices)
|
||||
+
|
||||
+ dev_name_to_desc = {dev.name: dev for dev in devices}
|
||||
+
|
||||
+ for message in api.produce.model_instances:
|
||||
+ assert isinstance(message, GRUBDevicePartitionLayout)
|
||||
+ dev = dev_name_to_desc[message.device]
|
||||
+
|
||||
+ expected_part_name_to_start = {part.name: part.start_offset*dev.sector_size for part in dev.partitions}
|
||||
+ actual_part_name_to_start = {part.part_device: part.start_offset for part in message.partitions}
|
||||
+ assert expected_part_name_to_start == actual_part_name_to_start
|
||||
diff --git a/repos/system_upgrade/el7toel8/models/partitionlayout.py b/repos/system_upgrade/el7toel8/models/partitionlayout.py
|
||||
new file mode 100644
|
||||
index 00000000..c6483283
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el7toel8/models/partitionlayout.py
|
||||
@@ -0,0 +1,28 @@
|
||||
+from leapp.models import fields, Model
|
||||
+from leapp.topics import SystemInfoTopic
|
||||
+
|
||||
+
|
||||
+class PartitionInfo(Model):
|
||||
+ """
|
||||
+ Information about a single partition.
|
||||
+ """
|
||||
+ topic = SystemInfoTopic
|
||||
+
|
||||
+ part_device = fields.String()
|
||||
+ """ Partition device """
|
||||
+
|
||||
+ start_offset = fields.Integer()
|
||||
+ """ Partition start - offset from the start of the block device in bytes """
|
||||
+
|
||||
+
|
||||
+class GRUBDevicePartitionLayout(Model):
|
||||
+ """
|
||||
+ Information about partition layout of a GRUB device.
|
||||
+ """
|
||||
+ topic = SystemInfoTopic
|
||||
+
|
||||
+ device = fields.String()
|
||||
+ """ GRUB device """
|
||||
+
|
||||
+ partitions = fields.List(fields.Model(PartitionInfo))
|
||||
+ """ List of partitions present on the device """
|
||||
--
|
||||
2.42.0
|
||||
|
138
0015-boot-Skip-checks-of-first-partition-offset-for-for-g.patch
Normal file
138
0015-boot-Skip-checks-of-first-partition-offset-for-for-g.patch
Normal file
@ -0,0 +1,138 @@
|
||||
From 683176dbeeeff32cc6b04410b4f7e4715a3de8e0 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 24 Apr 2024 01:09:51 +0200
|
||||
Subject: [PATCH 15/34] boot: Skip checks of first partition offset for for gpt
|
||||
partition table
|
||||
|
||||
This is extension of the previous commit. The original problem that
|
||||
we are trying to resolve is to be sure the embedding area (MBR gap)
|
||||
has expected size. This is irrelevant in case of GPT partition table
|
||||
is used on a device. The fdisk output format is in case of GPT
|
||||
disk label different, which breaks the parsing, resulting in empty
|
||||
list of partitions in related GRUBDevicePartitionLayout msg.
|
||||
|
||||
For now, let's skip produce of msgs for "GPT devices". As a seatbelt,
|
||||
ignore processing of messages with empty partitions field, expecting
|
||||
that such a device does not contain MBR. We want to prevent false
|
||||
positive inhibitors (and FP blocking errors). We expect that total
|
||||
number of machines with small embedding area is very minor in total
|
||||
numbers, so even if we would miss something (which is not expected
|
||||
now to our best knowledge) it's still good trade-off as the major
|
||||
goal is to reduce number of machines that have problems with the
|
||||
in-place upgrade.
|
||||
|
||||
The solution can be updated in future if there is a reason for it.
|
||||
---
|
||||
.../libraries/check_first_partition_offset.py | 7 +++++
|
||||
.../test_check_first_partition_offset.py | 16 +++++++++++
|
||||
.../libraries/scan_layout.py | 28 +++++++++++++++++++
|
||||
.../tests/test_scan_partition_layout.py | 5 ++++
|
||||
4 files changed, 56 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/libraries/check_first_partition_offset.py b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/libraries/check_first_partition_offset.py
|
||||
index fbd4e178..fca9c3ff 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/libraries/check_first_partition_offset.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/libraries/check_first_partition_offset.py
|
||||
@@ -16,6 +16,13 @@ def check_first_partition_offset():
|
||||
|
||||
problematic_devices = []
|
||||
for grub_dev in api.consume(GRUBDevicePartitionLayout):
|
||||
+ if not grub_dev.partitions:
|
||||
+ # NOTE(pstodulk): In case of empty partition list we have nothing to do.
|
||||
+ # This can could happen when the fdisk output is different then expected.
|
||||
+ # E.g. when GPT partition table is used on the disk. We are right now
|
||||
+ # interested strictly about MBR only, so ignoring these cases.
|
||||
+ # This is seatbelt, as the msg should not be produced for GPT at all.
|
||||
+ continue
|
||||
first_partition = min(grub_dev.partitions, key=lambda partition: partition.start_offset)
|
||||
if first_partition.start_offset < SAFE_OFFSET_BYTES:
|
||||
problematic_devices.append(grub_dev.device)
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/tests/test_check_first_partition_offset.py b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/tests/test_check_first_partition_offset.py
|
||||
index e349ff7d..f925f7d4 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/tests/test_check_first_partition_offset.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checkfirstpartitionoffset/tests/test_check_first_partition_offset.py
|
||||
@@ -20,6 +20,16 @@ from leapp.utils.report import is_inhibitor
|
||||
],
|
||||
True
|
||||
),
|
||||
+ (
|
||||
+ [
|
||||
+ GRUBDevicePartitionLayout(device='/dev/vda',
|
||||
+ partitions=[
|
||||
+ PartitionInfo(part_device='/dev/vda2', start_offset=1024*1025),
|
||||
+ PartitionInfo(part_device='/dev/vda1', start_offset=32256)
|
||||
+ ])
|
||||
+ ],
|
||||
+ True
|
||||
+ ),
|
||||
(
|
||||
[
|
||||
GRUBDevicePartitionLayout(device='/dev/vda',
|
||||
@@ -33,6 +43,12 @@ from leapp.utils.report import is_inhibitor
|
||||
partitions=[PartitionInfo(part_device='/dev/vda1', start_offset=1024*1024)])
|
||||
],
|
||||
False
|
||||
+ ),
|
||||
+ (
|
||||
+ [
|
||||
+ GRUBDevicePartitionLayout(device='/dev/vda', partitions=[])
|
||||
+ ],
|
||||
+ False
|
||||
)
|
||||
]
|
||||
)
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py
|
||||
index bb2e6d9e..f51bcda4 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/libraries/scan_layout.py
|
||||
@@ -31,6 +31,34 @@ def get_partition_layout(device):
|
||||
unit = int(unit.split(' ')[0].strip())
|
||||
break # First line of the partition table header
|
||||
|
||||
+ # Discover disk label type: dos | gpt
|
||||
+ for line in table_iter:
|
||||
+ line = line.strip()
|
||||
+ if not line.startswith('Disk label type'):
|
||||
+ continue
|
||||
+ disk_type = line.split(':')[1].strip()
|
||||
+ break
|
||||
+
|
||||
+ if disk_type == 'gpt':
|
||||
+ api.current_logger().info(
|
||||
+ 'Detected GPT partition table. Skipping produce of GRUBDevicePartitionLayout message.'
|
||||
+ )
|
||||
+ # NOTE(pstodulk): The GPT table has a different output format than
|
||||
+ # expected below, example (ignore start/end lines):
|
||||
+ # --------------------------- start ----------------------------------
|
||||
+ # # Start End Size Type Name
|
||||
+ # 1 2048 4095 1M BIOS boot
|
||||
+ # 2 4096 2101247 1G Microsoft basic
|
||||
+ # 3 2101248 41940991 19G Linux LVM
|
||||
+ # ---------------------------- end -----------------------------------
|
||||
+ # But mainly, in case of GPT, we have nothing to actually check as
|
||||
+ # we are gathering this data now mainly to get information about the
|
||||
+ # actual size of embedding area (MBR gap). In case of GPT, there is
|
||||
+ # bios boot / prep boot partition, which has always 1 MiB and fulfill
|
||||
+ # our expectations. So skip in this case another processing and generation
|
||||
+ # of the msg. Let's improve it in future if we find a reason for it.
|
||||
+ return None
|
||||
+
|
||||
for line in table_iter:
|
||||
line = line.strip()
|
||||
if not line.startswith('Device'):
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/tests/test_scan_partition_layout.py b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/tests/test_scan_partition_layout.py
|
||||
index 37bb5bcf..54025379 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/tests/test_scan_partition_layout.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/scangrubdevpartitionlayout/tests/test_scan_partition_layout.py
|
||||
@@ -76,3 +76,8 @@ def test_get_partition_layout(monkeypatch, devices):
|
||||
expected_part_name_to_start = {part.name: part.start_offset*dev.sector_size for part in dev.partitions}
|
||||
actual_part_name_to_start = {part.part_device: part.start_offset for part in message.partitions}
|
||||
assert expected_part_name_to_start == actual_part_name_to_start
|
||||
+
|
||||
+
|
||||
+def test_get_partition_layout_gpt(monkeypatch):
|
||||
+ # TODO(pstodulk): skipping for now, due to time pressure. Testing for now manually.
|
||||
+ pass
|
||||
--
|
||||
2.42.0
|
||||
|
152
0016-repomapping-Add-RHEL7-ELS-repos.patch
Normal file
152
0016-repomapping-Add-RHEL7-ELS-repos.patch
Normal file
@ -0,0 +1,152 @@
|
||||
From 8d84c02b92f3a7a7d74a272aa31d5b0a0f24faea Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Thu, 11 Apr 2024 15:56:51 +0200
|
||||
Subject: [PATCH 16/34] repomapping: Add RHEL7 ELS repos
|
||||
|
||||
RHEL-21891
|
||||
---
|
||||
etc/leapp/files/repomap.json | 60 ++++++++++++++++++-
|
||||
.../common/models/repositoriesmap.py | 2 +-
|
||||
2 files changed, 59 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/etc/leapp/files/repomap.json b/etc/leapp/files/repomap.json
|
||||
index 57cab1ad..1ee6c56a 100644
|
||||
--- a/etc/leapp/files/repomap.json
|
||||
+++ b/etc/leapp/files/repomap.json
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
- "datetime": "202401261328Z",
|
||||
- "version_format": "1.2.0",
|
||||
+ "datetime": "202404091246Z",
|
||||
+ "version_format": "1.2.1",
|
||||
"mapping": [
|
||||
{
|
||||
"source_major_version": "7",
|
||||
@@ -303,6 +303,13 @@
|
||||
"channel": "beta",
|
||||
"repo_type": "rpm"
|
||||
},
|
||||
+ {
|
||||
+ "major_version": "7",
|
||||
+ "repoid": "rhel-7-for-system-z-els-rpms",
|
||||
+ "arch": "s390x",
|
||||
+ "channel": "els",
|
||||
+ "repo_type": "rpm"
|
||||
+ },
|
||||
{
|
||||
"major_version": "7",
|
||||
"repoid": "rhel-7-for-system-z-eus-rpms",
|
||||
@@ -346,6 +353,13 @@
|
||||
"channel": "e4s",
|
||||
"repo_type": "rpm"
|
||||
},
|
||||
+ {
|
||||
+ "major_version": "7",
|
||||
+ "repoid": "rhel-7-server-els-rpms",
|
||||
+ "arch": "x86_64",
|
||||
+ "channel": "els",
|
||||
+ "repo_type": "rpm"
|
||||
+ },
|
||||
{
|
||||
"major_version": "7",
|
||||
"repoid": "rhel-7-server-eus-rpms",
|
||||
@@ -486,6 +500,13 @@
|
||||
"channel": "ga",
|
||||
"repo_type": "rpm"
|
||||
},
|
||||
+ {
|
||||
+ "major_version": "7",
|
||||
+ "repoid": "rhel-7-for-system-z-els-optional-rpms",
|
||||
+ "arch": "s390x",
|
||||
+ "channel": "els",
|
||||
+ "repo_type": "rpm"
|
||||
+ },
|
||||
{
|
||||
"major_version": "7",
|
||||
"repoid": "rhel-7-for-system-z-eus-optional-rpms",
|
||||
@@ -529,6 +550,13 @@
|
||||
"channel": "e4s",
|
||||
"repo_type": "rpm"
|
||||
},
|
||||
+ {
|
||||
+ "major_version": "7",
|
||||
+ "repoid": "rhel-7-server-els-optional-rpms",
|
||||
+ "arch": "x86_64",
|
||||
+ "channel": "els",
|
||||
+ "repo_type": "rpm"
|
||||
+ },
|
||||
{
|
||||
"major_version": "7",
|
||||
"repoid": "rhel-7-server-eus-optional-rpms",
|
||||
@@ -892,6 +920,13 @@
|
||||
"channel": "beta",
|
||||
"repo_type": "rpm"
|
||||
},
|
||||
+ {
|
||||
+ "major_version": "7",
|
||||
+ "repoid": "rhel-sap-for-rhel-7-for-system-z-els-rpms",
|
||||
+ "arch": "s390x",
|
||||
+ "channel": "els",
|
||||
+ "repo_type": "rpm"
|
||||
+ },
|
||||
{
|
||||
"major_version": "7",
|
||||
"repoid": "rhel-sap-for-rhel-7-for-system-z-eus-rpms",
|
||||
@@ -920,6 +955,13 @@
|
||||
"channel": "e4s",
|
||||
"repo_type": "rpm"
|
||||
},
|
||||
+ {
|
||||
+ "major_version": "7",
|
||||
+ "repoid": "rhel-sap-for-rhel-7-server-els-rpms",
|
||||
+ "arch": "x86_64",
|
||||
+ "channel": "els",
|
||||
+ "repo_type": "rpm"
|
||||
+ },
|
||||
{
|
||||
"major_version": "7",
|
||||
"repoid": "rhel-sap-for-rhel-7-server-eus-rhui-rpms",
|
||||
@@ -1022,6 +1064,13 @@
|
||||
"channel": "e4s",
|
||||
"repo_type": "rpm"
|
||||
},
|
||||
+ {
|
||||
+ "major_version": "7",
|
||||
+ "repoid": "rhel-sap-hana-for-rhel-7-server-els-rpms",
|
||||
+ "arch": "x86_64",
|
||||
+ "channel": "els",
|
||||
+ "repo_type": "rpm"
|
||||
+ },
|
||||
{
|
||||
"major_version": "7",
|
||||
"repoid": "rhel-sap-hana-for-rhel-7-server-eus-rhui-rpms",
|
||||
@@ -1125,6 +1174,13 @@
|
||||
"channel": "e4s",
|
||||
"repo_type": "rpm"
|
||||
},
|
||||
+ {
|
||||
+ "major_version": "7",
|
||||
+ "repoid": "rhel-ha-for-rhel-7-server-els-rpms",
|
||||
+ "arch": "x86_64",
|
||||
+ "channel": "els",
|
||||
+ "repo_type": "rpm"
|
||||
+ },
|
||||
{
|
||||
"major_version": "7",
|
||||
"repoid": "rhel-ha-for-rhel-7-server-eus-rhui-rpms",
|
||||
diff --git a/repos/system_upgrade/common/models/repositoriesmap.py b/repos/system_upgrade/common/models/repositoriesmap.py
|
||||
index 7ef0bdb4..7192a60d 100644
|
||||
--- a/repos/system_upgrade/common/models/repositoriesmap.py
|
||||
+++ b/repos/system_upgrade/common/models/repositoriesmap.py
|
||||
@@ -61,7 +61,7 @@ class PESIDRepositoryEntry(Model):
|
||||
too.
|
||||
"""
|
||||
|
||||
- channel = fields.StringEnum(['ga', 'e4s', 'eus', 'aus', 'beta'])
|
||||
+ channel = fields.StringEnum(['ga', 'e4s', 'eus', 'aus', 'beta', 'els'])
|
||||
"""
|
||||
The 'channel' of the repository.
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
25
0017-bump-required-repomap-version.patch
Normal file
25
0017-bump-required-repomap-version.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From f154c6566a2fbeb4fe64405794b6777c156cabcb Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 15 Apr 2024 17:13:03 +0200
|
||||
Subject: [PATCH 17/34] bump required repomap version
|
||||
|
||||
---
|
||||
.../actors/repositoriesmapping/libraries/repositoriesmapping.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py b/repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
|
||||
index 8045634e..58089195 100644
|
||||
--- a/repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
|
||||
+++ b/repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
|
||||
@@ -17,7 +17,7 @@ REPOMAP_FILE = 'repomap.json'
|
||||
|
||||
|
||||
class RepoMapData(object):
|
||||
- VERSION_FORMAT = '1.2.0'
|
||||
+ VERSION_FORMAT = '1.2.1'
|
||||
|
||||
def __init__(self):
|
||||
self.repositories = []
|
||||
--
|
||||
2.42.0
|
||||
|
24
0018-fixup-bump-required-repomap-version.patch
Normal file
24
0018-fixup-bump-required-repomap-version.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 6dc1621c4395412724d8cccf7a2694013fb4f5f0 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Mon, 15 Apr 2024 17:25:07 +0200
|
||||
Subject: [PATCH 18/34] fixup! bump required repomap version
|
||||
|
||||
---
|
||||
.../actors/repositoriesmapping/tests/files/repomap_example.json | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json b/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
|
||||
index 5e95f5fe..a5fc5fe1 100644
|
||||
--- a/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
|
||||
+++ b/repos/system_upgrade/common/actors/repositoriesmapping/tests/files/repomap_example.json
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"datetime": "202107141655Z",
|
||||
- "version_format": "1.2.0",
|
||||
+ "version_format": "1.2.1",
|
||||
"mapping": [
|
||||
{
|
||||
"source_major_version": "7",
|
||||
--
|
||||
2.42.0
|
||||
|
33
0019-Fix-incorrect-command-formulation.patch
Normal file
33
0019-Fix-incorrect-command-formulation.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From a5bd2546f748ddac4240b3a34b168e422ef78c99 Mon Sep 17 00:00:00 2001
|
||||
From: David Kubek <dkubek@redhat.com>
|
||||
Date: Wed, 24 Apr 2024 11:05:32 +0200
|
||||
Subject: [PATCH 19/34] Fix incorrect command formulation
|
||||
|
||||
Mitigation of an error where instead of no argument an "empty argument"
|
||||
was passed to `lscpu`
|
||||
|
||||
lscpu ''
|
||||
|
||||
vs.
|
||||
|
||||
lscpu
|
||||
---
|
||||
repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py b/repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py
|
||||
index 7451066a..db3f92d4 100644
|
||||
--- a/repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py
|
||||
+++ b/repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py
|
||||
@@ -12,7 +12,7 @@ PPC64LE_MODEL = re.compile(r'\d+\.\d+ \(pvr (?P<family>[0-9a-fA-F]+) 0*[0-9a-fA-
|
||||
|
||||
def _get_lscpu_output(output_json=False):
|
||||
try:
|
||||
- result = run(['lscpu', '-J' if output_json else ''])
|
||||
+ result = run(['lscpu'] + (['-J'] if output_json else []))
|
||||
return result.get('stdout', '')
|
||||
except (OSError, CalledProcessError):
|
||||
api.current_logger().debug('Executing `lscpu` failed', exc_info=True)
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 5e51626069dd7d5e38f36cafdd45f14cfb213e5d Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Thu, 25 Apr 2024 14:59:55 +0200
|
||||
Subject: [PATCH 20/34] mention `Report` in produces of
|
||||
transitionsystemdservicesstates (#1210)
|
||||
|
||||
fixes upgrade warnings:
|
||||
|
||||
leapp.workflow.Applications.transition_systemd_services_states: Actor is trying to produce a message of type "<class 'leapp.reporting.Report'>" without mentioning it explicitely in the actor's "produces" tuple. The message will be ignored
|
||||
---
|
||||
.../actors/systemd/transitionsystemdservicesstates/actor.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/actor.py b/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/actor.py
|
||||
index 139f9f6b..d2863e09 100644
|
||||
--- a/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/actor.py
|
||||
@@ -7,6 +7,7 @@ from leapp.models import (
|
||||
SystemdServicesPresetInfoTarget,
|
||||
SystemdServicesTasks
|
||||
)
|
||||
+from leapp.reporting import Report
|
||||
from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag
|
||||
|
||||
|
||||
@@ -46,7 +47,7 @@ class TransitionSystemdServicesStates(Actor):
|
||||
SystemdServicesPresetInfoSource,
|
||||
SystemdServicesPresetInfoTarget
|
||||
)
|
||||
- produces = (SystemdServicesTasks,)
|
||||
+ produces = (Report, SystemdServicesTasks)
|
||||
tags = (ApplicationsPhaseTag, IPUWorkflowTag)
|
||||
|
||||
def process(self):
|
||||
--
|
||||
2.42.0
|
||||
|
47
0021-Update-packit-config-after-tier-redefinition.patch
Normal file
47
0021-Update-packit-config-after-tier-redefinition.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From 346b741209553b9aeb96f2f728480e740a25e0af Mon Sep 17 00:00:00 2001
|
||||
From: Inessa Vasilevskaya <ivasilev@redhat.com>
|
||||
Date: Thu, 25 Apr 2024 13:25:56 +0200
|
||||
Subject: [PATCH 21/34] Update packit config after tier redefinition
|
||||
|
||||
Now for basic sanity test verification in upstream tests
|
||||
tagged by 'tier0' will be used instead of 'sanity'.
|
||||
|
||||
RHELMISC-3211
|
||||
---
|
||||
.packit.yaml | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/.packit.yaml b/.packit.yaml
|
||||
index bce97bad..ed6412dc 100644
|
||||
--- a/.packit.yaml
|
||||
+++ b/.packit.yaml
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
- plan_filter: 'tag:sanity & enabled:true'
|
||||
+ plan_filter: 'tag:tier0 & enabled:true'
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
@@ -318,7 +318,7 @@ jobs:
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
- plan_filter: 'tag:sanity & tag:8to9 & enabled:true'
|
||||
+ plan_filter: 'tag:tier0 & tag:8to9 & enabled:true'
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
@@ -407,7 +407,7 @@ jobs:
|
||||
tf_extra_params:
|
||||
test:
|
||||
tmt:
|
||||
- plan_filter: 'tag:sanity & tag:8to9 & enabled:true'
|
||||
+ plan_filter: 'tag:tier0 & tag:8to9 & enabled:true'
|
||||
environments:
|
||||
- tmt:
|
||||
context:
|
||||
--
|
||||
2.42.0
|
||||
|
34
0022-Update-reboot-msg-Note-the-console-access.patch
Normal file
34
0022-Update-reboot-msg-Note-the-console-access.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 0d904126f785ae785e29165bf83a493d8f837fbe Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 26 Apr 2024 14:45:06 +0200
|
||||
Subject: [PATCH 22/34] Update reboot msg: Note the console access
|
||||
|
||||
Some users hasn't read the upgrade documentation and are not aware
|
||||
that after the reboot the actual upgrade is processing. As they wait
|
||||
just for the ssh connection, they think that something is wrong and
|
||||
sometimes reboot the machine, interrupting the entire process, making
|
||||
the machine broken in some cases.
|
||||
|
||||
Adding info that they need a console access in case they want to watch
|
||||
the upgrade progress.
|
||||
|
||||
Jira: https://issues.redhat.com/browse/RHEL-27231
|
||||
---
|
||||
commands/upgrade/__init__.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/commands/upgrade/__init__.py b/commands/upgrade/__init__.py
|
||||
index cc5fe647..1e15b59c 100644
|
||||
--- a/commands/upgrade/__init__.py
|
||||
+++ b/commands/upgrade/__init__.py
|
||||
@@ -117,6 +117,7 @@ def upgrade(args, breadcrumbs):
|
||||
sys.stdout.write(
|
||||
'Reboot the system to continue with the upgrade.'
|
||||
' This might take a while depending on the system configuration.\n'
|
||||
+ 'Make sure you have console access to view the actual upgrade process.\n'
|
||||
)
|
||||
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
435
0023-Fix-kernel-cmdline-args-we-add-not-being-propogated-.patch
Normal file
435
0023-Fix-kernel-cmdline-args-we-add-not-being-propogated-.patch
Normal file
@ -0,0 +1,435 @@
|
||||
From 2b27cfbbed1059d8af1add3a209d919901897e47 Mon Sep 17 00:00:00 2001
|
||||
From: Toshio Kuratomi <tkuratom@redhat.com>
|
||||
Date: Tue, 30 Apr 2024 07:28:35 -0700
|
||||
Subject: [PATCH 23/34] Fix kernel cmdline args we add not being propogated to
|
||||
newly installed kernels. (#1193)
|
||||
|
||||
On some upgrades, any kernel commandline args that we were adding were added to the default kernel
|
||||
but once the user installed a new kernel, those args were not propogated to the new kernel. This
|
||||
was happening on S390x and on RHEL7=>8 upgrades.
|
||||
|
||||
To fix this, we add the kernel commandline args to both the default kernel and to the defaults for
|
||||
all kernels.
|
||||
|
||||
On S390x and upgrades to RHEL9 or greater, this is done by placing the kernel cmdline arguments into
|
||||
the /etc/kernel/cmdline file.
|
||||
|
||||
On upgrades to RHEL <= 8 for all architectures other than S390x, this is done by having
|
||||
grub2-editenv modify the /boot/grub2/grubenv file.
|
||||
|
||||
Jira: RHEL-26840, OAMG-10424
|
||||
---
|
||||
.../actors/kernelcmdlineconfig/actor.py | 3 +-
|
||||
.../libraries/kernelcmdlineconfig.py | 166 +++++++++++++++++-
|
||||
.../tests/test_kernelcmdlineconfig.py | 116 ++++++++++--
|
||||
3 files changed, 261 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/kernelcmdlineconfig/actor.py b/repos/system_upgrade/common/actors/kernelcmdlineconfig/actor.py
|
||||
index 13c47113..b44fd835 100644
|
||||
--- a/repos/system_upgrade/common/actors/kernelcmdlineconfig/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/kernelcmdlineconfig/actor.py
|
||||
@@ -29,4 +29,5 @@ class KernelCmdlineConfig(Actor):
|
||||
|
||||
if ff.firmware == 'bios' and os.path.ismount('/boot/efi'):
|
||||
configs = ['/boot/grub2/grub.cfg', '/boot/efi/EFI/redhat/grub.cfg']
|
||||
- kernelcmdlineconfig.modify_kernel_args_in_boot_cfg(configs)
|
||||
+
|
||||
+ kernelcmdlineconfig.entrypoint(configs)
|
||||
diff --git a/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py b/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py
|
||||
index f98e8168..ad59eb22 100644
|
||||
--- a/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py
|
||||
@@ -1,9 +1,27 @@
|
||||
+import re
|
||||
+
|
||||
+from leapp import reporting
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries import stdlib
|
||||
-from leapp.libraries.common.config import architecture
|
||||
+from leapp.libraries.common.config import architecture, version
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import InstalledTargetKernelInfo, KernelCmdlineArg, TargetKernelCmdlineArgTasks
|
||||
|
||||
+KERNEL_CMDLINE_FILE = "/etc/kernel/cmdline"
|
||||
+
|
||||
+
|
||||
+class ReadOfKernelArgsError(Exception):
|
||||
+ """
|
||||
+ Failed to retrieve the kernel command line arguments
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+def use_cmdline_file():
|
||||
+ if (architecture.matches_architecture(architecture.ARCH_S390X) or
|
||||
+ version.matches_target_version('>= 9.0')):
|
||||
+ return True
|
||||
+ return False
|
||||
+
|
||||
|
||||
def run_grubby_cmd(cmd):
|
||||
try:
|
||||
@@ -15,6 +33,9 @@ def run_grubby_cmd(cmd):
|
||||
stdlib.run(['/usr/sbin/zipl'])
|
||||
|
||||
except (OSError, stdlib.CalledProcessError) as e:
|
||||
+ # In most cases we don't raise StopActorExecutionError in post-upgrade
|
||||
+ # actors.
|
||||
+ #
|
||||
raise StopActorExecutionError(
|
||||
"Failed to append extra arguments to kernel command line.",
|
||||
details={"details": str(e)})
|
||||
@@ -31,22 +52,36 @@ def format_kernelarg_msgs_for_grubby_cmd(kernelarg_msgs):
|
||||
return ' '.join(kernel_args)
|
||||
|
||||
|
||||
-def modify_kernel_args_in_boot_cfg(configs_to_modify_explicitly=None):
|
||||
- kernel_info = next(api.consume(InstalledTargetKernelInfo), None)
|
||||
- if not kernel_info:
|
||||
- return
|
||||
+def set_default_kernel_args(kernel_args):
|
||||
+ if use_cmdline_file():
|
||||
+ # Put kernel_args into /etc/kernel/cmdline
|
||||
+ with open(KERNEL_CMDLINE_FILE, 'w') as f:
|
||||
+ f.write(kernel_args)
|
||||
+ else:
|
||||
+ # Use grub2-editenv to put the kernel args into /boot/grub2/grubenv
|
||||
+ stdlib.run(['grub2-editenv', '-', 'set', 'kernelopts={}'.format(kernel_args)])
|
||||
|
||||
- # Collect desired kernelopt modifications
|
||||
+
|
||||
+def retrieve_arguments_to_modify():
|
||||
+ """
|
||||
+ Retrieve the arguments other actors would like to add or remove from the kernel cmdline.
|
||||
+ """
|
||||
kernelargs_msgs_to_add = list(api.consume(KernelCmdlineArg))
|
||||
kernelargs_msgs_to_remove = []
|
||||
+
|
||||
for target_kernel_arg_task in api.consume(TargetKernelCmdlineArgTasks):
|
||||
kernelargs_msgs_to_add.extend(target_kernel_arg_task.to_add)
|
||||
kernelargs_msgs_to_remove.extend(target_kernel_arg_task.to_remove)
|
||||
|
||||
- if not kernelargs_msgs_to_add and not kernelargs_msgs_to_remove:
|
||||
- return # There is no work to do
|
||||
+ return kernelargs_msgs_to_add, kernelargs_msgs_to_remove
|
||||
+
|
||||
|
||||
- grubby_modify_kernelargs_cmd = ['grubby', '--update-kernel={0}'.format(kernel_info.kernel_img_path)]
|
||||
+def modify_args_for_default_kernel(kernel_info,
|
||||
+ kernelargs_msgs_to_add,
|
||||
+ kernelargs_msgs_to_remove,
|
||||
+ configs_to_modify_explicitly=None):
|
||||
+ grubby_modify_kernelargs_cmd = ['grubby',
|
||||
+ '--update-kernel={0}'.format(kernel_info.kernel_img_path)]
|
||||
|
||||
if kernelargs_msgs_to_add:
|
||||
grubby_modify_kernelargs_cmd += [
|
||||
@@ -64,3 +99,116 @@ def modify_kernel_args_in_boot_cfg(configs_to_modify_explicitly=None):
|
||||
run_grubby_cmd(cmd)
|
||||
else:
|
||||
run_grubby_cmd(grubby_modify_kernelargs_cmd)
|
||||
+
|
||||
+
|
||||
+def _extract_grubby_value(record):
|
||||
+ data = record.split('=', 1)[1]
|
||||
+ matches = re.match(r'^([\'"]?)(.*)\1$', data)
|
||||
+ return matches.group(2)
|
||||
+
|
||||
+
|
||||
+def retrieve_args_for_default_kernel(kernel_info):
|
||||
+ # Copy the args for the default kernel to all kernels.
|
||||
+ kernel_args = None
|
||||
+ kernel_root = None
|
||||
+ cmd = ['grubby', '--info', kernel_info.kernel_img_path]
|
||||
+ output = stdlib.run(cmd, split=False)
|
||||
+ for record in output['stdout'].splitlines():
|
||||
+ # This could be done with one regex but it's cleaner to parse it as
|
||||
+ # structured data.
|
||||
+ if record.startswith('args='):
|
||||
+ temp_kernel_args = _extract_grubby_value(record)
|
||||
+
|
||||
+ if kernel_args:
|
||||
+ api.current_logger().warning('Grubby output is malformed:'
|
||||
+ ' `args=` is listed more than once.')
|
||||
+ if kernel_args != temp_kernel_args:
|
||||
+ raise ReadOfKernelArgsError('Grubby listed `args=` multiple'
|
||||
+ ' times with different values.')
|
||||
+ kernel_args = _extract_grubby_value(record)
|
||||
+ elif record.startswith('root='):
|
||||
+ api.current_logger().warning('Grubby output is malformed:'
|
||||
+ ' `root=` is listed more than once.')
|
||||
+ if kernel_root:
|
||||
+ raise ReadOfKernelArgsError('Grubby listed `root=` multiple'
|
||||
+ ' times with different values')
|
||||
+ kernel_root = _extract_grubby_value(record)
|
||||
+
|
||||
+ if not kernel_args or not kernel_root:
|
||||
+ raise ReadOfKernelArgsError(
|
||||
+ 'Failed to retrieve kernel command line to save for future installed'
|
||||
+ ' kernels: root={}, args={}'.format(kernel_root, kernel_args)
|
||||
+ )
|
||||
+
|
||||
+ return kernel_root, kernel_args
|
||||
+
|
||||
+
|
||||
+def modify_kernel_args_in_boot_cfg(configs_to_modify_explicitly=None):
|
||||
+ kernel_info = next(api.consume(InstalledTargetKernelInfo), None)
|
||||
+ if not kernel_info:
|
||||
+ return
|
||||
+
|
||||
+ # Collect desired kernelopt modifications
|
||||
+ kernelargs_msgs_to_add, kernelargs_msgs_to_remove = retrieve_arguments_to_modify()
|
||||
+ if not kernelargs_msgs_to_add and not kernelargs_msgs_to_remove:
|
||||
+ # Nothing to do
|
||||
+ return
|
||||
+
|
||||
+ # Modify the kernel cmdline for the default kernel
|
||||
+ modify_args_for_default_kernel(kernel_info,
|
||||
+ kernelargs_msgs_to_add,
|
||||
+ kernelargs_msgs_to_remove,
|
||||
+ configs_to_modify_explicitly)
|
||||
+
|
||||
+ # Copy kernel params from the default kernel to all the kernels
|
||||
+ kernel_root, kernel_args = retrieve_args_for_default_kernel(kernel_info)
|
||||
+ complete_kernel_args = 'root={} {}'.format(kernel_root, kernel_args)
|
||||
+ set_default_kernel_args(complete_kernel_args)
|
||||
+
|
||||
+
|
||||
+def entrypoint(configs=None):
|
||||
+ try:
|
||||
+ modify_kernel_args_in_boot_cfg(configs)
|
||||
+ except ReadOfKernelArgsError as e:
|
||||
+ api.current_logger().error(str(e))
|
||||
+
|
||||
+ if use_cmdline_file():
|
||||
+ report_hint = reporting.Hints(
|
||||
+ 'After the system has been rebooted into the new version of RHEL, you'
|
||||
+ ' should take the kernel cmdline arguments from /proc/cmdline (Everything'
|
||||
+ ' except the BOOT_IMAGE entry and initrd entries) and copy them into'
|
||||
+ ' /etc/kernel/cmdline before installing any new kernels.'
|
||||
+ )
|
||||
+ else:
|
||||
+ report_hint = reporting.Hints(
|
||||
+ 'After the system has been rebooted into the new version of RHEL, you'
|
||||
+ ' should take the kernel cmdline arguments from /proc/cmdline (Everything'
|
||||
+ ' except the BOOT_IMAGE entry and initrd entries) and then use the'
|
||||
+ ' grub2-editenv command to make them the default kernel args. For example,'
|
||||
+ ' if /proc/cmdline contains:\n\n'
|
||||
+ ' BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.0-425.3.1.el8.x86_64'
|
||||
+ ' root=/dev/mapper/rhel_ibm--root ro console=tty0'
|
||||
+ ' console=ttyS0,115200 rd_NO_PLYMOUTH\n\n'
|
||||
+ ' then run the following grub2-editenv command:\n\n'
|
||||
+ ' # grub2-editenv - set "kernelopts=root=/dev/mapper/rhel_ibm--root'
|
||||
+ ' ro console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"'
|
||||
+ )
|
||||
+
|
||||
+ reporting.create_report([
|
||||
+ reporting.Title('Could not set the kernel arguments for future kernels'),
|
||||
+ reporting.Summary(
|
||||
+ 'During the upgrade we needed to modify the kernel command line arguments.'
|
||||
+ ' We were able to change the arguments for the default kernel but we were'
|
||||
+ ' not able to set the arguments as the default for kernels installed in'
|
||||
+ ' the future.'
|
||||
+ ),
|
||||
+ report_hint,
|
||||
+ reporting.Severity(reporting.Severity.HIGH),
|
||||
+ reporting.Groups([
|
||||
+ reporting.Groups.BOOT,
|
||||
+ reporting.Groups.KERNEL,
|
||||
+ reporting.Groups.POST,
|
||||
+ ]),
|
||||
+ reporting.RelatedResource('file', '/etc/kernel/cmdline'),
|
||||
+ reporting.RelatedResource('file', '/proc/cmdline'),
|
||||
+ ])
|
||||
diff --git a/repos/system_upgrade/common/actors/kernelcmdlineconfig/tests/test_kernelcmdlineconfig.py b/repos/system_upgrade/common/actors/kernelcmdlineconfig/tests/test_kernelcmdlineconfig.py
|
||||
index 3f9b2e5e..ffe4b046 100644
|
||||
--- a/repos/system_upgrade/common/actors/kernelcmdlineconfig/tests/test_kernelcmdlineconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/kernelcmdlineconfig/tests/test_kernelcmdlineconfig.py
|
||||
@@ -1,7 +1,10 @@
|
||||
+from __future__ import division
|
||||
+
|
||||
from collections import namedtuple
|
||||
|
||||
import pytest
|
||||
|
||||
+from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries import stdlib
|
||||
from leapp.libraries.actor import kernelcmdlineconfig
|
||||
from leapp.libraries.common.config import architecture
|
||||
@@ -11,14 +14,44 @@ from leapp.models import InstalledTargetKernelInfo, KernelCmdlineArg, TargetKern
|
||||
|
||||
TARGET_KERNEL_NEVRA = 'kernel-core-1.2.3-4.x86_64.el8.x64_64'
|
||||
|
||||
+# pylint: disable=E501
|
||||
+SAMPLE_KERNEL_ARGS = ('ro rootflags=subvol=root'
|
||||
+ ' resume=/dev/mapper/luks-2c0df999-81ec-4a35-a1f9-b93afee8c6ad'
|
||||
+ ' rd.luks.uuid=luks-90a6412f-c588-46ca-9118-5aca35943d25'
|
||||
+ ' rd.luks.uuid=luks-2c0df999-81ec-4a35-a1f9-b93afee8c6ad rhgb quiet'
|
||||
+ )
|
||||
+SAMPLE_KERNEL_ROOT = 'UUID=1aa15850-2685-418d-95a6-f7266a2de83a'
|
||||
+TEMPLATE_GRUBBY_INFO_OUTPUT = """index=0
|
||||
+kernel="/boot/vmlinuz-6.5.13-100.fc37.x86_64"
|
||||
+args="{0}"
|
||||
+root="{1}"
|
||||
+initrd="/boot/initramfs-6.5.13-100.fc37.x86_64.img"
|
||||
+title="Fedora Linux (6.5.13-100.fc37.x86_64) 37 (Thirty Seven)"
|
||||
+id="a3018267cdd8451db7c77bb3e5b1403d-6.5.13-100.fc37.x86_64"
|
||||
+""" # noqa: E501
|
||||
+SAMPLE_GRUBBY_INFO_OUTPUT = TEMPLATE_GRUBBY_INFO_OUTPUT.format(SAMPLE_KERNEL_ARGS, SAMPLE_KERNEL_ROOT)
|
||||
+# pylint: enable=E501
|
||||
+
|
||||
|
||||
class MockedRun(object):
|
||||
- def __init__(self):
|
||||
+ def __init__(self, outputs=None):
|
||||
+ """
|
||||
+ Mock stdlib.run().
|
||||
+
|
||||
+ If outputs is given, it is a dictionary mapping a cmd to output as stdout.
|
||||
+ """
|
||||
self.commands = []
|
||||
+ self.outputs = outputs or {}
|
||||
|
||||
def __call__(self, cmd, *args, **kwargs):
|
||||
self.commands.append(cmd)
|
||||
- return {}
|
||||
+ return {
|
||||
+ "stdout": self.outputs.get(" ".join(cmd), ""),
|
||||
+ "stderr": "",
|
||||
+ "signal": None,
|
||||
+ "exit_code": 0,
|
||||
+ "pid": 1234,
|
||||
+ }
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -50,7 +83,7 @@ class MockedRun(object):
|
||||
),
|
||||
]
|
||||
)
|
||||
-def test_kernelcmdline_config_valid_msgs(monkeypatch, msgs, expected_grubby_kernelopt_args):
|
||||
+def test_kernelcmdline_config_valid_msgs(monkeypatch, tmpdir, msgs, expected_grubby_kernelopt_args):
|
||||
kernel_img_path = '/boot/vmlinuz-X'
|
||||
kernel_info = InstalledTargetKernelInfo(pkg_nevra=TARGET_KERNEL_NEVRA,
|
||||
uname_r='',
|
||||
@@ -61,18 +94,28 @@ def test_kernelcmdline_config_valid_msgs(monkeypatch, msgs, expected_grubby_kern
|
||||
grubby_base_cmd = ['grubby', '--update-kernel={}'.format(kernel_img_path)]
|
||||
expected_grubby_cmd = grubby_base_cmd + expected_grubby_kernelopt_args
|
||||
|
||||
- mocked_run = MockedRun()
|
||||
+ mocked_run = MockedRun(
|
||||
+ outputs={" ".join(("grubby", "--info", kernel_img_path)): SAMPLE_GRUBBY_INFO_OUTPUT}
|
||||
+ )
|
||||
monkeypatch.setattr(stdlib, 'run', mocked_run)
|
||||
- monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(architecture.ARCH_X86_64, msgs=msgs))
|
||||
+ monkeypatch.setattr(api, 'current_actor',
|
||||
+ CurrentActorMocked(architecture.ARCH_X86_64,
|
||||
+ dst_ver="8.1",
|
||||
+ msgs=msgs)
|
||||
+ )
|
||||
kernelcmdlineconfig.modify_kernel_args_in_boot_cfg()
|
||||
- assert mocked_run.commands and len(mocked_run.commands) == 1
|
||||
- assert expected_grubby_cmd == mocked_run.commands.pop()
|
||||
+ assert mocked_run.commands and len(mocked_run.commands) == 3
|
||||
+ assert expected_grubby_cmd == mocked_run.commands.pop(0)
|
||||
|
||||
- mocked_run = MockedRun()
|
||||
+ mocked_run = MockedRun(
|
||||
+ outputs={" ".join(("grubby", "--info", kernel_img_path)): SAMPLE_GRUBBY_INFO_OUTPUT}
|
||||
+ )
|
||||
monkeypatch.setattr(stdlib, 'run', mocked_run)
|
||||
monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(architecture.ARCH_S390X, msgs=msgs))
|
||||
+ monkeypatch.setattr(kernelcmdlineconfig, 'KERNEL_CMDLINE_FILE', str(tmpdir / 'cmdline'))
|
||||
+
|
||||
kernelcmdlineconfig.modify_kernel_args_in_boot_cfg()
|
||||
- assert mocked_run.commands and len(mocked_run.commands) == 2
|
||||
+ assert mocked_run.commands and len(mocked_run.commands) == 3
|
||||
assert expected_grubby_cmd == mocked_run.commands.pop(0)
|
||||
assert ['/usr/sbin/zipl'] == mocked_run.commands.pop(0)
|
||||
|
||||
@@ -86,9 +129,17 @@ def test_kernelcmdline_explicit_configs(monkeypatch):
|
||||
initramfs_path='/boot/initramfs-X')
|
||||
msgs = [kernel_info, TargetKernelCmdlineArgTasks(to_remove=[KernelCmdlineArg(key='key1', value='value1')])]
|
||||
|
||||
- mocked_run = MockedRun()
|
||||
+ grubby_cmd_info = ["grubby", "--info", kernel_img_path]
|
||||
+ mocked_run = MockedRun(
|
||||
+ outputs={" ".join(grubby_cmd_info): SAMPLE_GRUBBY_INFO_OUTPUT}
|
||||
+ )
|
||||
monkeypatch.setattr(stdlib, 'run', mocked_run)
|
||||
- monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(architecture.ARCH_X86_64, msgs=msgs))
|
||||
+ monkeypatch.setattr(api, 'current_actor',
|
||||
+ CurrentActorMocked(architecture.ARCH_X86_64,
|
||||
+ dst_ver="8.1",
|
||||
+ msgs=msgs
|
||||
+ )
|
||||
+ )
|
||||
|
||||
configs = ['/boot/grub2/grub.cfg', '/boot/efi/EFI/redhat/grub.cfg']
|
||||
kernelcmdlineconfig.modify_kernel_args_in_boot_cfg(configs_to_modify_explicitly=configs)
|
||||
@@ -97,19 +148,27 @@ def test_kernelcmdline_explicit_configs(monkeypatch):
|
||||
'--remove-args', 'key1=value1']
|
||||
expected_cmds = [
|
||||
grubby_cmd_without_config + ['-c', '/boot/grub2/grub.cfg'],
|
||||
- grubby_cmd_without_config + ['-c', '/boot/efi/EFI/redhat/grub.cfg']
|
||||
+ grubby_cmd_without_config + ['-c', '/boot/efi/EFI/redhat/grub.cfg'],
|
||||
+ grubby_cmd_info,
|
||||
+ ["grub2-editenv", "-", "set", "kernelopts=root={} {}".format(
|
||||
+ SAMPLE_KERNEL_ROOT, SAMPLE_KERNEL_ARGS)],
|
||||
]
|
||||
|
||||
assert mocked_run.commands == expected_cmds
|
||||
|
||||
|
||||
def test_kernelcmdline_config_no_args(monkeypatch):
|
||||
+ kernel_img_path = '/boot/vmlinuz-X'
|
||||
kernel_info = InstalledTargetKernelInfo(pkg_nevra=TARGET_KERNEL_NEVRA,
|
||||
uname_r='',
|
||||
- kernel_img_path='/boot/vmlinuz-X',
|
||||
+ kernel_img_path=kernel_img_path,
|
||||
initramfs_path='/boot/initramfs-X')
|
||||
|
||||
- mocked_run = MockedRun()
|
||||
+ mocked_run = MockedRun(
|
||||
+ outputs={" ".join(("grubby", "--info", kernel_img_path)):
|
||||
+ TEMPLATE_GRUBBY_INFO_OUTPUT.format("", "")
|
||||
+ }
|
||||
+ )
|
||||
monkeypatch.setattr(stdlib, 'run', mocked_run)
|
||||
monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(architecture.ARCH_S390X, msgs=[kernel_info]))
|
||||
kernelcmdlineconfig.modify_kernel_args_in_boot_cfg()
|
||||
@@ -122,3 +181,32 @@ def test_kernelcmdline_config_no_version(monkeypatch):
|
||||
monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(architecture.ARCH_S390X))
|
||||
kernelcmdlineconfig.modify_kernel_args_in_boot_cfg()
|
||||
assert not mocked_run.commands
|
||||
+
|
||||
+
|
||||
+def test_kernelcmdline_config_malformed_args(monkeypatch):
|
||||
+ kernel_img_path = '/boot/vmlinuz-X'
|
||||
+ kernel_info = InstalledTargetKernelInfo(pkg_nevra=TARGET_KERNEL_NEVRA,
|
||||
+ uname_r='',
|
||||
+ kernel_img_path=kernel_img_path,
|
||||
+ initramfs_path='/boot/initramfs-X')
|
||||
+
|
||||
+ # For this test, we need to check we get the proper error if grubby --info
|
||||
+ # doesn't output any args information at all.
|
||||
+ grubby_info_output = "\n".join(line for line in SAMPLE_GRUBBY_INFO_OUTPUT.splitlines()
|
||||
+ if not line.startswith("args="))
|
||||
+ mocked_run = MockedRun(
|
||||
+ outputs={" ".join(("grubby", "--info", kernel_img_path)): grubby_info_output,
|
||||
+ }
|
||||
+ )
|
||||
+ msgs = [kernel_info,
|
||||
+ TargetKernelCmdlineArgTasks(to_remove=[
|
||||
+ KernelCmdlineArg(key='key1', value='value1')])
|
||||
+ ]
|
||||
+ monkeypatch.setattr(stdlib, 'run', mocked_run)
|
||||
+ monkeypatch.setattr(api, 'current_actor',
|
||||
+ CurrentActorMocked(architecture.ARCH_S390X, msgs=msgs))
|
||||
+
|
||||
+ with pytest.raises(kernelcmdlineconfig.ReadOfKernelArgsError,
|
||||
+ match="Failed to retrieve kernel command line to save for future"
|
||||
+ " installed kernels."):
|
||||
+ kernelcmdlineconfig.modify_kernel_args_in_boot_cfg()
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 0869ab168780f4fa10f37f34aaf51342a88c0e5c Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Tue, 30 Apr 2024 16:42:26 +0200
|
||||
Subject: [PATCH 24/34] kernelcmdlineconfig: add newline in /etc/kernel/cmdline
|
||||
|
||||
Previous solution created the file without adding the newline
|
||||
in the end of the file. The original solution worked, but to stay
|
||||
on the safe side, adding the expected new line.
|
||||
|
||||
Jira: RHEL-26840, OAMG-10424
|
||||
---
|
||||
.../actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py b/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py
|
||||
index ad59eb22..238a8aa6 100644
|
||||
--- a/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py
|
||||
@@ -57,6 +57,8 @@ def set_default_kernel_args(kernel_args):
|
||||
# Put kernel_args into /etc/kernel/cmdline
|
||||
with open(KERNEL_CMDLINE_FILE, 'w') as f:
|
||||
f.write(kernel_args)
|
||||
+ # new line is expected in the EOF (POSIX).
|
||||
+ f.write('\n')
|
||||
else:
|
||||
# Use grub2-editenv to put the kernel args into /boot/grub2/grubenv
|
||||
stdlib.run(['grub2-editenv', '-', 'set', 'kernelopts={}'.format(kernel_args)])
|
||||
--
|
||||
2.42.0
|
||||
|
3332
0025-Data-Update-DDDD.json-fixed-incorrect-data-add-craft.patch
Normal file
3332
0025-Data-Update-DDDD.json-fixed-incorrect-data-add-craft.patch
Normal file
File diff suppressed because it is too large
Load Diff
143062
0026-Data-Update-PES-data-to-cover-up-to-date-changes.patch
Normal file
143062
0026-Data-Update-PES-data-to-cover-up-to-date-changes.patch
Normal file
File diff suppressed because it is too large
Load Diff
110
0027-Move-common-Satellite-Upgrade-code-to-common.patch
Normal file
110
0027-Move-common-Satellite-Upgrade-code-to-common.patch
Normal file
@ -0,0 +1,110 @@
|
||||
From 88126ef33db2094b89fc17ad9e9a3962a9bb7d65 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Mon, 19 Feb 2024 12:09:05 +0100
|
||||
Subject: [PATCH 27/34] Move common Satellite Upgrade code to "common"
|
||||
|
||||
This allows the re-use of the code in the el8toel9 upgrade.
|
||||
---
|
||||
.../satellite_upgrade_services/actor.py | 35 +++++++++++++++++++
|
||||
.../actors/satellite_upgrader/actor.py | 0
|
||||
.../tests/unit_test_satellite_upgrader.py | 0
|
||||
.../{el7toel8 => common}/models/satellite.py | 0
|
||||
.../satellite_upgrade_data_migration/actor.py | 15 +-------
|
||||
5 files changed, 36 insertions(+), 14 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/actors/satellite_upgrade_services/actor.py
|
||||
rename repos/system_upgrade/{el7toel8 => common}/actors/satellite_upgrader/actor.py (100%)
|
||||
rename repos/system_upgrade/{el7toel8 => common}/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py (100%)
|
||||
rename repos/system_upgrade/{el7toel8 => common}/models/satellite.py (100%)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/satellite_upgrade_services/actor.py b/repos/system_upgrade/common/actors/satellite_upgrade_services/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..3cda49a9
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/satellite_upgrade_services/actor.py
|
||||
@@ -0,0 +1,35 @@
|
||||
+import glob
|
||||
+import os
|
||||
+
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.models import SatelliteFacts
|
||||
+from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+SYSTEMD_WANTS_BASE = '/etc/systemd/system/multi-user.target.wants/'
|
||||
+SERVICES_TO_DISABLE = ['dynflow-sidekiq@*', 'foreman', 'foreman-proxy',
|
||||
+ 'httpd', 'postgresql', 'pulpcore-api', 'pulpcore-content',
|
||||
+ 'pulpcore-worker@*', 'tomcat', 'redis']
|
||||
+
|
||||
+
|
||||
+class SatelliteUpgradeServices(Actor):
|
||||
+ """
|
||||
+ Reconfigure Satellite services
|
||||
+ """
|
||||
+
|
||||
+ name = 'satellite_upgrade_services'
|
||||
+ consumes = (SatelliteFacts,)
|
||||
+ produces = ()
|
||||
+ tags = (IPUWorkflowTag, ApplicationsPhaseTag)
|
||||
+
|
||||
+ def process(self):
|
||||
+ facts = next(self.consume(SatelliteFacts), None)
|
||||
+ if not facts or not facts.has_foreman:
|
||||
+ return
|
||||
+
|
||||
+ # disable services, will be re-enabled by the installer
|
||||
+ for service_name in SERVICES_TO_DISABLE:
|
||||
+ for service in glob.glob(os.path.join(SYSTEMD_WANTS_BASE, '{}.service'.format(service_name))):
|
||||
+ try:
|
||||
+ os.unlink(service)
|
||||
+ except OSError as e:
|
||||
+ self.log.warning('Failed disabling service {}: {}'.format(service, e))
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/satellite_upgrader/actor.py b/repos/system_upgrade/common/actors/satellite_upgrader/actor.py
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/el7toel8/actors/satellite_upgrader/actor.py
|
||||
rename to repos/system_upgrade/common/actors/satellite_upgrader/actor.py
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py b/repos/system_upgrade/common/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/el7toel8/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py
|
||||
rename to repos/system_upgrade/common/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py
|
||||
diff --git a/repos/system_upgrade/el7toel8/models/satellite.py b/repos/system_upgrade/common/models/satellite.py
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/el7toel8/models/satellite.py
|
||||
rename to repos/system_upgrade/common/models/satellite.py
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_data_migration/actor.py b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_data_migration/actor.py
|
||||
index 0cf66970..1dd52691 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_data_migration/actor.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_data_migration/actor.py
|
||||
@@ -11,15 +11,10 @@ POSTGRESQL_SCL_DATA_PATH = '/var/opt/rh/rh-postgresql12/lib/pgsql/data/'
|
||||
POSTGRESQL_USER = 'postgres'
|
||||
POSTGRESQL_GROUP = 'postgres'
|
||||
|
||||
-SYSTEMD_WANTS_BASE = '/etc/systemd/system/multi-user.target.wants/'
|
||||
-SERVICES_TO_DISABLE = ['dynflow-sidekiq@*', 'foreman', 'foreman-proxy',
|
||||
- 'httpd', 'postgresql', 'pulpcore-api', 'pulpcore-content',
|
||||
- 'pulpcore-worker@*', 'tomcat']
|
||||
-
|
||||
|
||||
class SatelliteUpgradeDataMigration(Actor):
|
||||
"""
|
||||
- Reconfigure Satellite services and migrate PostgreSQL data
|
||||
+ Migrate Satellite PostgreSQL data
|
||||
"""
|
||||
|
||||
name = 'satellite_upgrade_data_migration'
|
||||
@@ -32,14 +27,6 @@ class SatelliteUpgradeDataMigration(Actor):
|
||||
if not facts or not facts.has_foreman:
|
||||
return
|
||||
|
||||
- # disable services, will be re-enabled by the installer
|
||||
- for service_name in SERVICES_TO_DISABLE:
|
||||
- for service in glob.glob(os.path.join(SYSTEMD_WANTS_BASE, '{}.service'.format(service_name))):
|
||||
- try:
|
||||
- os.unlink(service)
|
||||
- except Exception as e: # pylint: disable=broad-except
|
||||
- self.log.warning('Failed disabling service {}: {}'.format(service, e))
|
||||
-
|
||||
if facts.postgresql.local_postgresql and os.path.exists(POSTGRESQL_SCL_DATA_PATH):
|
||||
# we can assume POSTGRESQL_DATA_PATH exists and is empty
|
||||
# move PostgreSQL data to the new home
|
||||
--
|
||||
2.42.0
|
||||
|
252
0028-Add-el8toel9-upgrade-facts-for-Satellite.patch
Normal file
252
0028-Add-el8toel9-upgrade-facts-for-Satellite.patch
Normal file
@ -0,0 +1,252 @@
|
||||
From 0f70dbf229c04b5374d767eeab25ad3fa32e0d8f Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Mon, 19 Feb 2024 12:23:28 +0100
|
||||
Subject: [PATCH 28/34] Add el8toel9 upgrade facts for Satellite
|
||||
|
||||
This adds the el8toel9 specific fact scanner/generator for Satellite
|
||||
upgrades. The result of this actor is what drives the actual upgrade
|
||||
actions.
|
||||
---
|
||||
.../actors/satellite_upgrade_facts/actor.py | 71 ++++++++
|
||||
.../unit_test_satellite_upgrade_facts.py | 151 ++++++++++++++++++
|
||||
2 files changed, 222 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/actor.py
|
||||
create mode 100644 repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/actor.py b/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/actor.py
|
||||
new file mode 100644
|
||||
index 00000000..2dc78cce
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/actor.py
|
||||
@@ -0,0 +1,71 @@
|
||||
+from leapp.actors import Actor
|
||||
+from leapp.libraries.common.config import architecture
|
||||
+from leapp.libraries.common.rpms import has_package
|
||||
+from leapp.models import (
|
||||
+ InstalledRPM,
|
||||
+ RepositoriesSetupTasks,
|
||||
+ RpmTransactionTasks,
|
||||
+ SatelliteFacts,
|
||||
+ SatellitePostgresqlFacts,
|
||||
+ UsedRepositories
|
||||
+)
|
||||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
+
|
||||
+RELATED_PACKAGES = ('foreman', 'foreman-selinux', 'foreman-proxy', 'katello', 'katello-selinux',
|
||||
+ 'candlepin', 'candlepin-selinux', 'pulpcore-selinux', 'satellite', 'satellite-capsule')
|
||||
+RELATED_PACKAGE_PREFIXES = ('rubygem-hammer', 'rubygem-foreman', 'rubygem-katello',
|
||||
+ 'rubygem-smart_proxy', 'python3.11-pulp', 'foreman-installer',
|
||||
+ 'satellite-installer')
|
||||
+
|
||||
+
|
||||
+class SatelliteUpgradeFacts(Actor):
|
||||
+ """
|
||||
+ Report which Satellite packages require updates and how to handle PostgreSQL data
|
||||
+ """
|
||||
+
|
||||
+ name = 'satellite_upgrade_facts'
|
||||
+ consumes = (InstalledRPM, UsedRepositories)
|
||||
+ produces = (RepositoriesSetupTasks, RpmTransactionTasks, SatelliteFacts)
|
||||
+ tags = (IPUWorkflowTag, FactsPhaseTag)
|
||||
+
|
||||
+ def process(self):
|
||||
+ if not architecture.matches_architecture(architecture.ARCH_X86_64):
|
||||
+ return
|
||||
+
|
||||
+ has_foreman = has_package(InstalledRPM, 'foreman') or has_package(InstalledRPM, 'foreman-proxy')
|
||||
+ if not has_foreman:
|
||||
+ return
|
||||
+
|
||||
+ local_postgresql = has_package(InstalledRPM, 'postgresql-server')
|
||||
+
|
||||
+ to_install = ['rubygem-foreman_maintain']
|
||||
+
|
||||
+ for rpm_pkgs in self.consume(InstalledRPM):
|
||||
+ for pkg in rpm_pkgs.items:
|
||||
+ if pkg.name in RELATED_PACKAGES or pkg.name.startswith(RELATED_PACKAGE_PREFIXES):
|
||||
+ to_install.append(pkg.name)
|
||||
+
|
||||
+ if local_postgresql:
|
||||
+ to_install.extend(['postgresql', 'postgresql-server'])
|
||||
+ if has_package(InstalledRPM, 'postgresql-contrib'):
|
||||
+ to_install.append('postgresql-contrib')
|
||||
+ if has_package(InstalledRPM, 'postgresql-evr'):
|
||||
+ to_install.append('postgresql-evr')
|
||||
+
|
||||
+ self.produce(SatelliteFacts(
|
||||
+ has_foreman=has_foreman,
|
||||
+ has_katello_installer=False,
|
||||
+ postgresql=SatellitePostgresqlFacts(
|
||||
+ local_postgresql=local_postgresql,
|
||||
+ ),
|
||||
+ ))
|
||||
+
|
||||
+ repositories_to_enable = []
|
||||
+ for used_repos in self.consume(UsedRepositories):
|
||||
+ for used_repo in used_repos.repositories:
|
||||
+ if used_repo.repository.startswith(('satellite-6', 'satellite-capsule-6', 'satellite-maintenance-6')):
|
||||
+ repositories_to_enable.append(used_repo.repository.replace('for-rhel-8', 'for-rhel-9'))
|
||||
+ if repositories_to_enable:
|
||||
+ self.produce(RepositoriesSetupTasks(to_enable=repositories_to_enable))
|
||||
+
|
||||
+ self.produce(RpmTransactionTasks(to_install=to_install))
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py b/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
|
||||
new file mode 100644
|
||||
index 00000000..b0e44c46
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
|
||||
@@ -0,0 +1,151 @@
|
||||
+from leapp.libraries.common.config import mock_configs
|
||||
+from leapp.models import (
|
||||
+ InstalledRPM,
|
||||
+ RepositoriesSetupTasks,
|
||||
+ RPM,
|
||||
+ RpmTransactionTasks,
|
||||
+ SatelliteFacts,
|
||||
+ UsedRepositories,
|
||||
+ UsedRepository
|
||||
+)
|
||||
+
|
||||
+RH_PACKAGER = 'Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>'
|
||||
+
|
||||
+
|
||||
+def fake_package(pkg_name):
|
||||
+ return RPM(name=pkg_name, version='0.1', release='1.sm01', epoch='1', packager=RH_PACKAGER, arch='noarch',
|
||||
+ pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 199e2f91fd431d51')
|
||||
+
|
||||
+
|
||||
+FOREMAN_RPM = fake_package('foreman')
|
||||
+FOREMAN_PROXY_RPM = fake_package('foreman-proxy')
|
||||
+KATELLO_INSTALLER_RPM = fake_package('foreman-installer-katello')
|
||||
+KATELLO_RPM = fake_package('katello')
|
||||
+RUBYGEM_KATELLO_RPM = fake_package('rubygem-katello')
|
||||
+RUBYGEM_FOREMAN_PUPPET_RPM = fake_package('rubygem-foreman_puppet')
|
||||
+POSTGRESQL_RPM = fake_package('postgresql-server')
|
||||
+SATELLITE_RPM = fake_package('satellite')
|
||||
+SATELLITE_CAPSULE_RPM = fake_package('satellite-capsule')
|
||||
+
|
||||
+SATELLITE_REPOSITORY = UsedRepository(repository='satellite-6.99-for-rhel-8-x86_64-rpms')
|
||||
+CAPSULE_REPOSITORY = UsedRepository(repository='satellite-capsule-6.99-for-rhel-8-x86_64-rpms')
|
||||
+MAINTENANCE_REPOSITORY = UsedRepository(repository='satellite-maintenance-6.99-for-rhel-8-x86_64-rpms')
|
||||
+
|
||||
+
|
||||
+def test_no_satellite_present(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ message = current_actor_context.consume(SatelliteFacts)
|
||||
+ assert not message
|
||||
+
|
||||
+
|
||||
+def test_satellite_present(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ message = current_actor_context.consume(SatelliteFacts)[0]
|
||||
+ assert message.has_foreman
|
||||
+
|
||||
+
|
||||
+def test_wrong_arch(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG_S390X)
|
||||
+ message = current_actor_context.consume(SatelliteFacts)
|
||||
+ assert not message
|
||||
+
|
||||
+
|
||||
+def test_satellite_capsule_present(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_PROXY_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ message = current_actor_context.consume(SatelliteFacts)[0]
|
||||
+ assert message.has_foreman
|
||||
+
|
||||
+
|
||||
+def test_no_katello_installer_present(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ message = current_actor_context.consume(SatelliteFacts)[0]
|
||||
+ assert not message.has_katello_installer
|
||||
+
|
||||
+
|
||||
+def test_katello_installer_present(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM, KATELLO_INSTALLER_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ message = current_actor_context.consume(SatelliteFacts)[0]
|
||||
+ # while the katello installer rpm is present, we do not want this to be true
|
||||
+ # as the version in EL8 doesn't have the system checks we skip with this flag
|
||||
+ assert not message.has_katello_installer
|
||||
+
|
||||
+
|
||||
+def test_installs_related_package(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM, KATELLO_RPM, RUBYGEM_KATELLO_RPM,
|
||||
+ RUBYGEM_FOREMAN_PUPPET_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ message = current_actor_context.consume(RpmTransactionTasks)[0]
|
||||
+ assert 'katello' in message.to_install
|
||||
+ assert 'rubygem-katello' in message.to_install
|
||||
+ assert 'rubygem-foreman_puppet' in message.to_install
|
||||
+
|
||||
+
|
||||
+def test_installs_satellite_package(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM, SATELLITE_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ message = current_actor_context.consume(RpmTransactionTasks)[0]
|
||||
+ assert 'satellite' in message.to_install
|
||||
+ assert 'satellite-capsule' not in message.to_install
|
||||
+
|
||||
+
|
||||
+def test_installs_satellite_capsule_package(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_PROXY_RPM, SATELLITE_CAPSULE_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+ message = current_actor_context.consume(RpmTransactionTasks)[0]
|
||||
+ assert 'satellite-capsule' in message.to_install
|
||||
+ assert 'satellite' not in message.to_install
|
||||
+
|
||||
+
|
||||
+def test_detects_local_postgresql(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM, POSTGRESQL_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+
|
||||
+ satellitemsg = current_actor_context.consume(SatelliteFacts)[0]
|
||||
+ assert satellitemsg.postgresql.local_postgresql
|
||||
+
|
||||
+
|
||||
+def test_detects_remote_postgresql(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+
|
||||
+ satellitemsg = current_actor_context.consume(SatelliteFacts)[0]
|
||||
+ assert not satellitemsg.postgresql.local_postgresql
|
||||
+
|
||||
+
|
||||
+def test_enables_right_repositories_on_satellite(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM, SATELLITE_RPM]))
|
||||
+ current_actor_context.feed(UsedRepositories(repositories=[SATELLITE_REPOSITORY, MAINTENANCE_REPOSITORY]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+
|
||||
+ rpmmessage = current_actor_context.consume(RepositoriesSetupTasks)[0]
|
||||
+
|
||||
+ assert 'satellite-maintenance-6.99-for-rhel-9-x86_64-rpms' in rpmmessage.to_enable
|
||||
+ assert 'satellite-6.99-for-rhel-9-x86_64-rpms' in rpmmessage.to_enable
|
||||
+ assert 'satellite-capsule-6.99-for-rhel-9-x86_64-rpms' not in rpmmessage.to_enable
|
||||
+
|
||||
+
|
||||
+def test_enables_right_repositories_on_capsule(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_PROXY_RPM, SATELLITE_CAPSULE_RPM]))
|
||||
+ current_actor_context.feed(UsedRepositories(repositories=[CAPSULE_REPOSITORY, MAINTENANCE_REPOSITORY]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+
|
||||
+ rpmmessage = current_actor_context.consume(RepositoriesSetupTasks)[0]
|
||||
+
|
||||
+ assert 'satellite-maintenance-6.99-for-rhel-9-x86_64-rpms' in rpmmessage.to_enable
|
||||
+ assert 'satellite-6.99-for-rhel-9-x86_64-rpms' not in rpmmessage.to_enable
|
||||
+ assert 'satellite-capsule-6.99-for-rhel-9-x86_64-rpms' in rpmmessage.to_enable
|
||||
+
|
||||
+
|
||||
+def test_enables_right_repositories_on_upstream(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+
|
||||
+ message = current_actor_context.consume(RepositoriesSetupTasks)
|
||||
+
|
||||
+ assert not message
|
||||
--
|
||||
2.42.0
|
||||
|
112
0029-Refresh-collation-version-if-pulp-ansible-is-present.patch
Normal file
112
0029-Refresh-collation-version-if-pulp-ansible-is-present.patch
Normal file
@ -0,0 +1,112 @@
|
||||
From 720bb13c5eb411469e8bf825b93aeefdc771f039 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Wed, 24 Apr 2024 13:58:39 +0200
|
||||
Subject: [PATCH 29/34] Refresh collation version if pulp-ansible is present
|
||||
|
||||
When migrating to a new OS, we REINDEX all databases.
|
||||
pulp_ansible ships with an own collation (using ICU), which needs a
|
||||
version refresh after the REINDEX has been done.
|
||||
---
|
||||
.../common/actors/satellite_upgrader/actor.py | 4 ++++
|
||||
.../tests/unit_test_satellite_upgrader.py | 18 ++++++++++++++++++
|
||||
.../system_upgrade/common/models/satellite.py | 2 ++
|
||||
.../actors/satellite_upgrade_facts/actor.py | 1 +
|
||||
.../tests/unit_test_satellite_upgrade_facts.py | 9 +++++++++
|
||||
5 files changed, 34 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/satellite_upgrader/actor.py b/repos/system_upgrade/common/actors/satellite_upgrader/actor.py
|
||||
index f498f2fa..2e0290ae 100644
|
||||
--- a/repos/system_upgrade/common/actors/satellite_upgrader/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/satellite_upgrader/actor.py
|
||||
@@ -25,6 +25,10 @@ class SatelliteUpgrader(Actor):
|
||||
run(['sed', '-i', '/data_directory/d', '/var/lib/pgsql/data/postgresql.conf'])
|
||||
run(['systemctl', 'start', 'postgresql'])
|
||||
run(['runuser', '-u', 'postgres', '--', 'reindexdb', '-a'])
|
||||
+ if facts.postgresql.has_pulp_ansible_semver:
|
||||
+ run(['runuser', '-c',
|
||||
+ 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore',
|
||||
+ 'postgres'])
|
||||
except CalledProcessError as e:
|
||||
api.current_logger().error('Failed to reindex the database: {}'.format(str(e)))
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py b/repos/system_upgrade/common/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py
|
||||
index 2f3509f3..55896c75 100644
|
||||
--- a/repos/system_upgrade/common/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py
|
||||
+++ b/repos/system_upgrade/common/actors/satellite_upgrader/tests/unit_test_satellite_upgrader.py
|
||||
@@ -48,3 +48,21 @@ def test_run_reindexdb(monkeypatch, current_actor_context):
|
||||
assert mocked_run.commands[1] == ['systemctl', 'start', 'postgresql']
|
||||
assert mocked_run.commands[2] == ['runuser', '-u', 'postgres', '--', 'reindexdb', '-a']
|
||||
assert mocked_run.commands[3] == ['foreman-installer', '--disable-system-checks']
|
||||
+
|
||||
+
|
||||
+def test_run_reindexdb_with_pulp_ansible(monkeypatch, current_actor_context):
|
||||
+ mocked_run = MockedRun()
|
||||
+ monkeypatch.setattr('leapp.libraries.stdlib.run', mocked_run)
|
||||
+ current_actor_context.feed(SatelliteFacts(has_foreman=True,
|
||||
+ postgresql=SatellitePostgresqlFacts(local_postgresql=True,
|
||||
+ has_pulp_ansible_semver=True)))
|
||||
+ current_actor_context.run()
|
||||
+ assert mocked_run.commands
|
||||
+ assert len(mocked_run.commands) == 5
|
||||
+ assert mocked_run.commands[0] == ['sed', '-i', '/data_directory/d', '/var/lib/pgsql/data/postgresql.conf']
|
||||
+ assert mocked_run.commands[1] == ['systemctl', 'start', 'postgresql']
|
||||
+ assert mocked_run.commands[2] == ['runuser', '-u', 'postgres', '--', 'reindexdb', '-a']
|
||||
+ assert mocked_run.commands[3] == ['runuser', '-c',
|
||||
+ 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore',
|
||||
+ 'postgres']
|
||||
+ assert mocked_run.commands[4] == ['foreman-installer', '--disable-system-checks']
|
||||
diff --git a/repos/system_upgrade/common/models/satellite.py b/repos/system_upgrade/common/models/satellite.py
|
||||
index b4282790..532f6a3a 100644
|
||||
--- a/repos/system_upgrade/common/models/satellite.py
|
||||
+++ b/repos/system_upgrade/common/models/satellite.py
|
||||
@@ -15,6 +15,8 @@ class SatellitePostgresqlFacts(Model):
|
||||
""" How many bytes are required on the target partition """
|
||||
space_available = fields.Nullable(fields.Integer())
|
||||
""" How many bytes are available on the target partition """
|
||||
+ has_pulp_ansible_semver = fields.Boolean(default=False)
|
||||
+ """ Whether the DB has the pulp_ansible_semver collation """
|
||||
|
||||
|
||||
class SatelliteFacts(Model):
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/actor.py b/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/actor.py
|
||||
index 2dc78cce..46612876 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/actor.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/actor.py
|
||||
@@ -57,6 +57,7 @@ class SatelliteUpgradeFacts(Actor):
|
||||
has_katello_installer=False,
|
||||
postgresql=SatellitePostgresqlFacts(
|
||||
local_postgresql=local_postgresql,
|
||||
+ has_pulp_ansible_semver=has_package(InstalledRPM, 'python3.11-pulp-ansible'),
|
||||
),
|
||||
))
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py b/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
|
||||
index b0e44c46..e7ca512e 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
|
||||
@@ -26,6 +26,7 @@ RUBYGEM_FOREMAN_PUPPET_RPM = fake_package('rubygem-foreman_puppet')
|
||||
POSTGRESQL_RPM = fake_package('postgresql-server')
|
||||
SATELLITE_RPM = fake_package('satellite')
|
||||
SATELLITE_CAPSULE_RPM = fake_package('satellite-capsule')
|
||||
+PULP_ANSIBLE_RPM = fake_package('python3.11-pulp-ansible')
|
||||
|
||||
SATELLITE_REPOSITORY = UsedRepository(repository='satellite-6.99-for-rhel-8-x86_64-rpms')
|
||||
CAPSULE_REPOSITORY = UsedRepository(repository='satellite-capsule-6.99-for-rhel-8-x86_64-rpms')
|
||||
@@ -118,6 +119,14 @@ def test_detects_remote_postgresql(current_actor_context):
|
||||
assert not satellitemsg.postgresql.local_postgresql
|
||||
|
||||
|
||||
+def test_detects_pulp_ansible(current_actor_context):
|
||||
+ current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM, POSTGRESQL_RPM, PULP_ANSIBLE_RPM]))
|
||||
+ current_actor_context.run(config_model=mock_configs.CONFIG)
|
||||
+
|
||||
+ satellitemsg = current_actor_context.consume(SatelliteFacts)[0]
|
||||
+ assert satellitemsg.postgresql.has_pulp_ansible_semver
|
||||
+
|
||||
+
|
||||
def test_enables_right_repositories_on_satellite(current_actor_context):
|
||||
current_actor_context.feed(InstalledRPM(items=[FOREMAN_RPM, SATELLITE_RPM]))
|
||||
current_actor_context.feed(UsedRepositories(repositories=[SATELLITE_REPOSITORY, MAINTENANCE_REPOSITORY]))
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,90 @@
|
||||
From bad2fb2e446246dc80807b078c80e0c98fd72fe5 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Fri, 26 Apr 2024 09:08:58 +0200
|
||||
Subject: [PATCH 30/34] Refactor satellite_upgrade_services to use
|
||||
SystemdServicesTasks
|
||||
|
||||
We used to just delete the symlinks in /etc/systemd, but with the new
|
||||
systemd actors this doesn't work anymore as they will restore the
|
||||
pre-delete state because they by default aim at having source and
|
||||
target systems match in terms of services. By using SystemdServicesTasks
|
||||
we can explicitly turn those services off and inform all interested
|
||||
parties about this.
|
||||
---
|
||||
.../satellite_upgrade_services/actor.py | 15 ++++++------
|
||||
.../unit_test_satellite_upgrade_services.py | 24 +++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 8 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/actors/satellite_upgrade_services/tests/unit_test_satellite_upgrade_services.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/satellite_upgrade_services/actor.py b/repos/system_upgrade/common/actors/satellite_upgrade_services/actor.py
|
||||
index 3cda49a9..d14edfb7 100644
|
||||
--- a/repos/system_upgrade/common/actors/satellite_upgrade_services/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/satellite_upgrade_services/actor.py
|
||||
@@ -2,8 +2,8 @@ import glob
|
||||
import os
|
||||
|
||||
from leapp.actors import Actor
|
||||
-from leapp.models import SatelliteFacts
|
||||
-from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag
|
||||
+from leapp.models import SatelliteFacts, SystemdServicesTasks
|
||||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
|
||||
SYSTEMD_WANTS_BASE = '/etc/systemd/system/multi-user.target.wants/'
|
||||
SERVICES_TO_DISABLE = ['dynflow-sidekiq@*', 'foreman', 'foreman-proxy',
|
||||
@@ -18,8 +18,8 @@ class SatelliteUpgradeServices(Actor):
|
||||
|
||||
name = 'satellite_upgrade_services'
|
||||
consumes = (SatelliteFacts,)
|
||||
- produces = ()
|
||||
- tags = (IPUWorkflowTag, ApplicationsPhaseTag)
|
||||
+ produces = (SystemdServicesTasks,)
|
||||
+ tags = (IPUWorkflowTag, FactsPhaseTag)
|
||||
|
||||
def process(self):
|
||||
facts = next(self.consume(SatelliteFacts), None)
|
||||
@@ -27,9 +27,8 @@ class SatelliteUpgradeServices(Actor):
|
||||
return
|
||||
|
||||
# disable services, will be re-enabled by the installer
|
||||
+ services_to_disable = []
|
||||
for service_name in SERVICES_TO_DISABLE:
|
||||
for service in glob.glob(os.path.join(SYSTEMD_WANTS_BASE, '{}.service'.format(service_name))):
|
||||
- try:
|
||||
- os.unlink(service)
|
||||
- except OSError as e:
|
||||
- self.log.warning('Failed disabling service {}: {}'.format(service, e))
|
||||
+ services_to_disable.append(os.path.basename(service))
|
||||
+ self.produce(SystemdServicesTasks(to_disable=services_to_disable))
|
||||
diff --git a/repos/system_upgrade/common/actors/satellite_upgrade_services/tests/unit_test_satellite_upgrade_services.py b/repos/system_upgrade/common/actors/satellite_upgrade_services/tests/unit_test_satellite_upgrade_services.py
|
||||
new file mode 100644
|
||||
index 00000000..f41621ab
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/satellite_upgrade_services/tests/unit_test_satellite_upgrade_services.py
|
||||
@@ -0,0 +1,24 @@
|
||||
+import glob
|
||||
+
|
||||
+from leapp.models import SatelliteFacts, SatellitePostgresqlFacts, SystemdServicesTasks
|
||||
+
|
||||
+
|
||||
+def test_disable_httpd(monkeypatch, current_actor_context):
|
||||
+ def mock_glob():
|
||||
+ orig_glob = glob.glob
|
||||
+
|
||||
+ def mocked_glob(pathname):
|
||||
+ if pathname == '/etc/systemd/system/multi-user.target.wants/httpd.service':
|
||||
+ return [pathname]
|
||||
+ return orig_glob(pathname)
|
||||
+
|
||||
+ return mocked_glob
|
||||
+
|
||||
+ monkeypatch.setattr('glob.glob', mock_glob())
|
||||
+
|
||||
+ current_actor_context.feed(SatelliteFacts(has_foreman=True,
|
||||
+ postgresql=SatellitePostgresqlFacts(local_postgresql=False)))
|
||||
+ current_actor_context.run()
|
||||
+
|
||||
+ message = current_actor_context.consume(SystemdServicesTasks)[0]
|
||||
+ assert 'httpd.service' in message.to_disable
|
||||
--
|
||||
2.42.0
|
||||
|
144
0031-mount-usr-Implement-try-sleep-loop-add-time-for-stor.patch
Normal file
144
0031-mount-usr-Implement-try-sleep-loop-add-time-for-stor.patch
Normal file
@ -0,0 +1,144 @@
|
||||
From 64e2c58ac3bd97cbb09daf4c861204705c69ec97 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 3 May 2024 14:44:51 +0200
|
||||
Subject: [PATCH 31/34] mount /usr: Implement try-sleep loop - add time for
|
||||
storage initialisation
|
||||
|
||||
This problem is typical for SAN + FC when the storage needs sometimes
|
||||
more time for the initialisation. Implemented try-sleep loop.
|
||||
Retry the activation of the storage + /usr mounting in 15s.
|
||||
The loop can be repeated 10 times, so total time is 150s right now
|
||||
for the activation.
|
||||
|
||||
Note that this is not proper solution for the storage initialisation,
|
||||
however we have discovered some obstacles in the bootup process to
|
||||
be able to do it correctly as we would like to. Regarding limited
|
||||
time, we are going to deliver this solution, that should improve
|
||||
the experience and should be safe to not cause regressions for already
|
||||
working functionality. We expect to provide better solution for
|
||||
newer upgrades paths in future (IPU 8->9 and newer).
|
||||
|
||||
jira: https://issues.redhat.com/browse/RHEL-3344
|
||||
---
|
||||
.../dracut/85sys-upgrade-redhat/mount_usr.sh | 95 +++++++++++++++----
|
||||
1 file changed, 79 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/mount_usr.sh b/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/mount_usr.sh
|
||||
index 3c52652f..db065d87 100755
|
||||
--- a/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/mount_usr.sh
|
||||
+++ b/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/mount_usr.sh
|
||||
@@ -22,6 +22,18 @@ filtersubvol() {
|
||||
|
||||
mount_usr()
|
||||
{
|
||||
+ #
|
||||
+ # mount_usr [true | false]
|
||||
+ # Expected a "true" value for the last attempt to mount /usr. On the last
|
||||
+ # attempt, in case of failure drop to shell.
|
||||
+ #
|
||||
+ # Return 0 when everything is all right
|
||||
+ # In case of failure and /usr has been detected:
|
||||
+ # return 2 when $1 is "true" (drop to shell invoked)
|
||||
+ # (note: possibly it's nonsense, but to be sure..)
|
||||
+ # return 1 otherwise
|
||||
+ #
|
||||
+ _last_attempt="$1"
|
||||
# check, if we have to mount the /usr filesystem
|
||||
while read -r _dev _mp _fs _opts _freq _passno; do
|
||||
[ "${_dev%%#*}" != "$_dev" ] && continue
|
||||
@@ -60,25 +72,76 @@ mount_usr()
|
||||
fi
|
||||
done < "${NEWROOT}/etc/fstab" >> /etc/fstab
|
||||
|
||||
- if [ "$_usr_found" != "" ]; then
|
||||
- info "Mounting /usr with -o $_opts"
|
||||
- mount "${NEWROOT}/usr" 2>&1 | vinfo
|
||||
- mount -o remount,rw "${NEWROOT}/usr"
|
||||
+ if [ "$_usr_found" = "" ]; then
|
||||
+ # nothing to do
|
||||
+ return 0
|
||||
+ fi
|
||||
|
||||
- if ! ismounted "${NEWROOT}/usr"; then
|
||||
- warn "Mounting /usr to ${NEWROOT}/usr failed"
|
||||
- warn "*** Dropping you to a shell; the system will continue"
|
||||
- warn "*** when you leave the shell."
|
||||
- action_on_fail
|
||||
- fi
|
||||
+ info "Mounting /usr with -o $_opts"
|
||||
+ mount "${NEWROOT}/usr" 2>&1 | vinfo
|
||||
+ mount -o remount,rw "${NEWROOT}/usr"
|
||||
+
|
||||
+ if ismounted "${NEWROOT}/usr"; then
|
||||
+ # success!!
|
||||
+ return 0
|
||||
+ fi
|
||||
+
|
||||
+ if [ "$_last_attempt" = "true" ]; then
|
||||
+ warn "Mounting /usr to ${NEWROOT}/usr failed"
|
||||
+ warn "*** Dropping you to a shell; the system will continue"
|
||||
+ warn "*** when you leave the shell."
|
||||
+ action_on_fail
|
||||
+ return 2
|
||||
fi
|
||||
+
|
||||
+ return 1
|
||||
}
|
||||
|
||||
-if [ -f "${NEWROOT}/etc/fstab" ]; then
|
||||
- # In case we have the LVM command available try make it activate all partitions
|
||||
- if command -v lvm 2>/dev/null 1>/dev/null; then
|
||||
- lvm vgchange -a y
|
||||
+
|
||||
+try_to_mount_usr() {
|
||||
+ _last_attempt="$1"
|
||||
+ if [ ! -f "${NEWROOT}/etc/fstab" ]; then
|
||||
+ warn "File ${NEWROOT}/etc/fstab doesn't exist."
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
+ # In case we have the LVM command available try make it activate all partitions
|
||||
+ if command -v lvm 2>/dev/null 1>/dev/null; then
|
||||
+ lvm vgchange -a y || {
|
||||
+ warn "Detected problem when tried to activate LVM VG."
|
||||
+ if [ "$_last_attempt" != "true" ]; then
|
||||
+ # this is not last execution, retry
|
||||
+ return 1
|
||||
+ fi
|
||||
+ # NOTE(pstodulk):
|
||||
+ # last execution, so call mount_usr anyway
|
||||
+ # I am not 100% about lvm vgchange exit codes and I am aware of
|
||||
+ # possible warnings, in this last run, let's keep it on mount_usr
|
||||
+ # anyway..
|
||||
+ }
|
||||
+ fi
|
||||
+
|
||||
+ mount_usr "$1"
|
||||
+}
|
||||
+
|
||||
+_sleep_timeout=15
|
||||
+_last_attempt="false"
|
||||
+for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
|
||||
+ if [ $i -eq 11 ]; then
|
||||
+ _last_attempt="true"
|
||||
fi
|
||||
+ try_to_mount_usr "$_last_attempt" && break
|
||||
+
|
||||
+ # something is wrong. In some cases, storage needs more time for the
|
||||
+ # initialisation - especially in case of SAN.
|
||||
+
|
||||
+ if [ "$_last_attempt" = "true" ]; then
|
||||
+ warn "The last attempt to initialize storage has not been successful."
|
||||
+ warn "Unknown state of the storage. It is possible that upgrade will be stopped."
|
||||
+ break
|
||||
+ fi
|
||||
+
|
||||
+ warn "Failed attempt to initialize the storage. Retry in $_sleep_timeout seconds. Attempt: $i of 10"
|
||||
+ sleep $_sleep_timeout
|
||||
+done
|
||||
|
||||
- mount_usr
|
||||
-fi
|
||||
--
|
||||
2.42.0
|
||||
|
374
0032-Add-additional-KB-resources.patch
Normal file
374
0032-Add-additional-KB-resources.patch
Normal file
@ -0,0 +1,374 @@
|
||||
From 3cb522d3a682365dae5d8745056f4671bdd5e41b Mon Sep 17 00:00:00 2001
|
||||
From: Michal Reznik <mreznik@redhat.com>
|
||||
Date: Fri, 3 May 2024 13:47:49 +0200
|
||||
Subject: [PATCH 32/34] Add additional KB resources
|
||||
|
||||
add aditional KB resources in a form of ExternalLink or
|
||||
error details as requested by support
|
||||
---
|
||||
.../libraries/checkbootavailspace.py | 4 ++++
|
||||
.../common/actors/checkcifs/libraries/checkcifs.py | 5 +++++
|
||||
.../libraries/checkdddd.py | 10 ++++++++++
|
||||
.../common/actors/checkmemory/libraries/checkmemory.py | 5 +++++
|
||||
repos/system_upgrade/common/actors/checknfs/actor.py | 4 ++++
|
||||
.../common/actors/checkrootsymlinks/actor.py | 5 +++++
|
||||
.../libraries/checkyumpluginsenabled.py | 4 ++++
|
||||
.../libraries/checkinstalledkernels.py | 5 +++++
|
||||
.../missinggpgkeysinhibitor/libraries/missinggpgkey.py | 5 ++++-
|
||||
.../common/actors/opensshpermitrootlogincheck/actor.py | 5 +++++
|
||||
.../common/actors/persistentnetnamesdisable/actor.py | 5 +++++
|
||||
.../targetuserspacecreator/libraries/userspacegen.py | 9 +++++++++
|
||||
.../actors/verifydialogs/libraries/verifydialogs.py | 5 +++++
|
||||
repos/system_upgrade/common/libraries/rhsm.py | 3 ++-
|
||||
.../system_upgrade/el7toel8/actors/checkbtrfs/actor.py | 4 ++++
|
||||
.../actors/checkhacluster/libraries/checkhacluster.py | 4 ++++
|
||||
.../el7toel8/actors/checkremovedpammodules/actor.py | 4 ++++
|
||||
.../libraries/checkinstalleddevelkernels.py | 4 ++++
|
||||
.../libraries/satellite_upgrade_check.py | 5 +++++
|
||||
.../actors/checkifcfg/libraries/checkifcfg_ifcfg.py | 5 +++++
|
||||
.../actors/firewalldcheckallowzonedrifting/actor.py | 5 +++++
|
||||
21 files changed, 103 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkbootavailspace/libraries/checkbootavailspace.py b/repos/system_upgrade/common/actors/checkbootavailspace/libraries/checkbootavailspace.py
|
||||
index 7380f335..0cc4cf7d 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkbootavailspace/libraries/checkbootavailspace.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkbootavailspace/libraries/checkbootavailspace.py
|
||||
@@ -32,6 +32,10 @@ def inhibit_upgrade(avail_bytes):
|
||||
'/boot needs additional {0} MiB to be able to accommodate the upgrade initramfs and new kernel.'.format(
|
||||
additional_mib_needed)
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/298263',
|
||||
+ title='Why does kernel cannot be upgraded due to insufficient space in /boot ?'
|
||||
+ ),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.FILESYSTEM]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
diff --git a/repos/system_upgrade/common/actors/checkcifs/libraries/checkcifs.py b/repos/system_upgrade/common/actors/checkcifs/libraries/checkcifs.py
|
||||
index b3ae146f..fc26ea70 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkcifs/libraries/checkcifs.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkcifs/libraries/checkcifs.py
|
||||
@@ -18,6 +18,11 @@ def checkcifs(storage_info):
|
||||
reporting.Groups.NETWORK
|
||||
]),
|
||||
reporting.Remediation(hint='Comment out CIFS entries to proceed with the upgrade.'),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/6964304',
|
||||
+ title='Leapp upgrade failed with error '
|
||||
+ '"Inhibitor: Use of CIFS detected. Upgrade cannot proceed"'
|
||||
+ ),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
reporting.RelatedResource('file', '/etc/fstab')
|
||||
])
|
||||
diff --git a/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py b/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
index df431c0e..defe3f9a 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
@@ -35,6 +35,16 @@ def create_inhibitors(inhibiting_entries):
|
||||
source=get_source_major_version(),
|
||||
)
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/6971716',
|
||||
+ title='Leapp preupgrade getting "Inhibitor: Detected loaded kernel drivers which have been '
|
||||
+ 'removed in RHEL 8. Upgrade cannot proceed." '
|
||||
+ ),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/5436131',
|
||||
+ title='Leapp upgrade fail with error "Inhibitor: Detected loaded kernel drivers which '
|
||||
+ 'have been removed in RHEL 8. Upgrade cannot proceed."'
|
||||
+ ),
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL, reporting.Groups.DRIVERS]),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
diff --git a/repos/system_upgrade/common/actors/checkmemory/libraries/checkmemory.py b/repos/system_upgrade/common/actors/checkmemory/libraries/checkmemory.py
|
||||
index 25012273..808c9662 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkmemory/libraries/checkmemory.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkmemory/libraries/checkmemory.py
|
||||
@@ -42,6 +42,11 @@ def process():
|
||||
reporting.Summary(summary),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.SANITY, reporting.Groups.INHIBITOR]),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7014179',
|
||||
+ title='Leapp upgrade fail with error"Minimum memory requirements '
|
||||
+ 'for RHEL 8 are not met"Upgrade cannot proceed'
|
||||
+ ),
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/articles/rhel-limits',
|
||||
title='Red Hat Enterprise Linux Technology Capabilities and Limits'
|
||||
diff --git a/repos/system_upgrade/common/actors/checknfs/actor.py b/repos/system_upgrade/common/actors/checknfs/actor.py
|
||||
index 208c5dd9..94c5e606 100644
|
||||
--- a/repos/system_upgrade/common/actors/checknfs/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checknfs/actor.py
|
||||
@@ -61,6 +61,10 @@ class CheckNfs(Actor):
|
||||
reporting.Groups.NETWORK
|
||||
]),
|
||||
reporting.Remediation(hint='Disable NFS temporarily for the upgrade if possible.'),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/6964006',
|
||||
+ title='Why does leapp upgrade fail on detecting NFS during upgrade?'
|
||||
+ ),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
] + fstab_related_resource
|
||||
)
|
||||
diff --git a/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py b/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
index 2769b7c1..c35272b2 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkrootsymlinks/actor.py
|
||||
@@ -37,6 +37,11 @@ class CheckRootSymlinks(Actor):
|
||||
'point to absolute paths.\n'
|
||||
'Please change these links to relative ones.'
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/6989732',
|
||||
+ title='leapp upgrade stops with Inhibitor "Upgrade requires links in root '
|
||||
+ 'directory to be relative"'
|
||||
+ ),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR])]
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py b/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
index 48f38d0a..5522af9c 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkyumpluginsenabled/libraries/checkyumpluginsenabled.py
|
||||
@@ -63,6 +63,10 @@ def check_required_yum_plugins_enabled(pkg_manager_info):
|
||||
# Provide all commands as one due to problems with satellites
|
||||
commands=[['bash', '-c', '"{0}"'.format('; '.join(remediation_commands))]]
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7028063',
|
||||
+ title='Why is Leapp preupgrade generating "Inhibitor: Required YUM plugins are not being loaded."'
|
||||
+ ),
|
||||
reporting.RelatedResource('file', pkg_manager_config_path),
|
||||
reporting.RelatedResource('file', subscription_manager_plugin_conf),
|
||||
reporting.RelatedResource('file', product_id_plugin_conf),
|
||||
diff --git a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py
|
||||
index 95882d29..4573354b 100644
|
||||
--- a/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py
|
||||
+++ b/repos/system_upgrade/common/actors/kernel/checkinstalledkernels/libraries/checkinstalledkernels.py
|
||||
@@ -103,5 +103,10 @@ def process():
|
||||
reporting.Groups([reporting.Groups.KERNEL, reporting.Groups.BOOT]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
reporting.Remediation(hint=remediation),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7014134',
|
||||
+ title='Leapp upgrade fail with error "Inhibitor:Newest installed kernel '
|
||||
+ 'not in use" Upgrade cannot proceed'
|
||||
+ ),
|
||||
reporting.RelatedResource('package', 'kernel')
|
||||
])
|
||||
diff --git a/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py b/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py
|
||||
index 9a806ca2..4b93e741 100644
|
||||
--- a/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py
|
||||
+++ b/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py
|
||||
@@ -65,7 +65,10 @@ def _consume_data():
|
||||
used_target_repos = next(api.consume(UsedTargetRepositories)).repos
|
||||
except StopIteration:
|
||||
raise StopActorExecutionError(
|
||||
- 'Could not check for valid GPG keys', details={'details': 'No UsedTargetRepositories facts'}
|
||||
+ 'Could not check for valid GPG keys', details={
|
||||
+ 'details': 'No UsedTargetRepositories facts',
|
||||
+ 'link': 'https://access.redhat.com/solutions/7061850'
|
||||
+ }
|
||||
)
|
||||
|
||||
try:
|
||||
diff --git a/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py b/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
index 2ac4ec8f..7a49622f 100644
|
||||
--- a/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/opensshpermitrootlogincheck/actor.py
|
||||
@@ -135,6 +135,11 @@ class OpenSshPermitRootLoginCheck(Actor):
|
||||
'sshd_config next to the "PermitRootLogin yes" directive '
|
||||
'to prevent rpm replacing it during the upgrade.'
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7003083',
|
||||
+ title='Why Leapp Preupgrade for RHEL 8 to 9 getting '
|
||||
+ '"Possible problems with remote login using root account" ?'
|
||||
+ ),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
] + COMMON_RESOURCES)
|
||||
# If the configuration is modified and contains any directive allowing
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
index 0e13c139..1f7f1413 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
@@ -50,6 +50,11 @@ class PersistentNetNamesDisable(Actor):
|
||||
title='How to perform an in-place upgrade to RHEL 8 when using kernel NIC names on RHEL 7',
|
||||
url='https://access.redhat.com/solutions/4067471'
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
+ '"Network configuration for unsupported device types detected"',
|
||||
+ url='https://access.redhat.com/solutions/7009239'
|
||||
+ ),
|
||||
reporting.Remediation(
|
||||
hint='Rename all ethX network interfaces following the attached KB solution article.'
|
||||
),
|
||||
diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
index d60bc75f..dc93c9a0 100644
|
||||
--- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
+++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
@@ -828,6 +828,10 @@ def _get_rhsm_available_repoids(context):
|
||||
' to set up Satellite and the system properly.'
|
||||
|
||||
).format(target_major_version)),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/5392811',
|
||||
+ title='RHEL 7 to RHEL 8 LEAPP Upgrade Failing When Using Red Hat Satellite'
|
||||
+ ),
|
||||
reporting.ExternalLink(
|
||||
# https://red.ht/preparing-for-upgrade-to-rhel8
|
||||
# https://red.ht/preparing-for-upgrade-to-rhel9
|
||||
@@ -1007,6 +1011,11 @@ def gather_target_repositories(context, indata):
|
||||
# https://red.ht/preparing-for-upgrade-to-rhel10
|
||||
url='https://red.ht/preparing-for-upgrade-to-rhel{}'.format(target_major_version),
|
||||
title='Preparing for the upgrade'),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7001181',
|
||||
+ title='LEAPP Upgrade Failing from RHEL 7 to RHEL 8 when system is '
|
||||
+ 'registered to custromer portal'
|
||||
+ ),
|
||||
reporting.RelatedResource("file", "/etc/leapp/files/repomap.json"),
|
||||
reporting.RelatedResource("file", "/etc/yum.repos.d/")
|
||||
])
|
||||
diff --git a/repos/system_upgrade/common/actors/verifydialogs/libraries/verifydialogs.py b/repos/system_upgrade/common/actors/verifydialogs/libraries/verifydialogs.py
|
||||
index a6dbe6eb..a79079b1 100644
|
||||
--- a/repos/system_upgrade/common/actors/verifydialogs/libraries/verifydialogs.py
|
||||
+++ b/repos/system_upgrade/common/actors/verifydialogs/libraries/verifydialogs.py
|
||||
@@ -20,5 +20,10 @@ def check_dialogs(inhibit_if_no_userchoice=True):
|
||||
reporting.Summary(summary.format('\n'.join(sections))),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR] if inhibit_if_no_userchoice else []),
|
||||
reporting.Remediation(hint=dialogs_remediation, commands=cmd_remediation),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7035321',
|
||||
+ title='Leapp upgrade fail with error "Inhibitor: Missing required answers '
|
||||
+ 'in the answer file."'
|
||||
+ ),
|
||||
reporting.Key(dialog.key)]
|
||||
reporting.create_report(report_data + dialog_resources)
|
||||
diff --git a/repos/system_upgrade/common/libraries/rhsm.py b/repos/system_upgrade/common/libraries/rhsm.py
|
||||
index eb388829..74f6aeb1 100644
|
||||
--- a/repos/system_upgrade/common/libraries/rhsm.py
|
||||
+++ b/repos/system_upgrade/common/libraries/rhsm.py
|
||||
@@ -85,7 +85,8 @@ def _handle_rhsm_exceptions(hint=None):
|
||||
details={
|
||||
'details': str(e),
|
||||
'stderr': e.stderr,
|
||||
- 'hint': hint or _def_hint
|
||||
+ 'hint': hint or _def_hint,
|
||||
+ 'link': 'https://access.redhat.com/solutions/6138372'
|
||||
}
|
||||
)
|
||||
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checkbtrfs/actor.py b/repos/system_upgrade/el7toel8/actors/checkbtrfs/actor.py
|
||||
index c1b07f8d..a3848957 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/checkbtrfs/actor.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checkbtrfs/actor.py
|
||||
@@ -41,6 +41,10 @@ class CheckBtrfs(Actor):
|
||||
title='How do I prevent a kernel module from loading automatically?',
|
||||
url='https://access.redhat.com/solutions/41278'
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ title='Leapp upgrade fail with error "Inhibitor: Btrfs has been removed from RHEL8"',
|
||||
+ url='https://access.redhat.com/solutions/7020130'
|
||||
+ ),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
reporting.Groups([reporting.Groups.FILESYSTEM]),
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checkhacluster/libraries/checkhacluster.py b/repos/system_upgrade/el7toel8/actors/checkhacluster/libraries/checkhacluster.py
|
||||
index 870cf8a9..115867d2 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/checkhacluster/libraries/checkhacluster.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checkhacluster/libraries/checkhacluster.py
|
||||
@@ -25,6 +25,10 @@ def inhibit(node_type):
|
||||
" to a RHEL High Availability or Resilient Storage Cluster"
|
||||
),
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7049940',
|
||||
+ title='Leapp upgrade from RHEL 7 to RHEL 8 fails for pacemaker cluster'
|
||||
+ ),
|
||||
reporting.Remediation(
|
||||
hint=(
|
||||
"Destroy the existing HA cluster"
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/checkremovedpammodules/actor.py b/repos/system_upgrade/el7toel8/actors/checkremovedpammodules/actor.py
|
||||
index 503f6149..d2e92398 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/checkremovedpammodules/actor.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/checkremovedpammodules/actor.py
|
||||
@@ -59,6 +59,10 @@ class CheckRemovedPamModules(Actor):
|
||||
'please remove the pam module(s) from all the files '
|
||||
'under /etc/pam.d/.'.format(', '.join(replacements))
|
||||
),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7004774',
|
||||
+ title='Leapp preupgrade fails with: The pam_tally2 pam module(s) no longer available'
|
||||
+ ),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
] + [reporting.RelatedResource('pam', r) for r in replacements | found_modules])
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/libraries/checkinstalleddevelkernels.py b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/libraries/checkinstalleddevelkernels.py
|
||||
index 0ff4489f..fa49092c 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/libraries/checkinstalleddevelkernels.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/kernel/checkinstalleddevelkernels/checkinstalleddevelkernels/libraries/checkinstalleddevelkernels.py
|
||||
@@ -38,5 +38,9 @@ def process():
|
||||
reporting.Groups([reporting.Groups.KERNEL]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
reporting.Remediation(hint=hint, commands=commands),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/4723671',
|
||||
+ title='leapp upgrade fails on kernel-devel packages'
|
||||
+ ),
|
||||
reporting.RelatedResource('package', 'kernel-devel')
|
||||
])
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py
|
||||
index 6954dd50..82148ef3 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py
|
||||
@@ -53,6 +53,11 @@ def satellite_upgrade_check(facts):
|
||||
reporting.create_report([
|
||||
reporting.Title(title),
|
||||
reporting.Summary(summary),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/6794671',
|
||||
+ title='Leapp preupgrade of Red Hat Satellite 6 fails on '
|
||||
+ 'Old PostgreSQL data found in /var/lib/pgsql/data'
|
||||
+ ),
|
||||
reporting.Severity(severity),
|
||||
reporting.Groups([]),
|
||||
reporting.Groups(flags)
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/checkifcfg/libraries/checkifcfg_ifcfg.py b/repos/system_upgrade/el8toel9/actors/checkifcfg/libraries/checkifcfg_ifcfg.py
|
||||
index 946841df..ed666350 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/checkifcfg/libraries/checkifcfg_ifcfg.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/checkifcfg/libraries/checkifcfg_ifcfg.py
|
||||
@@ -88,6 +88,11 @@ def process():
|
||||
reporting.Title(title),
|
||||
reporting.Summary(summary),
|
||||
reporting.Remediation(hint=remediation),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/7009239',
|
||||
+ title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
+ '"Network configuration for unsupported device types detected"'
|
||||
+ ),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.NETWORK, reporting.Groups.SERVICES]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py b/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
index b7eb5806..0002f6aa 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
@@ -44,6 +44,11 @@ class FirewalldCheckAllowZoneDrifting(Actor):
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/articles/4855631',
|
||||
title='Changes in firewalld related to Zone Drifting'),
|
||||
+ reporting.ExternalLink(
|
||||
+ url='https://access.redhat.com/solutions/6969130',
|
||||
+ title='Leapp Preupgrade check fails with error - '
|
||||
+ '"Inhibitor: Firewalld Configuration AllowZoneDrifting Is Unsupported".'
|
||||
+ ),
|
||||
reporting.Remediation(
|
||||
hint='Set AllowZoneDrifting=no in /etc/firewalld/firewalld.conf',
|
||||
commands=[['sed', '-i', 's/^AllowZoneDrifting=.*/AllowZoneDrifting=no/',
|
||||
--
|
||||
2.42.0
|
||||
|
43
0033-storage-initialisation-apply-sleep-always.patch
Normal file
43
0033-storage-initialisation-apply-sleep-always.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From da5ce33f51b2607c372acfc0e9bb28bf5270ef65 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Sat, 4 May 2024 10:07:14 +0200
|
||||
Subject: [PATCH 33/34] storage initialisation: apply sleep always
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Based on feedback from @rmetrich¹ the sleep period should be applied
|
||||
always as the problem with initialisation is happening also on systems
|
||||
with higher than few number of LVs where /usr is not on dedicated
|
||||
volume.
|
||||
|
||||
1: https://github.com/oamg/leapp-repository/pull/1218#issuecomment-2093303020
|
||||
---
|
||||
.../files/dracut/85sys-upgrade-redhat/mount_usr.sh | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/mount_usr.sh b/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/mount_usr.sh
|
||||
index db065d87..84f4857d 100755
|
||||
--- a/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/mount_usr.sh
|
||||
+++ b/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/mount_usr.sh
|
||||
@@ -127,6 +127,8 @@ try_to_mount_usr() {
|
||||
_sleep_timeout=15
|
||||
_last_attempt="false"
|
||||
for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
|
||||
+ info "Storage initialisation: Attempt $i of 11. Wait $_sleep_timeout seconds."
|
||||
+ sleep $_sleep_timeout
|
||||
if [ $i -eq 11 ]; then
|
||||
_last_attempt="true"
|
||||
fi
|
||||
@@ -141,7 +143,6 @@ for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
|
||||
break
|
||||
fi
|
||||
|
||||
- warn "Failed attempt to initialize the storage. Retry in $_sleep_timeout seconds. Attempt: $i of 10"
|
||||
- sleep $_sleep_timeout
|
||||
+ warn "Failed attempt to initialize the storage. Retry..."
|
||||
done
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
30
0034-Add-renovate-to-track-github-actions-deps.patch
Normal file
30
0034-Add-renovate-to-track-github-actions-deps.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From ce8dfff52c067fc334511c9773759eca8bff8b61 Mon Sep 17 00:00:00 2001
|
||||
From: Rodolfo Olivieri <rolivier@redhat.com>
|
||||
Date: Tue, 7 May 2024 09:38:41 -0300
|
||||
Subject: [PATCH 34/34] Add renovate to track github-actions deps
|
||||
|
||||
The renovate bot will track and automatically update the github actions
|
||||
dependencies in the project.
|
||||
---
|
||||
.github/renovate.json | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
create mode 100644 .github/renovate.json
|
||||
|
||||
diff --git a/.github/renovate.json b/.github/renovate.json
|
||||
new file mode 100644
|
||||
index 00000000..f55d8081
|
||||
--- /dev/null
|
||||
+++ b/.github/renovate.json
|
||||
@@ -0,0 +1,8 @@
|
||||
+{
|
||||
+ "extends": [
|
||||
+ "config:base"
|
||||
+ ],
|
||||
+ "enabledManagers": [
|
||||
+ "github-actions"
|
||||
+ ]
|
||||
+}
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 82b20e29da6c05bfb385c44eed2dc9af72c36148 Mon Sep 17 00:00:00 2001
|
||||
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
|
||||
Date: Sat, 11 May 2024 14:59:13 +0000
|
||||
Subject: [PATCH 35/49] chore(deps): update
|
||||
redhat-plumbers-in-action/differential-shellcheck action to v5
|
||||
|
||||
---
|
||||
.github/workflows/differential-shellcheck.yml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml
|
||||
index 4af99f8d..f643f054 100644
|
||||
--- a/.github/workflows/differential-shellcheck.yml
|
||||
+++ b/.github/workflows/differential-shellcheck.yml
|
||||
@@ -24,6 +24,6 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Differential ShellCheck
|
||||
- uses: redhat-plumbers-in-action/differential-shellcheck@v3
|
||||
+ uses: redhat-plumbers-in-action/differential-shellcheck@v5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
--
|
||||
2.44.0
|
||||
|
76
0036-chore-deps-update-actions-checkout-action-to-v4.patch
Normal file
76
0036-chore-deps-update-actions-checkout-action-to-v4.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From 821a387628e935e1aa9a74af153cd7598c8038c1 Mon Sep 17 00:00:00 2001
|
||||
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
|
||||
Date: Wed, 8 May 2024 12:45:11 +0000
|
||||
Subject: [PATCH 36/49] chore(deps): update actions/checkout action to v4
|
||||
|
||||
---
|
||||
.github/workflows/codespell.yml | 2 +-
|
||||
.github/workflows/differential-shellcheck.yml | 2 +-
|
||||
.github/workflows/reuse-copr-build.yml | 4 ++--
|
||||
.github/workflows/unit-tests.yml | 2 +-
|
||||
4 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
|
||||
index 4921bc90..c0ec20d6 100644
|
||||
--- a/.github/workflows/codespell.yml
|
||||
+++ b/.github/workflows/codespell.yml
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- - uses: actions/checkout@v3
|
||||
+ - uses: actions/checkout@v4
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
ignore_words_list: ro,fo,couldn,repositor
|
||||
diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml
|
||||
index f643f054..f1ed5f6a 100644
|
||||
--- a/.github/workflows/differential-shellcheck.yml
|
||||
+++ b/.github/workflows/differential-shellcheck.yml
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Repository checkout
|
||||
- uses: actions/checkout@v3
|
||||
+ uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
diff --git a/.github/workflows/reuse-copr-build.yml b/.github/workflows/reuse-copr-build.yml
|
||||
index 093e0c1a..c742db50 100644
|
||||
--- a/.github/workflows/reuse-copr-build.yml
|
||||
+++ b/.github/workflows/reuse-copr-build.yml
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
# TODO: The correct way to checkout would be to use similar approach as in get_commit_by_timestamp function of
|
||||
# the github gluetool module (i.e. do not use HEAD but the last commit before comment).
|
||||
id: checkout
|
||||
- uses: actions/checkout@v2
|
||||
+ uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "refs/pull/${{ steps.pr_nr.outputs.pr_nr }}/head"
|
||||
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
- name: Checkout leapp
|
||||
id: checkout_leapp
|
||||
if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
||||
- uses: actions/checkout@v2
|
||||
+ uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "oamg/leapp"
|
||||
ref: "refs/pull/${{ steps.leapp_pr.outputs.leapp_pr }}/head"
|
||||
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
|
||||
index 107a1fc0..e4b4d173 100644
|
||||
--- a/.github/workflows/unit-tests.yml
|
||||
+++ b/.github/workflows/unit-tests.yml
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
- uses: actions/checkout@v2
|
||||
+ uses: actions/checkout@v4
|
||||
with:
|
||||
# NOTE(ivasilev) fetch-depth 0 is critical here as leapp deps discovery depends on specific substring in
|
||||
# commit message and default 1 option will get us just merge commit which has an unrelevant message.
|
||||
--
|
||||
2.44.0
|
||||
|
25
0037-chore-deps-update-dependency-ubuntu-to-v22.patch
Normal file
25
0037-chore-deps-update-dependency-ubuntu-to-v22.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From d7ad5d7da691f1425a3eba59e1f74392948a98e3 Mon Sep 17 00:00:00 2001
|
||||
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
|
||||
Date: Fri, 10 May 2024 05:33:55 +0000
|
||||
Subject: [PATCH 37/49] chore(deps): update dependency ubuntu to v22
|
||||
|
||||
---
|
||||
.github/workflows/reuse-copr-build.yml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.github/workflows/reuse-copr-build.yml b/.github/workflows/reuse-copr-build.yml
|
||||
index c742db50..6bf71226 100644
|
||||
--- a/.github/workflows/reuse-copr-build.yml
|
||||
+++ b/.github/workflows/reuse-copr-build.yml
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
reusable_workflow_copr_build_job:
|
||||
# This job only runs for '/rerun' pull request comments by owner, member, or collaborator of the repo/organization.
|
||||
name: Build copr builds for tft tests
|
||||
- runs-on: ubuntu-20.04
|
||||
+ runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
artifacts: ${{ steps.gen_artifacts.outputs.artifacts }}
|
||||
if: |
|
||||
--
|
||||
2.44.0
|
||||
|
119
0038-Fix-E0606-errors-reported-by-pylint.patch
Normal file
119
0038-Fix-E0606-errors-reported-by-pylint.patch
Normal file
@ -0,0 +1,119 @@
|
||||
From 96346a5400a6e9741566e5070024a7918a6a9323 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Tue, 14 May 2024 15:24:43 +0200
|
||||
Subject: [PATCH 38/49] Fix E0606 errors reported by pylint
|
||||
|
||||
E0606 -> possibly-used-before-assignement
|
||||
|
||||
Note that in case of checktargetrepos actor we are introducing
|
||||
https://red.ht/upgrading-rhel9-to-rhel10-main-official-doc
|
||||
for IPU 9 -> 10. However, this shortened URL must be defined yet later.
|
||||
---
|
||||
.../actors/checktargetrepos/libraries/checktargetrepos.py | 2 ++
|
||||
.../tests/unit_test_upgradeinitramfsgenerator.py | 1 +
|
||||
.../common/actors/scantargetiso/tests/test_scan_target_iso.py | 1 +
|
||||
.../tests/unit_test_selinuxcontentscanner.py | 2 ++
|
||||
.../selinux/selinuxprepare/tests/unit_test_selinuxprepare.py | 1 +
|
||||
repos/system_upgrade/common/libraries/tests/test_grub.py | 3 +++
|
||||
repos/system_upgrade/common/libraries/tests/test_mdraid.py | 2 ++
|
||||
7 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checktargetrepos/libraries/checktargetrepos.py b/repos/system_upgrade/common/actors/checktargetrepos/libraries/checktargetrepos.py
|
||||
index 6d5a2f65..c286ed4f 100644
|
||||
--- a/repos/system_upgrade/common/actors/checktargetrepos/libraries/checktargetrepos.py
|
||||
+++ b/repos/system_upgrade/common/actors/checktargetrepos/libraries/checktargetrepos.py
|
||||
@@ -33,6 +33,8 @@ def process():
|
||||
ipu_doc_url = 'https://red.ht/upgrading-rhel7-to-rhel8-main-official-doc'
|
||||
elif target_major_version == '9':
|
||||
ipu_doc_url = 'https://red.ht/upgrading-rhel8-to-rhel9-main-official-doc'
|
||||
+ else:
|
||||
+ ipu_doc_url = 'https://red.ht/upgrading-rhel9-to-rhel10-main-official-doc'
|
||||
|
||||
rhui_info = next(api.consume(RHUIInfo), None)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py b/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py
|
||||
index 8068e177..7397b82b 100644
|
||||
--- a/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py
|
||||
+++ b/repos/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py
|
||||
@@ -354,6 +354,7 @@ def test_copy_modules_fail(monkeypatch, kind):
|
||||
|
||||
module_class = None
|
||||
copy_fn = None
|
||||
+ dst_path = None
|
||||
if kind == 'dracut':
|
||||
module_class = DracutModule
|
||||
copy_fn = upgradeinitramfsgenerator.copy_dracut_modules
|
||||
diff --git a/repos/system_upgrade/common/actors/scantargetiso/tests/test_scan_target_iso.py b/repos/system_upgrade/common/actors/scantargetiso/tests/test_scan_target_iso.py
|
||||
index 4dd0a125..8e235c6d 100644
|
||||
--- a/repos/system_upgrade/common/actors/scantargetiso/tests/test_scan_target_iso.py
|
||||
+++ b/repos/system_upgrade/common/actors/scantargetiso/tests/test_scan_target_iso.py
|
||||
@@ -201,6 +201,7 @@ def test_iso_repository_detection(monkeypatch, repodirs_in_iso, expected_repoids
|
||||
|
||||
produced_custom_repo_msgs = []
|
||||
target_iso_msg = None
|
||||
+ target_iso = None
|
||||
for produced_msg in produced_msgs:
|
||||
if isinstance(produced_msg, CustomTargetRepository):
|
||||
produced_custom_repo_msgs.append(produced_msg)
|
||||
diff --git a/repos/system_upgrade/common/actors/selinux/selinuxcontentscanner/tests/unit_test_selinuxcontentscanner.py b/repos/system_upgrade/common/actors/selinux/selinuxcontentscanner/tests/unit_test_selinuxcontentscanner.py
|
||||
index 1837c245..830eeac5 100644
|
||||
--- a/repos/system_upgrade/common/actors/selinux/selinuxcontentscanner/tests/unit_test_selinuxcontentscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/selinux/selinuxcontentscanner/tests/unit_test_selinuxcontentscanner.py
|
||||
@@ -33,6 +33,8 @@ class run_mocked(object):
|
||||
"port -a -t http_port_t -p udp 81",
|
||||
"fcontext -a -f a -t httpd_sys_content_t '/web(/.*)?'",
|
||||
"fcontext -a -f a -t cgdcbxd_exec_t '/ganesha(/.*)?'"]
|
||||
+ else:
|
||||
+ assert False, 'run_mocked: Called unexpected cmd not covered by test: {}'.format(self.args)
|
||||
|
||||
return {'stdout': stdout}
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/selinux/selinuxprepare/tests/unit_test_selinuxprepare.py b/repos/system_upgrade/common/actors/selinux/selinuxprepare/tests/unit_test_selinuxprepare.py
|
||||
index 7d975dda..c1ad06c5 100644
|
||||
--- a/repos/system_upgrade/common/actors/selinux/selinuxprepare/tests/unit_test_selinuxprepare.py
|
||||
+++ b/repos/system_upgrade/common/actors/selinux/selinuxprepare/tests/unit_test_selinuxprepare.py
|
||||
@@ -24,6 +24,7 @@ class run_mocked(object):
|
||||
self.removed_modules.add(self.args[idx + 1])
|
||||
else:
|
||||
self.non_semodule_calls += 1
|
||||
+ stdout = []
|
||||
|
||||
return {'stdout': stdout}
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/tests/test_grub.py b/repos/system_upgrade/common/libraries/tests/test_grub.py
|
||||
index 5a4f3f63..6f13538c 100644
|
||||
--- a/repos/system_upgrade/common/libraries/tests/test_grub.py
|
||||
+++ b/repos/system_upgrade/common/libraries/tests/test_grub.py
|
||||
@@ -40,6 +40,7 @@ class RunMocked(object):
|
||||
def __call__(self, args, encoding=None):
|
||||
self.called += 1
|
||||
self.args = args
|
||||
+ stdout = ''
|
||||
if self.raise_err:
|
||||
raise_call_error(args)
|
||||
|
||||
@@ -50,6 +51,8 @@ class RunMocked(object):
|
||||
stdout = BOOT_DEVICE
|
||||
elif self.args[:-1] == ['lsblk', '-spnlo', 'name']:
|
||||
stdout = self.args[-1][:-1]
|
||||
+ else:
|
||||
+ assert False, 'RunMockedError: Called unexpected cmd not covered by test: {}'.format(self.args)
|
||||
|
||||
return {'stdout': stdout}
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/tests/test_mdraid.py b/repos/system_upgrade/common/libraries/tests/test_mdraid.py
|
||||
index cb7c1059..d536beec 100644
|
||||
--- a/repos/system_upgrade/common/libraries/tests/test_mdraid.py
|
||||
+++ b/repos/system_upgrade/common/libraries/tests/test_mdraid.py
|
||||
@@ -42,6 +42,8 @@ class RunMocked(object):
|
||||
stdout = 'ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 name=localhost.localdomain:0 UUID=c4acea6e:d56e1598:91822e3f:fb26832c\n devices=/dev/sda1,/dev/sdb1' # noqa: E501; pylint: disable=line-too-long
|
||||
elif self.args == ['mdadm', '--detail', '--verbose', '--brief', NOT_MD_DEVICE]:
|
||||
stdout = 'mdadm: /dev/sda does not appear to be an md device'
|
||||
+ else:
|
||||
+ assert False, 'RunMockedError: Called unexpected cmd not covered by test: {}'.format(self.args)
|
||||
|
||||
return {'stdout': stdout}
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
78
0039-Fix-W0135-reported-by-pylint.patch
Normal file
78
0039-Fix-W0135-reported-by-pylint.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From 35e667c33dc186292a27efe2dceb2f71a20a5e13 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Tue, 14 May 2024 16:14:20 +0200
|
||||
Subject: [PATCH 39/49] Fix W0135 reported by pylint
|
||||
|
||||
W0135 -> contextmanager-generator-missing-cleanup
|
||||
|
||||
Expects try-finally around `yield`. Checked reported functions,
|
||||
usually it's FP. In one case I changed the code to make it clear.
|
||||
---
|
||||
repos/system_upgrade/common/libraries/dnfplugin.py | 3 +++
|
||||
.../system_upgrade/common/libraries/overlaygen.py | 14 ++++++++++----
|
||||
2 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/dnfplugin.py b/repos/system_upgrade/common/libraries/dnfplugin.py
|
||||
index fbd58246..e59168ef 100644
|
||||
--- a/repos/system_upgrade/common/libraries/dnfplugin.py
|
||||
+++ b/repos/system_upgrade/common/libraries/dnfplugin.py
|
||||
@@ -460,6 +460,9 @@ def perform_transaction_install(target_userspace_info, storage_info, used_repos,
|
||||
|
||||
@contextlib.contextmanager
|
||||
def _prepare_perform(used_repos, target_userspace_info, xfs_info, storage_info, target_iso=None):
|
||||
+ # noqa: W0135; pylint: disable=contextmanager-generator-missing-cleanup
|
||||
+ # NOTE(pstodulk): the pylint check is not valid in this case - finally is covered
|
||||
+ # implicitly
|
||||
reserve_space = overlaygen.get_recommended_leapp_free_space(target_userspace_info.path)
|
||||
with _prepare_transaction(used_repos=used_repos,
|
||||
target_userspace_info=target_userspace_info
|
||||
diff --git a/repos/system_upgrade/common/libraries/overlaygen.py b/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
index 6b0ff97d..4bcbf32b 100644
|
||||
--- a/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
+++ b/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
@@ -296,6 +296,9 @@ def _prepare_required_mounts(scratch_dir, mounts_dir, storage_info, scratch_rese
|
||||
|
||||
@contextlib.contextmanager
|
||||
def _build_overlay_mount(root_mount, mounts):
|
||||
+ # noqa: W0135; pylint: disable=contextmanager-generator-missing-cleanup
|
||||
+ # NOTE(pstodulk): the pylint check is not valid in this case - finally is covered
|
||||
+ # implicitly
|
||||
if not root_mount:
|
||||
raise StopActorExecutionError('Root mount point has not been prepared for overlayfs.')
|
||||
if not mounts:
|
||||
@@ -519,6 +522,9 @@ def _mount_dnf_cache(overlay_target):
|
||||
"""
|
||||
Convenience context manager to ensure bind mounted /var/cache/dnf and removal of the mount.
|
||||
"""
|
||||
+ # noqa: W0135; pylint: disable=contextmanager-generator-missing-cleanup
|
||||
+ # NOTE(pstodulk): the pylint check is not valid in this case - finally is covered
|
||||
+ # implicitly
|
||||
with mounting.BindMount(
|
||||
source='/var/cache/dnf',
|
||||
target=os.path.join(overlay_target, 'var', 'cache', 'dnf')) as cache_mount:
|
||||
@@ -570,6 +576,9 @@ def create_source_overlay(mounts_dir, scratch_dir, xfs_info, storage_info, mount
|
||||
:type scratch_reserve: Optional[int]
|
||||
:rtype: mounting.BindMount or mounting.NullMount
|
||||
"""
|
||||
+ # noqa: W0135; pylint: disable=contextmanager-generator-missing-cleanup
|
||||
+ # NOTE(pstodulk): the pylint check is not valid in this case - finally is covered
|
||||
+ # implicitly
|
||||
api.current_logger().debug('Creating source overlay in {scratch_dir} with mounts in {mounts_dir}'.format(
|
||||
scratch_dir=scratch_dir, mounts_dir=mounts_dir))
|
||||
try:
|
||||
@@ -589,11 +598,8 @@ def create_source_overlay(mounts_dir, scratch_dir, xfs_info, storage_info, mount
|
||||
with _build_overlay_mount(root_overlay, mounts) as overlay:
|
||||
with _mount_dnf_cache(overlay.target):
|
||||
yield overlay
|
||||
- except Exception:
|
||||
+ finally:
|
||||
cleanup_scratch(scratch_dir, mounts_dir)
|
||||
- raise
|
||||
- # cleanup always now
|
||||
- cleanup_scratch(scratch_dir, mounts_dir)
|
||||
|
||||
|
||||
# #############################################################################
|
||||
--
|
||||
2.44.0
|
||||
|
@ -0,0 +1,35 @@
|
||||
From d14423e2de7f6aeec921fd9cf0aad85101f6a65d Mon Sep 17 00:00:00 2001
|
||||
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
|
||||
Date: Thu, 16 May 2024 08:11:44 +0200
|
||||
Subject: [PATCH 40/49] chore(deps): update
|
||||
peter-evans/create-or-update-comment digest to v4 (#1222)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Update peter-evans/create-or-update-comment digest to v4 to use versioned (released) content instead of updating it per each new commit change.
|
||||
|
||||
---------
|
||||
|
||||
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
||||
Co-authored-by: Petr Stodůlka <pstodulk@redhat.com>
|
||||
---
|
||||
.github/workflows/pr-welcome-msg.yml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.github/workflows/pr-welcome-msg.yml b/.github/workflows/pr-welcome-msg.yml
|
||||
index e23c9bbb..c6527da4 100644
|
||||
--- a/.github/workflows/pr-welcome-msg.yml
|
||||
+++ b/.github/workflows/pr-welcome-msg.yml
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create comment
|
||||
- uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
|
||||
+ uses: peter-evans/create-or-update-comment@v4
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
--
|
||||
2.44.0
|
||||
|
56
0041-properly-indent-the-list-of-supported-OSes.patch
Normal file
56
0041-properly-indent-the-list-of-supported-OSes.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From c68bc5ef0f277a5878802566dc5517a1f98feac6 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Thu, 16 May 2024 11:08:47 +0200
|
||||
Subject: [PATCH 41/49] properly indent the list of supported OSes
|
||||
|
||||
before:
|
||||
```
|
||||
Risk Factor: high (inhibitor)
|
||||
Title: The installed OS version is not supported for the in-place upgrade to the target RHEL version
|
||||
Summary: The supported OS releases for the upgrade process:
|
||||
RHEL 8.8
|
||||
RHEL 8.10
|
||||
RHEL-SAPHANA 8.8
|
||||
RHEL-SAPHANA 8.10
|
||||
```
|
||||
|
||||
after:
|
||||
```
|
||||
Risk Factor: high (inhibitor)
|
||||
Title: The installed OS version is not supported for the in-place upgrade to the target RHEL version
|
||||
Summary: The supported OS releases for the upgrade process:
|
||||
- RHEL 8.8
|
||||
- RHEL 8.10
|
||||
- RHEL-SAPHANA 8.8
|
||||
- RHEL-SAPHANA 8.10
|
||||
```
|
||||
---
|
||||
.../common/actors/checkosrelease/libraries/checkosrelease.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py b/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
index e57ba1a7..bbc6b5ae 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
@@ -4,6 +4,7 @@ from leapp import reporting
|
||||
from leapp.libraries.common.config import version
|
||||
|
||||
COMMON_REPORT_TAGS = [reporting.Groups.SANITY]
|
||||
+FMT_LIST_SEPARATOR = '\n - '
|
||||
|
||||
related = [reporting.RelatedResource('file', '/etc/os-release')]
|
||||
|
||||
@@ -34,8 +35,8 @@ def check_os_version():
|
||||
'The installed OS version is not supported for the in-place upgrade to the target RHEL version'
|
||||
),
|
||||
reporting.Summary(
|
||||
- 'The supported OS releases for the upgrade process:\n'
|
||||
- ' {}'.format('\n'.join(supported_releases))
|
||||
+ 'The supported OS releases for the upgrade process:'
|
||||
+ '{}{}'.format(FMT_LIST_SEPARATOR, FMT_LIST_SEPARATOR.join(supported_releases))
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups(COMMON_REPORT_TAGS),
|
||||
--
|
||||
2.44.0
|
||||
|
@ -0,0 +1,47 @@
|
||||
From 8ad024515ed4b9e3df05157c67938d700eee5fa8 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Thu, 16 May 2024 11:54:17 +0200
|
||||
Subject: [PATCH 42/49] report which OS release was detected as unsupported
|
||||
|
||||
---
|
||||
.../common/actors/checkosrelease/libraries/checkosrelease.py | 5 ++++-
|
||||
.../actors/checkosrelease/tests/test_checkosrelease.py | 1 +
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py b/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
index bbc6b5ae..1ee6e6ab 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkosrelease/libraries/checkosrelease.py
|
||||
@@ -30,13 +30,16 @@ def check_os_version():
|
||||
for rel in version.SUPPORTED_VERSIONS:
|
||||
for ver in version.SUPPORTED_VERSIONS[rel]:
|
||||
supported_releases.append(rel.upper() + ' ' + ver)
|
||||
+ current_release = ' '.join(version.current_version()).upper()
|
||||
reporting.create_report([
|
||||
reporting.Title(
|
||||
'The installed OS version is not supported for the in-place upgrade to the target RHEL version'
|
||||
),
|
||||
reporting.Summary(
|
||||
'The supported OS releases for the upgrade process:'
|
||||
- '{}{}'.format(FMT_LIST_SEPARATOR, FMT_LIST_SEPARATOR.join(supported_releases))
|
||||
+ '{}{}\n\nThe detected OS release is: {}'.format(FMT_LIST_SEPARATOR,
|
||||
+ FMT_LIST_SEPARATOR.join(supported_releases),
|
||||
+ current_release)
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups(COMMON_REPORT_TAGS),
|
||||
diff --git a/repos/system_upgrade/common/actors/checkosrelease/tests/test_checkosrelease.py b/repos/system_upgrade/common/actors/checkosrelease/tests/test_checkosrelease.py
|
||||
index 99d19832..aa0fd636 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkosrelease/tests/test_checkosrelease.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkosrelease/tests/test_checkosrelease.py
|
||||
@@ -28,6 +28,7 @@ def test_no_skip_check(monkeypatch):
|
||||
def test_not_supported_release(monkeypatch):
|
||||
monkeypatch.setattr(version, "is_supported_version", lambda: False)
|
||||
monkeypatch.setattr(version, "get_source_major_version", lambda: '7')
|
||||
+ monkeypatch.setattr(version, "current_version", lambda: ('bad', '7'))
|
||||
monkeypatch.setattr(reporting, "create_report", create_report_mocked())
|
||||
|
||||
checkosrelease.check_os_version()
|
||||
--
|
||||
2.44.0
|
||||
|
25
0043-Fix-typo-in-.packit.yaml.patch
Normal file
25
0043-Fix-typo-in-.packit.yaml.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 8c22562662078459abe3e0690d2f7a3120e62809 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Kluson <mkluson@redhat.com>
|
||||
Date: Mon, 20 May 2024 16:33:03 +0200
|
||||
Subject: [PATCH 43/49] Fix typo in .packit.yaml
|
||||
|
||||
---
|
||||
.packit.yaml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.packit.yaml b/.packit.yaml
|
||||
index ed6412dc..dc9b9431 100644
|
||||
--- a/.packit.yaml
|
||||
+++ b/.packit.yaml
|
||||
@@ -292,7 +292,7 @@ jobs:
|
||||
|
||||
|
||||
# ###################################################################### #
|
||||
-# ############################## 8 TO 10 ############################### #
|
||||
+# ############################## 8 TO 9 ################################ #
|
||||
# ###################################################################### #
|
||||
|
||||
# ###################################################################### #
|
||||
--
|
||||
2.44.0
|
||||
|
55
0044-drop-unused-packager-field-from-distro-metadata.patch
Normal file
55
0044-drop-unused-packager-field-from-distro-metadata.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From a7893092361d93a34c57b3cb2f05cc4e1db418b9 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Thu, 16 May 2024 10:24:30 +0200
|
||||
Subject: [PATCH 44/49] drop unused packager field from distro metadata
|
||||
|
||||
The actor was refactored to accept any `gpg-key` package, regardless of
|
||||
the value in the packager field, but the data was never drop from the
|
||||
JSON files.
|
||||
|
||||
Fixes: 4968bec73947fb83aeb2d89fe7e919fba2ca2776
|
||||
---
|
||||
.../libraries/distributionsignedrpmscanner.py | 1 -
|
||||
.../common/files/distro/centos/gpg-signatures.json | 3 +--
|
||||
.../common/files/distro/rhel/gpg-signatures.json | 3 +--
|
||||
3 files changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/libraries/distributionsignedrpmscanner.py b/repos/system_upgrade/common/actors/distributionsignedrpmscanner/libraries/distributionsignedrpmscanner.py
|
||||
index 0bc71bfa..7898453b 100644
|
||||
--- a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/libraries/distributionsignedrpmscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/distributionsignedrpmscanner/libraries/distributionsignedrpmscanner.py
|
||||
@@ -16,7 +16,6 @@ def get_distribution_data(distribution):
|
||||
with open(distribution_config) as distro_config_file:
|
||||
distro_config_json = json.load(distro_config_file)
|
||||
distro_keys = distro_config_json.get('keys', [])
|
||||
- # distro_packager = distro_config_json.get('packager', 'not-available')
|
||||
else:
|
||||
raise StopActorExecutionError(
|
||||
'Cannot find distribution signature configuration.',
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/gpg-signatures.json b/repos/system_upgrade/common/files/distro/centos/gpg-signatures.json
|
||||
index 30e329ee..cf7f819d 100644
|
||||
--- a/repos/system_upgrade/common/files/distro/centos/gpg-signatures.json
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/gpg-signatures.json
|
||||
@@ -3,6 +3,5 @@
|
||||
"24c6a8a7f4a80eb5",
|
||||
"05b555b38483c65d",
|
||||
"4eb84e71f2ee9d55"
|
||||
- ],
|
||||
- "packager": "CentOS"
|
||||
+ ]
|
||||
}
|
||||
diff --git a/repos/system_upgrade/common/files/distro/rhel/gpg-signatures.json b/repos/system_upgrade/common/files/distro/rhel/gpg-signatures.json
|
||||
index eccf0106..64d9ed12 100644
|
||||
--- a/repos/system_upgrade/common/files/distro/rhel/gpg-signatures.json
|
||||
+++ b/repos/system_upgrade/common/files/distro/rhel/gpg-signatures.json
|
||||
@@ -5,6 +5,5 @@
|
||||
"938a80caf21541eb",
|
||||
"fd372689897da07a",
|
||||
"45689c882fa658e0"
|
||||
- ],
|
||||
- "packager": "Red Hat, Inc."
|
||||
+ ]
|
||||
}
|
||||
--
|
||||
2.44.0
|
||||
|
39
0045-Add-environment-information-to-leappdb.patch
Normal file
39
0045-Add-environment-information-to-leappdb.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From ae387bc31826e76c220f0b5fdd1f8fab4b36a5a3 Mon Sep 17 00:00:00 2001
|
||||
From: David Kubek <dkubek@redhat.com>
|
||||
Date: Tue, 21 Nov 2023 13:54:41 +0100
|
||||
Subject: [PATCH 45/49] Add environment information to leappdb
|
||||
|
||||
Related to changes extending the information stored in the leapp db.
|
||||
After this comment, the command line arguments as well as the
|
||||
environment variables modifying the leapp execution (env vars starting
|
||||
with `LEAPP_`) will be stored in the database.
|
||||
|
||||
Works on: OAMG-8402
|
||||
---
|
||||
commands/upgrade/util.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
||||
index 9eff0ad1..b20c316d 100644
|
||||
--- a/commands/upgrade/util.py
|
||||
+++ b/commands/upgrade/util.py
|
||||
@@ -3,6 +3,7 @@ import itertools
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
+import sys
|
||||
import tarfile
|
||||
from datetime import datetime
|
||||
|
||||
@@ -235,6 +236,8 @@ def prepare_configuration(args):
|
||||
'debug': os.getenv('LEAPP_DEBUG', '0'),
|
||||
'verbose': os.getenv('LEAPP_VERBOSE', '0'),
|
||||
'whitelist_experimental': args.whitelist_experimental or (),
|
||||
+ 'environment': {env: os.getenv(env) for env in os.environ if env.startswith('LEAPP_')},
|
||||
+ 'cmd': sys.argv,
|
||||
}
|
||||
return configuration
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 3173d1a43eaf7d5353cd3cc753c4ba904a6f50d1 Mon Sep 17 00:00:00 2001
|
||||
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
|
||||
Date: Fri, 10 May 2024 05:33:51 +0000
|
||||
Subject: [PATCH 46/49] chore(deps): update actions/github-script action to v7
|
||||
|
||||
---
|
||||
.github/workflows/reuse-copr-build.yml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/reuse-copr-build.yml b/.github/workflows/reuse-copr-build.yml
|
||||
index 6bf71226..3cf06254 100644
|
||||
--- a/.github/workflows/reuse-copr-build.yml
|
||||
+++ b/.github/workflows/reuse-copr-build.yml
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
- name: Add comment with copr build url
|
||||
# TODO: Create comment when copr build fails.
|
||||
id: link_copr
|
||||
- uses: actions/github-script@v4
|
||||
+ uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
github.issues.createComment({
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
# TODO: Create comment when copr build fails.
|
||||
id: link_copr_leapp
|
||||
if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
||||
- uses: actions/github-script@v4
|
||||
+ uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
github.issues.createComment({
|
||||
--
|
||||
2.44.0
|
||||
|
69
0047-fix-some-typos-spotted-by-codespell.patch
Normal file
69
0047-fix-some-typos-spotted-by-codespell.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From 1fab8273744b3dba9c2acf927e6b87417d25f77b Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Mon, 27 May 2024 11:51:43 +0200
|
||||
Subject: [PATCH 47/49] fix some typos spotted by codespell
|
||||
|
||||
also add `zeor` to the ignore list as that's part of an email address at
|
||||
`zeor.simegen.com`
|
||||
---
|
||||
.github/workflows/codespell.yml | 2 +-
|
||||
.../common/actors/selinux/selinuxapplycustom/actor.py | 2 +-
|
||||
repos/system_upgrade/common/libraries/overlaygen.py | 2 +-
|
||||
.../checkcustomnetworkscripts/libraries/customnetworkscripts.py | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
|
||||
index c0ec20d6..002d3774 100644
|
||||
--- a/.github/workflows/codespell.yml
|
||||
+++ b/.github/workflows/codespell.yml
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
- ignore_words_list: ro,fo,couldn,repositor
|
||||
+ ignore_words_list: ro,fo,couldn,repositor,zeor
|
||||
skip: "./repos/system_upgrade/common/actors/storagescanner/tests/files/mounts,\
|
||||
./repos/system_upgrade/el7toel8/actors/networkmanagerreadconfig/tests/files/nm_cfg_file_error,\
|
||||
./repos/system_upgrade/el8toel9/actors/xorgdrvfact/tests/files/journalctl-xorg-intel,\
|
||||
diff --git a/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py b/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
index b7f8376f..55c64c3e 100644
|
||||
--- a/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
@@ -26,7 +26,7 @@ class SELinuxApplyCustom(Actor):
|
||||
tags = (ApplicationsPhaseTag, IPUWorkflowTag)
|
||||
|
||||
def process(self):
|
||||
- # save progress for repoting purposes
|
||||
+ # save progress for reporting purposes
|
||||
failed_modules = []
|
||||
failed_custom = []
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/overlaygen.py b/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
index 4bcbf32b..1132cde1 100644
|
||||
--- a/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
+++ b/repos/system_upgrade/common/libraries/overlaygen.py
|
||||
@@ -274,7 +274,7 @@ def _prepare_required_mounts(scratch_dir, mounts_dir, storage_info, scratch_rese
|
||||
space_needed = scratch_reserve + _MAGICAL_CONSTANT_OVL_SIZE * len(mount_points)
|
||||
_ensure_enough_diskimage_space(space_needed, scratch_dir)
|
||||
|
||||
- # free space required on this partition should not be affected by durin the
|
||||
+ # free space required on this partition should not be affected by during the
|
||||
# upgrade transaction execution by space consumed on creation of disk images
|
||||
# as disk images are cleaned in the end of this functions,
|
||||
# but we want to reserve some space in advance.
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/checkcustomnetworkscripts/libraries/customnetworkscripts.py b/repos/system_upgrade/el8toel9/actors/checkcustomnetworkscripts/libraries/customnetworkscripts.py
|
||||
index c3a6ffd1..2947aa27 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/checkcustomnetworkscripts/libraries/customnetworkscripts.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/checkcustomnetworkscripts/libraries/customnetworkscripts.py
|
||||
@@ -28,7 +28,7 @@ def generate_report(existing_custom_network_scripts):
|
||||
reporting.Remediation(
|
||||
hint=(
|
||||
"Migrate the custom network-scripts to NetworkManager dispatcher"
|
||||
- " scripts manually before the ugprade. Follow instructions in the"
|
||||
+ " scripts manually before the upgrade. Follow instructions in the"
|
||||
" official documentation."
|
||||
)
|
||||
),
|
||||
--
|
||||
2.44.0
|
||||
|
@ -0,0 +1,47 @@
|
||||
From 8b1fd71d209f37005d7858768d211ee1cb07a30c Mon Sep 17 00:00:00 2001
|
||||
From: Evgeni Golov <evgeni@golov.de>
|
||||
Date: Mon, 27 May 2024 12:49:04 +0200
|
||||
Subject: [PATCH 48/49] BZ#2283067 - don't remove Tomcat during Satellite 7to8
|
||||
upgrade
|
||||
|
||||
This was previously added to workaround issues with the packages in RHEL
|
||||
8.8/8.9, but now that 8.10 is released it's not required anymore and
|
||||
actually breaks the upgrade.
|
||||
---
|
||||
.../actors/satellite_upgrade_facts/actor.py | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_facts/actor.py b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_facts/actor.py
|
||||
index 3cd9d9da..cfba0503 100644
|
||||
--- a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_facts/actor.py
|
||||
+++ b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_facts/actor.py
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from leapp.actors import Actor
|
||||
-from leapp.libraries.common.config import architecture
|
||||
+from leapp.libraries.common.config import architecture, version
|
||||
from leapp.libraries.common.rpms import has_package
|
||||
from leapp.libraries.stdlib import run
|
||||
from leapp.models import (
|
||||
@@ -55,11 +55,12 @@ class SatelliteUpgradeFacts(Actor):
|
||||
# enable modules that are needed for Pulpcore
|
||||
modules_to_enable.append(Module(name='python38', stream='3.8'))
|
||||
to_install.append('katello')
|
||||
- # Force removal of tomcat
|
||||
- # PES data indicates tomcat.el7 can be upgraded to tomcat.el8 since EL 8.8,
|
||||
- # but we need pki-servlet-engine from the module instead which will be pulled in via normal
|
||||
- # package dependencies
|
||||
- to_remove.extend(['tomcat', 'tomcat-lib'])
|
||||
+ if version.matches_target_version('8.8', '8.9'):
|
||||
+ # Force removal of tomcat
|
||||
+ # PES data indicates tomcat.el7 can be upgraded to tomcat.el8 since EL 8.8,
|
||||
+ # but we need pki-servlet-engine from the module instead which will be pulled in via normal
|
||||
+ # package dependencies
|
||||
+ to_remove.extend(['tomcat', 'tomcat-lib'])
|
||||
|
||||
if has_package(InstalledRPM, 'rh-redis5-redis'):
|
||||
modules_to_enable.append(Module(name='redis', stream='5'))
|
||||
--
|
||||
2.44.0
|
||||
|
373
0049-Add-product-certs-and-target-for-9.5.patch
Normal file
373
0049-Add-product-certs-and-target-for-9.5.patch
Normal file
@ -0,0 +1,373 @@
|
||||
From 061504d4b7748e11a8d6258021b6ac9d281cc63c Mon Sep 17 00:00:00 2001
|
||||
From: Matej Matuska <mmatuska@redhat.com>
|
||||
Date: Tue, 28 May 2024 14:23:44 +0200
|
||||
Subject: [PATCH 49/49] Add product certs and target for 9.5
|
||||
|
||||
---
|
||||
.../common/files/prod-certs/9.5/279.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.5/362.pem | 36 +++++++++++++++++++
|
||||
.../common/files/prod-certs/9.5/363.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.5/419.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.5/433.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.5/479.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.5/486.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.5/72.pem | 35 ++++++++++++++++++
|
||||
.../common/files/upgrade_paths.json | 4 +--
|
||||
9 files changed, 283 insertions(+), 2 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.5/279.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.5/362.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.5/363.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.5/419.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.5/433.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.5/479.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.5/486.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.5/72.pem
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.5/279.pem b/repos/system_upgrade/common/files/prod-certs/9.5/279.pem
|
||||
new file mode 100644
|
||||
index 00000000..2257a543
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.5/279.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJTCCBA2gAwIBAgIJALDxRLt/tVPfMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI0MDExNjE1MzAyMFoXDTQ0MDEx
|
||||
+NjE1MzAyMFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs1OWY4YmIz
|
||||
+My0wZjU2LTQ2N2UtYTE1ZC1hZmQxMjUzMTYzN2NdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZz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b80Ax18uvrYPgzGxhb0jd7XvlZl+bSD
|
||||
+7aVhq/XK9rFjN9hf3wVwg01nIHIxMZPXZ1Eml/Af7ZzttcIxuOWTh1/TFw8XSUx/
|
||||
+kS8Z0tJpH+AiTCr93JLuh88ryKK5jZ5gGSWMOIpoSWE0wqTgODGcYAAeJJ034ogb
|
||||
+pbsPihjhxACkQhky+F1KJH2HE9pIKxaJNnCGWn1StX8DA9sngVSGl4YmLlZfEyUz
|
||||
+K2nJeUB9DPbtyHZHXw4N6Ep17CjUPZIY2jQSMBNkhAOpkIgvtVEMYQtXu6OVLbnu
|
||||
+O2sGXqV3LBUg3L00WxR9QAIG/n54z5afF3mxl3zJEcZoUwp4OHxkn84=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.5/362.pem b/repos/system_upgrade/common/files/prod-certs/9.5/362.pem
|
||||
new file mode 100644
|
||||
index 00000000..aa60c216
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.5/362.pem
|
||||
@@ -0,0 +1,36 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGNDCCBBygAwIBAgIJALDxRLt/tVPJMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI0MDExNjE1Mjk1OVoXDTQ0MDEx
|
||||
+NjE1Mjk1OVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs4OTA1ZDA0
|
||||
+MC04ZGY5LTQ3ZjAt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ggJAYJqBAQcDBpyaGVsLTkscmhlbC05LWJldGEtcHBj
|
||||
+NjRsZTANBgkqhkiG9w0BAQsFAAOCAgEAgx5sfDsgXS0GiE9tBa2VUDDcQ82EgPdV
|
||||
+vR8SUcrhuYv0c0XtKcYw3qwm03QRHLu8zv3f9HMT2SLQGqIPVYAjIk6IR2n9jsIW
|
||||
+ssbgpkZPaypgRadgS0abapCOSDFh+67FmV3YJR9kHQSrTwMLhqGphidapfN9Si4i
|
||||
+THn6sc9sy/iyXP8FDgqXehPutoWCvMA1kf6ek50v3121P860XPhhMHXQsLB6y+GV
|
||||
+G3fy2QAezSpJTA0PwrIWz+ZZiZ9oH5Fpvo2hMGnPclgfsN9/Ge13IE39vBgmznum
|
||||
+mlkwtArIYajjYDk4ADXFWmhY04zMBldLrR6PIrBNxRZv0a1hazcEP1LJPu2YLWgW
|
||||
+eV9/FNnzUySfL0a+hkTQvDfs2Ojeb72fDvaDXMzJoT8vdjlAilVsgU98JRXEg2Wq
|
||||
+5NYlLmkFpJGEvlejqGH8H73R7nFgu5aYeHetScXZmKW7itTiJoECxqX0Yqr/NQLa
|
||||
+9fSsuRxs0TQUVVKlMoAVokstvrW4v8rtxIU9UqfktOUs3U/kq0GCFwASSwdeGPW4
|
||||
+oWfeLK2W9TEICSoW6P38+/vNqXTe7N9x7M6wyfc8HrGM0uYiZrPSodID6yvkJtBv
|
||||
+wqS9vw9mlczrBF2m55o1dehZbWuncj6CO0Jc/xC8HqpnP8BLNb7/TyPyQrISeQjN
|
||||
+2LqCFq1dAdQ=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.5/363.pem b/repos/system_upgrade/common/files/prod-certs/9.5/363.pem
|
||||
new file mode 100644
|
||||
index 00000000..8c15335b
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.5/363.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIG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+uHuxNo8QQHgql6VQdNhlZpXjR/4F66WYzprs1+TITZqGXkZk1NTCjCGtWJBp/In+
|
||||
+HaDSbe+w4eZ/g6OaLyTOw3X7nPz+2j/2eJnNG9FpZt7mhiSfKwgQpTB7sCkiLg+C
|
||||
+YEKJL0NUBfag6Ahkjqdh/Ptldm8H+hjwzrMX0JtsyD/tJpVMb7LlkGi7
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.5/419.pem b/repos/system_upgrade/common/files/prod-certs/9.5/419.pem
|
||||
new file mode 100644
|
||||
index 00000000..3dd6f54b
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.5/419.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGFzCCA/+gAwIBAgIJALDxRLt/tVPeMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI0MDExNjE1MzAyMFoXDTQ0MDEx
|
||||
+NjE1MzAyMFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs1Yjk4YWE3
|
||||
+Mi1jODQ4LTQ3M2UtOGQ2Ni1lMGU1NzQ1OGYwMDddMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQH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BU
|
||||
+8vxtGm+ho9dJguEOn1d0Y8racomdK84+mivtLyc6pK3712nHTYmwQX/gzQ3dM/hm
|
||||
+gB+btQo+crObv2OfjUiN+W5k2eX+DRPsgu9bIpXQaHY4l+CvoZR3/Ww7Xzut4CQE
|
||||
+aAOpDbv/xAWPkWJ4CdSJp8jN6xGN05Grfw6xeBsTY+XFuoWlW4/9RsY3Qd8tjhTl
|
||||
+wsIUGOUxxuDDjKq4MoEvbm+w/B0rZHOcMbE0sPi0YFRsRB5/REYJZ0fnOOikEZOw
|
||||
+GC7EA38HITdkugveWL/NRkwg0AvNNt7ILNYXLVbskTBqw7QnWTy/vgxb/a2lyQuQ
|
||||
+E+j/NfINlDMXbitb5Nymg45Yl3XDkmeuEQKY2TUKdWype6NRDfJpHBNeeWNWZxrG
|
||||
+8u+/biqhXbYODlHp1VYRItz7BbTf+YCz7wFnCXBJA7gNPJDCwirIvJm9B15A3Hu3
|
||||
+0gd0f0TciKQH1PPnKZicxsEGI9C1sf5LRv+QuVGRvWDnF4GeS5r6OnCz06hndwyj
|
||||
+cuuGz2+UpjGvrPb9BtkDK2vUML0yaqj+pY7i
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.5/433.pem b/repos/system_upgrade/common/files/prod-certs/9.5/433.pem
|
||||
new file mode 100644
|
||||
index 00000000..de388174
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.5/433.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGKTCCBBGgAwIBAgIJALDxRLt/tVPKMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCB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--git a/repos/system_upgrade/common/files/prod-certs/9.5/479.pem b/repos/system_upgrade/common/files/prod-certs/9.5/479.pem
|
||||
new file mode 100644
|
||||
index 00000000..3352d4a8
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.5/479.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGFTCCA/2gAwIBAgIJALDxRLt/tVPhMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI0MDExNjE1MzAyMVoXDTQ0MDEx
|
||||
+NjE1MzAyMVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFszYWQ2NDlj
|
||||
+NS1jOTNjLTQ2NjItYWIxMy1iNzE4ODNmNWVmNzJdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqv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4blMhpmCBWhvIAqVm68zUnWxPPFWa1hZzECaVuarGd0ncgrm21NiT+mE2
|
||||
+ZkrNBBmmZ7Hckv5QP83ynOXr4SkNEf/50rmPhcWaAD3MZr3mgOK5sg0E/diBbVmz
|
||||
+ZNw1jJ59HvNvKlxeqJqsFW4MkCDBccVPGDna3P4NXSXW5RYGgF0txNfQZc1briuz
|
||||
+bO+U3NAQocEdqUwflId5v97g0YElVliPdsM8b8xixrCCZT1pOXU46UXBP8+Nri70
|
||||
+apME6luow+D4f4ZWqMWg3KJV3FmlYPmn04WMo6EvFv5hvmlu5n6OheBqyzv/Zc1I
|
||||
+SVE+LwwzANJjNHA8PejmIqLbqzqHYrFbHg==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.5/486.pem b/repos/system_upgrade/common/files/prod-certs/9.5/486.pem
|
||||
new file mode 100644
|
||||
index 00000000..a0c7c085
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.5/486.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJDCCBAygAwIBAgIJALDxRLt/tVPLMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI0MDExNjE1Mjk1OVoXDTQ0MDEx
|
||||
+NjE1Mjk1OVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFtiYjI5ZDU3
|
||||
+NC0yNDM5LTRmYTktOWI2Zi1lO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JldGEteDg2XzY0MA0GCSqGSIb3DQEB
|
||||
+CwUAA4ICAQC26JzDoY4bAGS+1o4L9vWLAk8zeaFWRCzXmTnEEQk6jyIP+I1lS0rH
|
||||
+8QWMu8bnnqeSOkb6qhSuiffwvd2TiYtapMf4rZ6vXQ+zTzuAO9/wRAVsQt2ElBf0
|
||||
+dU0Ghym9Xz/oUWP8TxZNjYuk/uRRTH9y/fVQWJ2PCP7BT3m3arMhpkyB9sNgoQDS
|
||||
+Yjb/d5wHgFyIW0ZOjJrM/ThR4xj8wXWFmjidDGXbn8V0Md8NUTo2QDZuoGwH4UKA
|
||||
+RlF1hjnw2uSr81RvXdWhXeG1XNjW0mJerR2v1T9dCK/QOtYJLIFX8opG05axeJ6y
|
||||
+FHwbuPi9uCvL2WlWXlfsofgVax9LUPWsN0pwL3B38h2m29nWjRi8g8ob10yGmapA
|
||||
+ksLACBur0QXKVUGfU0gI5Kd1CpKQMRHXXW3D+i77mfKJF+uLcle4tF2mzxuXmuxn
|
||||
+3WD+2mmjVWnn5Hx/6A8nELdD5oD4qRN4fydUp2r7UDpVZLqggzvwydhoR1eJvm1K
|
||||
+1ompaqRTXG5rwpEkqIz1gyJZqTt/35G8XXgwIr6gYSJzcQfFnt6VqYI/tdSu7tAh
|
||||
++qN6v3nBrASsHjIMO3qldwk3BTPfzTorzDrDi7240B2JLqdd+SeqkAcANDPcWIeZ
|
||||
+p/JQSedJCYKf0UZ7ry+sJmjhdWLi5ooLq7RPUbXd7kdLCqj2Y8llNg==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.5/72.pem b/repos/system_upgrade/common/files/prod-certs/9.5/72.pem
|
||||
new file mode 100644
|
||||
index 00000000..38c94ef7
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.5/72.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGFjCCA/6gAwIBAgIJALD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nJXvfBbnqxUHgD3lcKs8PpnE0khIkYHoAjs+c7PFfntE08Sa
|
||||
+UdS/tVQ3Swwu2WczaDiVSwqfssWisHGjkIG6Fv5kmM3PNFCPpNCYnabMs+maaeyV
|
||||
+jd/FZrkWz+0TLseJ8xeo0MajgW4IjRqBxwg=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
index 880595c0..43bd049a 100644
|
||||
--- a/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
+++ b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
@@ -2,9 +2,9 @@
|
||||
"default": {
|
||||
"7.9": ["8.8", "8.10"],
|
||||
"8.8": ["9.2"],
|
||||
- "8.10": ["9.4"],
|
||||
+ "8.10": ["9.4", "9.5"],
|
||||
"7": ["8.8", "8.10"],
|
||||
- "8": ["9.2", "9.4"]
|
||||
+ "8": ["9.2", "9.4", "9.5"]
|
||||
},
|
||||
"saphana": {
|
||||
"7.9": ["8.10", "8.8"],
|
||||
--
|
||||
2.44.0
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 092ea5e7c5b8a453bcd30be5fefb0e2ecab752c4 Mon Sep 17 00:00:00 2001
|
||||
From: Yuriy Kohut <yura.kohut@gmail.com>
|
||||
Date: Mon, 3 Mar 2025 15:36:43 +0200
|
||||
Subject: [PATCH 01/37] Use leapp.libraries.common.rpms.get_leapp_packages
|
||||
(which is backward compatible) to get the list of leapp and leapp-repository
|
||||
rpms, that should be preserved during the 9to10 upgrade
|
||||
|
||||
Do not import get_source_major_version as it isn't used anywhere
|
||||
---
|
||||
.../common/libraries/dnfconfig.py | 22 +------------------
|
||||
1 file changed, 1 insertion(+), 21 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/dnfconfig.py b/repos/system_upgrade/common/libraries/dnfconfig.py
|
||||
index 5b8180f0..4b5afeb5 100644
|
||||
--- a/repos/system_upgrade/common/libraries/dnfconfig.py
|
||||
+++ b/repos/system_upgrade/common/libraries/dnfconfig.py
|
||||
@@ -1,28 +1,8 @@
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
-from leapp.libraries.common.config.version import get_source_major_version
|
||||
+from leapp.libraries.common.rpms import get_leapp_packages
|
||||
from leapp.libraries.stdlib import api, CalledProcessError
|
||||
|
||||
|
||||
-def get_leapp_packages():
|
||||
- """
|
||||
- Return the list of leapp and leapp-repository rpms that should be preserved
|
||||
- during the upgrade.
|
||||
-
|
||||
- It's list of packages that should be preserved, not what is really
|
||||
- installed.
|
||||
-
|
||||
- The snactor RPM doesn't have to be installed, but if so, we have to take
|
||||
- care about that too as well to prevent broken dnf transaction.
|
||||
- """
|
||||
- # TODO: should we set the seatbelt and exclude leapp RPMs from the target
|
||||
- # system too?
|
||||
- generic = ['leapp', 'snactor']
|
||||
- if get_source_major_version() == '7':
|
||||
- return generic + ['python2-leapp', 'leapp-upgrade-el7toel8']
|
||||
-
|
||||
- return generic + ['python3-leapp', 'leapp-upgrade-el8toel9']
|
||||
-
|
||||
-
|
||||
def _strip_split(data, sep, maxsplit=-1):
|
||||
"""
|
||||
Just like str.split(), but remove ambient whitespaces from all items
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 1be52a6430b878bd4984bcf2577f3c7c847d2e48 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Ashcraft <joeashcraft@gmail.com>
|
||||
Date: Tue, 4 Mar 2025 16:31:14 -0600
|
||||
Subject: [PATCH 02/37] fix - spell AllowZoneDrifting correctly
|
||||
|
||||
resolves #1354
|
||||
---
|
||||
.../actors/firewalldcheckallowzonedrifting/actor.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py b/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
index 0002f6aa..6f1c8f43 100644
|
||||
--- a/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
+++ b/repos/system_upgrade/el8toel9/actors/firewalldcheckallowzonedrifting/actor.py
|
||||
@@ -7,9 +7,9 @@ from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
class FirewalldCheckAllowZoneDrifting(Actor):
|
||||
"""
|
||||
- This actor will check if AllowZoneDrifiting=yes in firewalld.conf. This
|
||||
+ This actor will check if AllowZoneDrifting=yes in firewalld.conf. This
|
||||
option has been removed in RHEL-9 and behavior is as if
|
||||
- AllowZoneDrifiting=no.
|
||||
+ AllowZoneDrifting=no.
|
||||
"""
|
||||
|
||||
name = 'firewalld_check_allow_zone_drifting'
|
||||
@@ -37,7 +37,7 @@ class FirewalldCheckAllowZoneDrifting(Actor):
|
||||
reporting.Summary('Firewalld has enabled configuration option '
|
||||
'"{conf_key}" which has been removed in RHEL-9. '
|
||||
'New behavior is as if "{conf_key}" was set to "no".'.format(
|
||||
- conf_key='AllowZoneDrifiting')),
|
||||
+ conf_key='AllowZoneDrifting')),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.SANITY, reporting.Groups.FIREWALL]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR]),
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,134 +0,0 @@
|
||||
From 9ea195e84dbc70e4539efe86b6d8f8ca597e2661 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Thu, 27 Feb 2025 09:36:45 +0100
|
||||
Subject: [PATCH 03/37] cli(upgrade): allow users to enable entire experimental
|
||||
features
|
||||
|
||||
Introduce a new CLI option --enable-experimental-feature that allows
|
||||
users to enable entire features that might be facilitated by a large
|
||||
number of experimental actors. Previously, the used had to
|
||||
remember/figure out the names of all of these actors and list them
|
||||
manually using `--whitelist-experimental`. Using
|
||||
`--enable-experimental-feature` therefore lifts this burden from the
|
||||
user, and the user simply needs to know what experimental feature to
|
||||
enable. The help for the new options includes a list of all supported
|
||||
experimental feature - at the moment, the list contains only 'livemode'.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
commands/preupgrade/__init__.py | 4 ++++
|
||||
commands/rerun/__init__.py | 1 +
|
||||
commands/upgrade/__init__.py | 4 ++++
|
||||
commands/upgrade/util.py | 35 ++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 43 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/commands/preupgrade/__init__.py b/commands/preupgrade/__init__.py
|
||||
index c1fabbbd..e52b6561 100644
|
||||
--- a/commands/preupgrade/__init__.py
|
||||
+++ b/commands/preupgrade/__init__.py
|
||||
@@ -14,6 +14,10 @@ from leapp.utils.output import beautify_actor_exception, report_errors, report_i
|
||||
|
||||
@command('preupgrade', help='Generate preupgrade report')
|
||||
@command_opt('whitelist-experimental', action='append', metavar='ActorName', help='Enables experimental actors')
|
||||
+@command_opt('enable-experimental-feature', action='append', metavar='Feature',
|
||||
+ help=('Enable experimental feature. '
|
||||
+ 'Available experimental features: {}').format(util.get_help_str_with_avail_experimental_features()),
|
||||
+ choices=list(util.EXPERIMENTAL_FEATURES), default=[])
|
||||
@command_opt('debug', is_flag=True, help='Enable debug mode', inherit=False)
|
||||
@command_opt('verbose', is_flag=True, help='Enable verbose logging', inherit=False)
|
||||
@command_opt('no-rhsm', is_flag=True, help='Use only custom repositories and skip actions'
|
||||
diff --git a/commands/rerun/__init__.py b/commands/rerun/__init__.py
|
||||
index a06dd266..842178af 100644
|
||||
--- a/commands/rerun/__init__.py
|
||||
+++ b/commands/rerun/__init__.py
|
||||
@@ -71,6 +71,7 @@ def rerun(args):
|
||||
nogpgcheck=False,
|
||||
channel=None,
|
||||
report_schema='1.1.0',
|
||||
+ enable_experimental_feature=[],
|
||||
whitelist_experimental=[],
|
||||
enablerepo=[]))
|
||||
|
||||
diff --git a/commands/upgrade/__init__.py b/commands/upgrade/__init__.py
|
||||
index 608099ac..6f7504bf 100644
|
||||
--- a/commands/upgrade/__init__.py
|
||||
+++ b/commands/upgrade/__init__.py
|
||||
@@ -20,6 +20,10 @@ from leapp.utils.output import beautify_actor_exception, report_errors, report_i
|
||||
@command_opt('resume', is_flag=True, help='Continue the last execution after it was stopped (e.g. after reboot)')
|
||||
@command_opt('reboot', is_flag=True, help='Automatically performs reboot when requested.')
|
||||
@command_opt('whitelist-experimental', action='append', metavar='ActorName', help='Enable experimental actors')
|
||||
+@command_opt('enable-experimental-feature', action='append', metavar='Feature',
|
||||
+ help=('Enable experimental feature. '
|
||||
+ 'Available experimental features: {}').format(util.get_help_str_with_avail_experimental_features()),
|
||||
+ choices=list(util.EXPERIMENTAL_FEATURES), default=[])
|
||||
@command_opt('debug', is_flag=True, help='Enable debug mode', inherit=False)
|
||||
@command_opt('verbose', is_flag=True, help='Enable verbose logging', inherit=False)
|
||||
@command_opt('no-rhsm', is_flag=True, help='Use only custom repositories and skip actions'
|
||||
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
||||
index b20c316d..bfdbc4fa 100644
|
||||
--- a/commands/upgrade/util.py
|
||||
+++ b/commands/upgrade/util.py
|
||||
@@ -17,6 +17,25 @@ from leapp.utils.output import report_unsupported
|
||||
from leapp.utils.report import fetch_upgrade_report_messages, generate_report_file
|
||||
|
||||
|
||||
+EXPERIMENTAL_FEATURES = {
|
||||
+ 'livemode': [
|
||||
+ 'live_image_generator',
|
||||
+ 'live_mode_config_scanner',
|
||||
+ 'live_mode_reporter',
|
||||
+ 'prepare_live_image',
|
||||
+ 'emit_livemode_requirements',
|
||||
+ 'remove_live_image',
|
||||
+ ]
|
||||
+}
|
||||
+""" Maps experimental features to a set of experimental actors that need to be enabled. """
|
||||
+
|
||||
+
|
||||
+def get_help_str_with_avail_experimental_features():
|
||||
+ if EXPERIMENTAL_FEATURES:
|
||||
+ return ', '.join(EXPERIMENTAL_FEATURES)
|
||||
+ return 'There are no experimental features available'
|
||||
+
|
||||
+
|
||||
def disable_database_sync():
|
||||
def disable_db_sync_decorator(f):
|
||||
@functools.wraps(f)
|
||||
@@ -184,11 +203,25 @@ def handle_output_level(args):
|
||||
# the latest supported release because of target_version discovery attempt.
|
||||
def prepare_configuration(args):
|
||||
"""Returns a configuration dict object while setting a few env vars as a side-effect"""
|
||||
+
|
||||
if args.whitelist_experimental:
|
||||
args.whitelist_experimental = list(itertools.chain(*[i.split(',') for i in args.whitelist_experimental]))
|
||||
os.environ['LEAPP_EXPERIMENTAL'] = '1'
|
||||
else:
|
||||
os.environ['LEAPP_EXPERIMENTAL'] = '0'
|
||||
+ args.whitelist_experimental = []
|
||||
+
|
||||
+ for experimental_feature in set(args.enable_experimental_feature):
|
||||
+ # It might happen that there are no experimental features, which would allow user
|
||||
+ # to pass us any string as an experimental feature.
|
||||
+ if experimental_feature not in EXPERIMENTAL_FEATURES:
|
||||
+ continue
|
||||
+
|
||||
+ actors_needed_for_feature = EXPERIMENTAL_FEATURES[experimental_feature]
|
||||
+ args.whitelist_experimental.extend(actors_needed_for_feature)
|
||||
+ if args.enable_experimental_feature:
|
||||
+ os.environ['LEAPP_EXPERIMENTAL'] = '1'
|
||||
+
|
||||
os.environ['LEAPP_UNSUPPORTED'] = '0' if os.getenv('LEAPP_UNSUPPORTED', '0') == '0' else '1'
|
||||
if args.no_rhsm:
|
||||
os.environ['LEAPP_NO_RHSM'] = '1'
|
||||
@@ -235,7 +268,7 @@ def prepare_configuration(args):
|
||||
configuration = {
|
||||
'debug': os.getenv('LEAPP_DEBUG', '0'),
|
||||
'verbose': os.getenv('LEAPP_VERBOSE', '0'),
|
||||
- 'whitelist_experimental': args.whitelist_experimental or (),
|
||||
+ 'whitelist_experimental': args.whitelist_experimental or (), # Modified to also contain exp. features
|
||||
'environment': {env: os.getenv(env) for env in os.environ if env.startswith('LEAPP_')},
|
||||
'cmd': sys.argv,
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,91 +0,0 @@
|
||||
From 11b9733cfe1c7cc10db675fba24d94c0c30f6b6e Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Thu, 27 Feb 2025 10:18:17 +0100
|
||||
Subject: [PATCH 04/37] feat(livemode): exclude DNF cache from the created
|
||||
squashfs image
|
||||
|
||||
Exclude /var/cache/dnf from the generated squashfs image. The DNF
|
||||
cache is not needed for the live system that we boot into, since leapp
|
||||
will always use DNF cache stored within target userspace container
|
||||
(/sysroot/var/lib/leapp/...). Therefore, this optimization saves
|
||||
a lot of disk space for the user (2GB->700mb).
|
||||
---
|
||||
.../libraries/liveimagegenerator.py | 22 ++++++++++++++-----
|
||||
.../tests/test_image_generation.py | 6 +++--
|
||||
2 files changed, 21 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/liveimagegenerator/libraries/liveimagegenerator.py b/repos/system_upgrade/common/actors/livemode/liveimagegenerator/libraries/liveimagegenerator.py
|
||||
index af8981d8..46118630 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/liveimagegenerator/libraries/liveimagegenerator.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/liveimagegenerator/libraries/liveimagegenerator.py
|
||||
@@ -24,7 +24,7 @@ def lighten_target_userpace(context):
|
||||
tree_to_prune, error)
|
||||
|
||||
|
||||
-def build_squashfs(livemode_config, userspace_info):
|
||||
+def build_squashfs(livemode_config, userspace_info, paths_to_exclude=None):
|
||||
"""
|
||||
Generate the live rootfs image based on the target userspace
|
||||
|
||||
@@ -34,8 +34,11 @@ def build_squashfs(livemode_config, userspace_info):
|
||||
target_userspace_fullpath = userspace_info.path
|
||||
squashfs_fullpath = livemode_config.squashfs_fullpath
|
||||
|
||||
- api.current_logger().info('Building the squashfs image %s from target userspace located at %s',
|
||||
- squashfs_fullpath, target_userspace_fullpath)
|
||||
+ if not paths_to_exclude:
|
||||
+ paths_to_exclude = []
|
||||
+
|
||||
+ api.current_logger().info('Building the squashfs image %s from target userspace located at %s with excludes: %s',
|
||||
+ squashfs_fullpath, target_userspace_fullpath, ', '.join(paths_to_exclude))
|
||||
|
||||
try:
|
||||
if os.path.exists(squashfs_fullpath):
|
||||
@@ -44,8 +47,13 @@ def build_squashfs(livemode_config, userspace_info):
|
||||
api.current_logger().warning('Failed to remove already existing %s. Full error: %s',
|
||||
squashfs_fullpath, error)
|
||||
|
||||
+ mksquashfs_command = ['mksquashfs', target_userspace_fullpath, squashfs_fullpath]
|
||||
+ if paths_to_exclude:
|
||||
+ mksquashfs_command.append('-e')
|
||||
+ mksquashfs_command.extend(paths_to_exclude)
|
||||
+
|
||||
try:
|
||||
- run(['mksquashfs', target_userspace_fullpath, squashfs_fullpath])
|
||||
+ run(mksquashfs_command)
|
||||
except CalledProcessError as error:
|
||||
raise StopActorExecutionError(
|
||||
'Cannot pack the target userspace into a squash image. ',
|
||||
@@ -68,5 +76,9 @@ def generate_live_image_if_enabled():
|
||||
|
||||
with mounting.NspawnActions(base_dir=userspace_info.path) as context:
|
||||
lighten_target_userpace(context)
|
||||
- squashfs_path = build_squashfs(livemode_config, userspace_info)
|
||||
+
|
||||
+ # Exclude the DNF cache - we do not need it, leapp mounts /sysroot and uses userspace's dnf cache from there
|
||||
+ paths_to_exclude = [os.path.join(userspace_info.path, 'var/cache/dnf')]
|
||||
+
|
||||
+ squashfs_path = build_squashfs(livemode_config, userspace_info, paths_to_exclude=paths_to_exclude)
|
||||
api.produce(LiveModeArtifacts(squashfs_path=squashfs_path))
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/liveimagegenerator/tests/test_image_generation.py b/repos/system_upgrade/common/actors/livemode/liveimagegenerator/tests/test_image_generation.py
|
||||
index 5c434a6b..16ae0a09 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/liveimagegenerator/tests/test_image_generation.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/liveimagegenerator/tests/test_image_generation.py
|
||||
@@ -78,10 +78,12 @@ def test_generate_live_image_if_enabled(monkeypatch, livemode_config, should_pro
|
||||
def __exit__(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
+ def build_squashfs_image_mock(livemode_config, userspace_info, *args, **kwargs):
|
||||
+ return '/squashfs'
|
||||
+
|
||||
monkeypatch.setattr(mounting, 'NspawnActions', NspawnMock)
|
||||
monkeypatch.setattr(live_image_generator_lib, 'lighten_target_userpace', lambda context: None)
|
||||
- monkeypatch.setattr(live_image_generator_lib, 'build_squashfs',
|
||||
- lambda livemode_config, userspace_info: '/squashfs')
|
||||
+ monkeypatch.setattr(live_image_generator_lib, 'build_squashfs', build_squashfs_image_mock)
|
||||
monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
|
||||
live_image_generator_lib.generate_live_image_if_enabled()
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,156 +0,0 @@
|
||||
From 36d245e59bab8f392c163c01a77f0ea9b210d0a2 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 28 Feb 2025 11:02:32 +0100
|
||||
Subject: [PATCH 05/37] livemode(cfg): add declaration of livemode config
|
||||
fields
|
||||
|
||||
Add definitions of all config classes that describe configuration of the
|
||||
livemode feature using the configurability provided by the leapp
|
||||
framework. The list of configuration options remains unchanged (except
|
||||
for the `is_enabled` field that is removed) when compared to the
|
||||
current implementation that relies on an ad-hoc INI file. The next step
|
||||
is to drop the INI-based implementation in favour of using
|
||||
framework-based configs relying on the field definitions from this PR.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
.../configs/livemode.py | 127 ++++++++++++++++++
|
||||
1 file changed, 127 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/common/actors/livemode/livemode_config_scanner/configs/livemode.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/configs/livemode.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/configs/livemode.py
|
||||
new file mode 100644
|
||||
index 00000000..eeef03f8
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/configs/livemode.py
|
||||
@@ -0,0 +1,127 @@
|
||||
+"""
|
||||
+Configuration keys for the 'livemode' feature.
|
||||
+"""
|
||||
+
|
||||
+from leapp.actors.config import Config
|
||||
+from leapp.models import fields
|
||||
+
|
||||
+LIVEMODE_CONFIG_SECTION = 'livemode'
|
||||
+
|
||||
+
|
||||
+class SquashfsImagePath(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "squashfs_image_path"
|
||||
+ type_ = fields.String()
|
||||
+ default = '/var/lib/leapp/live-upgrade.img'
|
||||
+ description = """
|
||||
+ Location where the squashfs image of the minimal target system will be placed.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class AdditionalPackages(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "additional_packages"
|
||||
+ type_ = fields.List(fields.String())
|
||||
+ default = []
|
||||
+ description = """
|
||||
+ Additional packages to be installed into the squashfs image.
|
||||
+
|
||||
+ Can be used to install various debugging utilities when connecting to the upgrade environment.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class AutostartUpgradeAfterReboot(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "autostart_upgrade_after_reboot"
|
||||
+ type_ = fields.Boolean()
|
||||
+ default = True
|
||||
+ description = """
|
||||
+ If set to True, the upgrade will start automatically after the reboot. Otherwise a manual trigger is required.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class SetupNetworkManager(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "setup_network_manager"
|
||||
+ type_ = fields.Boolean()
|
||||
+ default = False
|
||||
+ description = """
|
||||
+ Try enabling Network Manager in the squashfs image.
|
||||
+
|
||||
+ If set to True, leapp will copy source system's Network Manager profiles into the squashfs image and
|
||||
+ enable the Network Manager service.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class DracutNetwork(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "dracut_network"
|
||||
+ type_ = fields.String()
|
||||
+ default = ''
|
||||
+ description = """
|
||||
+ Dracut network arguments, required if the `url_to_load_squashfs_from` option is set.
|
||||
+
|
||||
+ Example:
|
||||
+ ip=192.168.122.146::192.168.122.1:255.255.255.0:foo::none
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class URLToLoadSquashfsImageFrom(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "url_to_load_squashfs_image_from"
|
||||
+ type_ = fields.String()
|
||||
+ default = ''
|
||||
+ description = """
|
||||
+ Url pointing to the squashfs image that should be used for the upgrade environment.
|
||||
+
|
||||
+ Example:
|
||||
+ http://192.168.122.1/live-upgrade.img
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class SetupPasswordlessRoot(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "setup_passwordless_root"
|
||||
+ type_ = fields.Boolean()
|
||||
+ default = False
|
||||
+ description = """
|
||||
+ If set to True, the root account of the squashfs image will have empty password. Use with caution.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class SetupOpenSSHDUsingAuthKeys(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "setup_opensshd_using_auth_keys"
|
||||
+ type_ = fields.String()
|
||||
+ default = ''
|
||||
+ description = """
|
||||
+ If set to a non-empty string, openssh daemon will be setup within the squashfs image using the provided
|
||||
+ authorized keys.
|
||||
+
|
||||
+ Example:
|
||||
+ /root/.ssh/authorized_keys
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+class CaptureSTraceInfoInto(Config):
|
||||
+ section = LIVEMODE_CONFIG_SECTION
|
||||
+ name = "capture_strace_info_into"
|
||||
+ type_ = fields.String()
|
||||
+ default = ''
|
||||
+ description = """
|
||||
+ If set to a non-empty string, leapp will be executed under strace and results will be stored within
|
||||
+ the provided file path.
|
||||
+ """
|
||||
+
|
||||
+
|
||||
+livemode_cfg_fields = (
|
||||
+ AdditionalPackages,
|
||||
+ AutostartUpgradeAfterReboot,
|
||||
+ CaptureSTraceInfoInto,
|
||||
+ DracutNetwork,
|
||||
+ SetupNetworkManager,
|
||||
+ SetupOpenSSHDUsingAuthKeys,
|
||||
+ SetupPasswordlessRoot,
|
||||
+ SquashfsImagePath,
|
||||
+ URLToLoadSquashfsImageFrom,
|
||||
+)
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,250 +0,0 @@
|
||||
From 849a8f2fcd04ee6d419b3856562fbff5b85577f5 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Thu, 6 Mar 2025 11:33:05 +0100
|
||||
Subject: [PATCH 06/37] livemode(cfg): use framework's configurability instead
|
||||
of ad-hoc INI
|
||||
|
||||
Drop the ad-hoc INI-based config for livemode in favour and replace it
|
||||
with configuration facilitated by the leapp framework. The list of
|
||||
configuration options remains (and their semantics) remains almost
|
||||
unchanged, save for some field names that are renamed in a way that
|
||||
better reveals their effect to the user.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
commands/upgrade/util.py | 1 -
|
||||
etc/leapp/files/devel-livemode.ini | 9 --
|
||||
.../livemode/livemode_config_scanner/actor.py | 2 +
|
||||
.../libraries/scan_livemode_config.py | 101 +++++-------------
|
||||
.../tests/test_config_scanner.py | 40 +++----
|
||||
5 files changed, 44 insertions(+), 109 deletions(-)
|
||||
delete mode 100644 etc/leapp/files/devel-livemode.ini
|
||||
|
||||
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
||||
index bfdbc4fa..6cdfa6d8 100644
|
||||
--- a/commands/upgrade/util.py
|
||||
+++ b/commands/upgrade/util.py
|
||||
@@ -16,7 +16,6 @@ from leapp.utils.audit import get_checkpoints, get_connection, get_messages
|
||||
from leapp.utils.output import report_unsupported
|
||||
from leapp.utils.report import fetch_upgrade_report_messages, generate_report_file
|
||||
|
||||
-
|
||||
EXPERIMENTAL_FEATURES = {
|
||||
'livemode': [
|
||||
'live_image_generator',
|
||||
diff --git a/etc/leapp/files/devel-livemode.ini b/etc/leapp/files/devel-livemode.ini
|
||||
deleted file mode 100644
|
||||
index b79ed4df..00000000
|
||||
--- a/etc/leapp/files/devel-livemode.ini
|
||||
+++ /dev/null
|
||||
@@ -1,9 +0,0 @@
|
||||
-# Configuration for the *experimental* livemode feature
|
||||
-# It is likely that this entire configuration file will be replaced by some
|
||||
-# other mechanism/file in the future. For the full list of configuration options,
|
||||
-# see models/livemode.py
|
||||
-[livemode]
|
||||
-squashfs_fullpath=/var/lib/leapp/live-upgrade.img
|
||||
-setup_network_manager=no
|
||||
-autostart_upgrade_after_reboot=yes
|
||||
-setup_passwordless_root=no
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/actor.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/actor.py
|
||||
index dc79ecff..bd909736 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/actor.py
|
||||
@@ -1,4 +1,5 @@
|
||||
from leapp.actors import Actor
|
||||
+from leapp.configs.actor import livemode as livemode_config_lib
|
||||
from leapp.libraries.actor import scan_livemode_config as scan_livemode_config_lib
|
||||
from leapp.models import InstalledRPM, LiveModeConfig
|
||||
from leapp.tags import ExperimentalTag, FactsPhaseTag, IPUWorkflowTag
|
||||
@@ -10,6 +11,7 @@ class LiveModeConfigScanner(Actor):
|
||||
"""
|
||||
|
||||
name = 'live_mode_config_scanner'
|
||||
+ config_schemas = livemode_config_lib.livemode_cfg_fields
|
||||
consumes = (InstalledRPM,)
|
||||
produces = (LiveModeConfig,)
|
||||
tags = (ExperimentalTag, FactsPhaseTag, IPUWorkflowTag,)
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
index b2f0af7f..57408c23 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
@@ -1,14 +1,9 @@
|
||||
-try:
|
||||
- import configparser
|
||||
-except ImportError:
|
||||
- import ConfigParser as configparser
|
||||
-
|
||||
+from leapp.configs.actor import livemode as livemode_config_lib
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.common.config import architecture, get_env
|
||||
from leapp.libraries.common.rpms import has_package
|
||||
from leapp.libraries.stdlib import api
|
||||
from leapp.models import InstalledRPM, LiveModeConfig
|
||||
-from leapp.models.fields import ModelViolationError
|
||||
|
||||
LIVEMODE_CONFIG_LOCATION = '/etc/leapp/files/devel-livemode.ini'
|
||||
DEFAULT_SQUASHFS_PATH = '/var/lib/leapp/live-upgrade.img'
|
||||
@@ -50,76 +45,32 @@ def scan_config_and_emit_message():
|
||||
return
|
||||
|
||||
api.current_logger().info('Loading livemode config from %s', LIVEMODE_CONFIG_LOCATION)
|
||||
- parser = configparser.ConfigParser()
|
||||
|
||||
- try:
|
||||
- parser.read((LIVEMODE_CONFIG_LOCATION, ))
|
||||
- except configparser.ParsingError as error:
|
||||
- api.current_logger().error('Failed to parse live mode configuration due to the following error: %s', error)
|
||||
+ config = api.current_actor().config[livemode_config_lib.LIVEMODE_CONFIG_SECTION]
|
||||
+
|
||||
+ # Mapping from model field names to configuration fields - because we might have
|
||||
+ # changed some configuration field names for configuration to be more
|
||||
+ # comprehensible for our users.
|
||||
+ model_fields_to_config_options_map = {
|
||||
+ 'url_to_load_squashfs_from': livemode_config_lib.URLToLoadSquashfsImageFrom,
|
||||
+ 'squashfs_fullpath': livemode_config_lib.SquashfsImagePath,
|
||||
+ 'dracut_network': livemode_config_lib.DracutNetwork,
|
||||
+ 'setup_network_manager': livemode_config_lib.SetupNetworkManager,
|
||||
+ 'additional_packages': livemode_config_lib.AdditionalPackages,
|
||||
+ 'autostart_upgrade_after_reboot': livemode_config_lib.AutostartUpgradeAfterReboot,
|
||||
+ 'setup_opensshd_with_auth_keys': livemode_config_lib.SetupOpenSSHDUsingAuthKeys,
|
||||
+ 'setup_passwordless_root': livemode_config_lib.SetupPasswordlessRoot,
|
||||
+ 'capture_upgrade_strace_into': livemode_config_lib.CaptureSTraceInfoInto
|
||||
+ }
|
||||
|
||||
- details = 'Failed to read livemode configuration due to the following error: {0}.'
|
||||
- raise StopActorExecutionError(
|
||||
- 'Failed to read livemode configuration',
|
||||
- details={'Problem': details.format(error)}
|
||||
- )
|
||||
+ # Read values of model fields from user-supplied configuration according to the above mapping
|
||||
+ config_msg_init_kwargs = {}
|
||||
+ for model_field_name, config_field in model_fields_to_config_options_map.items():
|
||||
+ config_msg_init_kwargs[model_field_name] = config[config_field.name]
|
||||
|
||||
- livemode_section = 'livemode'
|
||||
- if not parser.has_section(livemode_section):
|
||||
- details = 'The configuration is missing the \'[{0}]\' section'.format(livemode_section)
|
||||
- raise StopActorExecutionError(
|
||||
- 'Live mode configuration does not have the required structure',
|
||||
- details={'Problem': details}
|
||||
- )
|
||||
-
|
||||
- config_kwargs = {
|
||||
- 'is_enabled': True,
|
||||
- 'url_to_load_squashfs_from': None,
|
||||
- 'squashfs_fullpath': DEFAULT_SQUASHFS_PATH,
|
||||
- 'dracut_network': None,
|
||||
- 'setup_network_manager': False,
|
||||
- 'additional_packages': [],
|
||||
- 'autostart_upgrade_after_reboot': True,
|
||||
- 'setup_opensshd_with_auth_keys': None,
|
||||
- 'setup_passwordless_root': False,
|
||||
- 'capture_upgrade_strace_into': None
|
||||
- }
|
||||
+ # Some fields of the LiveModeConfig are historical and can no longer be changed by the user
|
||||
+ # in the config. Therefore, we just hard-code them here.
|
||||
+ config_msg_init_kwargs['is_enabled'] = True
|
||||
|
||||
- config_str_options = (
|
||||
- 'url_to_load_squashfs_from',
|
||||
- 'squashfs_fullpath',
|
||||
- 'dracut_network',
|
||||
- 'setup_opensshd_with_auth_keys',
|
||||
- 'capture_upgrade_strace_into'
|
||||
- )
|
||||
-
|
||||
- config_list_options = (
|
||||
- 'additional_packages',
|
||||
- )
|
||||
-
|
||||
- config_bool_options = (
|
||||
- 'setup_network_manager',
|
||||
- 'setup_passwordless_root',
|
||||
- 'autostart_upgrade_after_reboot',
|
||||
- )
|
||||
-
|
||||
- for config_option in config_str_options:
|
||||
- if parser.has_option(livemode_section, config_option):
|
||||
- config_kwargs[config_option] = parser.get(livemode_section, config_option)
|
||||
-
|
||||
- for config_option in config_bool_options:
|
||||
- if parser.has_option(livemode_section, config_option):
|
||||
- config_kwargs[config_option] = parser.getboolean(livemode_section, config_option)
|
||||
-
|
||||
- for config_option in config_list_options:
|
||||
- if parser.has_option(livemode_section, config_option):
|
||||
- option_val = parser.get(livemode_section, config_option)
|
||||
- option_list = (opt_val.strip() for opt_val in option_val.split(','))
|
||||
- option_list = [opt for opt in option_list if opt]
|
||||
- config_kwargs[config_option] = option_list
|
||||
-
|
||||
- try:
|
||||
- config = LiveModeConfig(**config_kwargs)
|
||||
- except ModelViolationError as error:
|
||||
- raise StopActorExecutionError('Failed to parse livemode configuration.', details={'Problem': str(error)})
|
||||
-
|
||||
- api.produce(config)
|
||||
+ config_msg = LiveModeConfig(**config_msg_init_kwargs)
|
||||
+ api.produce(config_msg)
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
index 016f6c04..8ddde22e 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
@@ -86,29 +86,21 @@ def test_enablement_conditions(monkeypatch, case_descr):
|
||||
def test_config_scanning(monkeypatch):
|
||||
""" Test whether scanning a valid config is properly transcribed into a config message. """
|
||||
|
||||
- config_lines = [
|
||||
- '[livemode]',
|
||||
- 'squashfs_fullpath=IMG',
|
||||
- 'setup_network_manager=yes',
|
||||
- 'autostart_upgrade_after_reboot=no',
|
||||
- 'setup_opensshd_with_auth_keys=/root/.ssh/authorized_keys',
|
||||
- 'setup_passwordless_root=no',
|
||||
- 'additional_packages=pkgA,pkgB'
|
||||
- ]
|
||||
- config_content = '\n'.join(config_lines) + '\n'
|
||||
-
|
||||
- if sys.version[0] == '2':
|
||||
- config_content = config_content.decode('utf-8') # python2 compat
|
||||
-
|
||||
- class ConfigParserMock(configparser.ConfigParser): # pylint: disable=too-many-ancestors
|
||||
- def read(self, file_paths, *args, **kwargs):
|
||||
- self.read_string(config_content)
|
||||
- return file_paths
|
||||
-
|
||||
- monkeypatch.setattr(configparser, 'ConfigParser', ConfigParserMock)
|
||||
-
|
||||
+ config = {
|
||||
+ 'livemode': {
|
||||
+ 'squashfs_image_path': '/var/lib/leapp/live-upgrade2.img',
|
||||
+ 'additional_packages': ['petri-nets'],
|
||||
+ 'autostart_upgrade_after_reboot': True,
|
||||
+ 'setup_network_manager': True,
|
||||
+ 'setup_passwordless_root': True,
|
||||
+ 'dracut_network': '',
|
||||
+ 'url_to_load_squashfs_image_from': '',
|
||||
+ 'setup_opensshd_using_auth_keys': '/root/.ssh/authorized_keys',
|
||||
+ 'capture_strace_info_into': ''
|
||||
+ }
|
||||
+ }
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(config=config))
|
||||
monkeypatch.setattr(scan_livemode_config_lib, 'should_scan_config', lambda: True)
|
||||
-
|
||||
monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
|
||||
scan_livemode_config_lib.scan_config_and_emit_message()
|
||||
@@ -119,7 +111,7 @@ def test_config_scanning(monkeypatch):
|
||||
produced_message = api.produce.model_instances[0]
|
||||
assert isinstance(produced_message, LiveModeConfig)
|
||||
|
||||
- assert produced_message.additional_packages == ['pkgA', 'pkgB']
|
||||
- assert produced_message.squashfs_fullpath == 'IMG'
|
||||
+ assert produced_message.additional_packages == ['petri-nets']
|
||||
+ assert produced_message.squashfs_fullpath == '/var/lib/leapp/live-upgrade2.img'
|
||||
assert produced_message.setup_opensshd_with_auth_keys == '/root/.ssh/authorized_keys'
|
||||
assert produced_message.setup_network_manager
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,61 +0,0 @@
|
||||
From 96c911454e4e68a749503b644c31df3a853e8a0b Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Thu, 20 Mar 2025 22:29:36 +0100
|
||||
Subject: [PATCH 07/37] fix(livemode): do not stop if dbus already appears to
|
||||
be enabled
|
||||
|
||||
Some of the systemd units might be already enabled in the target
|
||||
userspace container, causing an unhandled FileAlreadyExists error
|
||||
when we attempt to enable them. This commit ignores such errors, working
|
||||
on under the assumption that the services we wanted to enable are
|
||||
already enabled. Hence, we ignore the possibility that the file which
|
||||
unexpectedly resides at the destination of the symlink which enables the
|
||||
service might contain some unexpected/incorrect content.
|
||||
---
|
||||
.../libraries/prepareliveimage.py | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
index c573c84a..686c4cd6 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/modify_userspace_for_livemode/libraries/prepareliveimage.py
|
||||
@@ -1,3 +1,4 @@
|
||||
+import errno
|
||||
import grp
|
||||
import os
|
||||
import os.path
|
||||
@@ -253,16 +254,30 @@ def enable_dbus(context):
|
||||
Enable dbus-daemon into the target userspace
|
||||
Looks like it's not enabled by default when installing into a container.
|
||||
"""
|
||||
- api.current_logger().info('Configuring the dbus services')
|
||||
+ dbus_daemon_service = '/usr/lib/systemd/system/dbus-daemon.service'
|
||||
|
||||
links = ['/etc/systemd/system/multi-user.target.wants/dbus-daemon.service',
|
||||
'/etc/systemd/system/dbus.service',
|
||||
'/etc/systemd/system/messagebus.service']
|
||||
|
||||
+ api.current_logger().info(('Enabling dbus services. Leapp will attempt to create the following '
|
||||
+ 'symlinks: {0}, all pointing to {1}').format(', '.join(links),
|
||||
+ dbus_daemon_service))
|
||||
+
|
||||
for link in links:
|
||||
+ api.current_logger().debug('Creating symlink at {0} that points to {1}'.format(link, dbus_daemon_service))
|
||||
try:
|
||||
os.symlink('/usr/lib/systemd/system/dbus-daemon.service', context.full_path(link))
|
||||
except OSError as err:
|
||||
+ if err.errno == errno.EEXIST:
|
||||
+ # @Note: We are not catching FileExistsError because of python2 (there is no such error class)
|
||||
+ # We are performing installations within container, so the systemd symlinks that are created
|
||||
+ # during installation should have correct destination
|
||||
+ api.current_logger().debug(
|
||||
+ 'A file already exists at {0}, assuming it is a symlink with a correct content.'
|
||||
+ )
|
||||
+ continue
|
||||
+
|
||||
details = {'Problem': 'An error occurred while creating the systemd symlink', 'source_error': str(err)}
|
||||
raise StopActorExecutionError('Cannot enable the dbus services', details=details)
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,94 +0,0 @@
|
||||
From 6b3f6565e70290da1e02e3945851b430efb02109 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 11 Apr 2025 15:07:49 +0200
|
||||
Subject: [PATCH 08/37] feat(livemode): remove the use of
|
||||
LEAPP_DEVEL_ENABLE_LIVEMODE
|
||||
|
||||
The environmental variable has been introduced to prevent accidental
|
||||
execution of livemode. However, in order for users to use the feature,
|
||||
this environmental variable introduced unnecessary friction. Therefore,
|
||||
this patch removes the use of the variable. Instead, whitelisting
|
||||
experimental actors that facilitate livemode should be the only
|
||||
mechanism that is used to enabled/disable the feature.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
docs/source/configuring-ipu.md | 3 ---
|
||||
.../libraries/scan_livemode_config.py | 5 -----
|
||||
.../tests/test_config_scanner.py | 12 ++++--------
|
||||
3 files changed, 4 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/docs/source/configuring-ipu.md b/docs/source/configuring-ipu.md
|
||||
index 6b838b8f..059b72c2 100644
|
||||
--- a/docs/source/configuring-ipu.md
|
||||
+++ b/docs/source/configuring-ipu.md
|
||||
@@ -52,9 +52,6 @@ The alternative to the --channel leapp option. As a parameter accepts a channel
|
||||
To use development variables, the LEAPP_UNSUPPORTED variable has to be set.
|
||||
```
|
||||
|
||||
-#### LEAPP_DEVEL_ENABLE_LIVE_MODE
|
||||
-If set to `1`, enable the use of the experimental live mode
|
||||
-
|
||||
#### LEAPP_DEVEL_DM_DISABLE_UDEV
|
||||
Setting the environment variable provides a more convenient way of disabling udev support in libdevmapper, dmsetup and LVM2 tools globally without a need to modify any existing configuration settings. This is mostly useful if the system environment does not use udev.
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
index 57408c23..26fd9d09 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/libraries/scan_livemode_config.py
|
||||
@@ -11,16 +11,11 @@ DEFAULT_SQUASHFS_PATH = '/var/lib/leapp/live-upgrade.img'
|
||||
|
||||
def should_scan_config():
|
||||
is_unsupported = get_env('LEAPP_UNSUPPORTED', '0') == '1'
|
||||
- is_livemode_enabled = get_env('LEAPP_DEVEL_ENABLE_LIVE_MODE', '0') == '1'
|
||||
|
||||
if not is_unsupported:
|
||||
api.current_logger().debug('Will not scan livemode config - the upgrade is not unsupported.')
|
||||
return False
|
||||
|
||||
- if not is_livemode_enabled:
|
||||
- api.current_logger().debug('Will not scan livemode config - the live mode is not enabled.')
|
||||
- return False
|
||||
-
|
||||
if not architecture.matches_architecture(architecture.ARCH_X86_64):
|
||||
api.current_logger().debug('Will not scan livemode config - livemode is currently limited to x86_64.')
|
||||
details = 'Live upgrades are currently limited to x86_64 only.'
|
||||
diff --git a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
index 8ddde22e..e24aa366 100644
|
||||
--- a/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/livemode/livemode_config_scanner/tests/test_config_scanner.py
|
||||
@@ -29,19 +29,16 @@ EnablementTestCase = namedtuple('EnablementTestCase', ('env_vars', 'arch', 'pkgs
|
||||
@pytest.mark.parametrize(
|
||||
'case_descr',
|
||||
(
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '1'},
|
||||
+ EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1'},
|
||||
arch=architecture.ARCH_X86_64, pkgs=('squashfs-tools', ),
|
||||
result=EnablementResult.SCAN_CONFIG),
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '0', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '1'},
|
||||
+ EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '0'},
|
||||
arch=architecture.ARCH_X86_64, pkgs=('squashfs-tools', ),
|
||||
result=EnablementResult.DO_NOTHING),
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '0'},
|
||||
- arch=architecture.ARCH_X86_64, pkgs=('squashfs-tools', ),
|
||||
- result=EnablementResult.DO_NOTHING),
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '1'},
|
||||
+ EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1'},
|
||||
arch=architecture.ARCH_ARM64, pkgs=('squashfs-tools', ),
|
||||
result=EnablementResult.RAISE),
|
||||
- EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1', 'LEAPP_DEVEL_ENABLE_LIVE_MODE': '1'},
|
||||
+ EnablementTestCase(env_vars={'LEAPP_UNSUPPORTED': '1'},
|
||||
arch=architecture.ARCH_ARM64, pkgs=tuple(),
|
||||
result=EnablementResult.RAISE),
|
||||
)
|
||||
@@ -52,7 +49,6 @@ def test_enablement_conditions(monkeypatch, case_descr):
|
||||
|
||||
Enablement conditions:
|
||||
- LEAPP_UNSUPPORTED=1
|
||||
- - LEAPP_DEVEL_ENABLE_LIVE_MODE=1
|
||||
|
||||
Not meeting enablement conditions should prevent config message from being produced.
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 021f083509b074905c18b79afba4a22f8ca483f6 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 11 Apr 2025 15:12:18 +0200
|
||||
Subject: [PATCH 09/37] spec: require leapp-framework 6.1 for default CLI vals
|
||||
|
||||
Bump framework version as we want to use default=[] for the newly
|
||||
introduced `--enable-experimental-features` switch.
|
||||
|
||||
Jira-ref: RHELMISC-10648
|
||||
---
|
||||
packaging/leapp-repository.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packaging/leapp-repository.spec b/packaging/leapp-repository.spec
|
||||
index f45fda68..34768de1 100644
|
||||
--- a/packaging/leapp-repository.spec
|
||||
+++ b/packaging/leapp-repository.spec
|
||||
@@ -120,7 +120,7 @@ Requires: leapp-repository-dependencies = %{leapp_repo_deps}
|
||||
|
||||
# IMPORTANT: this is capability provided by the leapp framework rpm.
|
||||
# Check that 'version' instead of the real framework rpm version.
|
||||
-Requires: leapp-framework >= 6.0, leapp-framework < 7
|
||||
+Requires: leapp-framework >= 6.1, leapp-framework < 7
|
||||
|
||||
# Since we provide sub-commands for the leapp utility, we expect the leapp
|
||||
# tool to be installed as well.
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,98 +0,0 @@
|
||||
From 51b26776405a926882509c3f62d0bedbb4eab188 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 14 Apr 2025 10:07:53 +0200
|
||||
Subject: [PATCH 10/37] docs(configuring-ipu): add experimental features
|
||||
section
|
||||
|
||||
With the upcoming introduction of documentation of the LiveMode feature,
|
||||
a question arises where to put the documentation. This patch introduces
|
||||
a new subsection 'Experimental features' under the 'Configuring IPU'
|
||||
section, so we have one place to where to put such features.
|
||||
---
|
||||
.../{ => configuring-ipu}/configuring-ipu.md | 0
|
||||
.../experimental-features/index.rst | 23 +++++++++++++++++++
|
||||
docs/source/configuring-ipu/index.rst | 23 +++++++++++++++++++
|
||||
docs/source/index.rst | 2 +-
|
||||
4 files changed, 47 insertions(+), 1 deletion(-)
|
||||
rename docs/source/{ => configuring-ipu}/configuring-ipu.md (100%)
|
||||
create mode 100644 docs/source/configuring-ipu/experimental-features/index.rst
|
||||
create mode 100644 docs/source/configuring-ipu/index.rst
|
||||
|
||||
diff --git a/docs/source/configuring-ipu.md b/docs/source/configuring-ipu/configuring-ipu.md
|
||||
similarity index 100%
|
||||
rename from docs/source/configuring-ipu.md
|
||||
rename to docs/source/configuring-ipu/configuring-ipu.md
|
||||
diff --git a/docs/source/configuring-ipu/experimental-features/index.rst b/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
new file mode 100644
|
||||
index 00000000..7a26116e
|
||||
--- /dev/null
|
||||
+++ b/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
@@ -0,0 +1,23 @@
|
||||
+Experimental features
|
||||
+========================================================
|
||||
+
|
||||
+This section provides descriptions of all available experimental
|
||||
+features. Low-level details and design decisions of these features
|
||||
+are provided.
|
||||
+
|
||||
+.. warning::
|
||||
+ Actor configuration is currently a preview of the feature, it might change in future releases.
|
||||
+
|
||||
+.. toctree::
|
||||
+ :maxdepth: 4
|
||||
+ :caption: Contents:
|
||||
+ :glob:
|
||||
+
|
||||
+
|
||||
+
|
||||
+.. Indices and tables
|
||||
+.. ==================
|
||||
+..
|
||||
+.. * :ref:`genindex`
|
||||
+.. * :ref:`modindex`
|
||||
+.. * :ref:`search`
|
||||
diff --git a/docs/source/configuring-ipu/index.rst b/docs/source/configuring-ipu/index.rst
|
||||
new file mode 100644
|
||||
index 00000000..1be3ebcf
|
||||
--- /dev/null
|
||||
+++ b/docs/source/configuring-ipu/index.rst
|
||||
@@ -0,0 +1,23 @@
|
||||
+Configuring the in-place upgrade
|
||||
+========================================================
|
||||
+
|
||||
+This section covers possible ways of modifying the in-place upgrade
|
||||
+without making any code changes. Leapp offers multiple mechanism
|
||||
+to affect the upgrade ranging from simple environmental variables
|
||||
+to more robust configuration files. This section also covers available
|
||||
+experimental features.
|
||||
+
|
||||
+.. toctree::
|
||||
+ :maxdepth: 4
|
||||
+ :caption: Contents:
|
||||
+ :glob:
|
||||
+
|
||||
+ configuring-ipu
|
||||
+ experimental-features/index
|
||||
+
|
||||
+.. Indices and tables
|
||||
+.. ==================
|
||||
+..
|
||||
+.. * :ref:`genindex`
|
||||
+.. * :ref:`modindex`
|
||||
+.. * :ref:`search`
|
||||
diff --git a/docs/source/index.rst b/docs/source/index.rst
|
||||
index 33a920ec..27537ca4 100644
|
||||
--- a/docs/source/index.rst
|
||||
+++ b/docs/source/index.rst
|
||||
@@ -19,7 +19,7 @@ providing Red Hat Enterprise Linux in-place upgrade functionality.
|
||||
tutorials/index
|
||||
project-structure/index
|
||||
upgrade-architecture-and-workflow/index
|
||||
- configuring-ipu
|
||||
+ configuring-ipu/index
|
||||
libraries-and-api/index
|
||||
contrib-and-devel-guidelines
|
||||
faq
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,142 +0,0 @@
|
||||
From af35d1fd718258d37ed34be59084e7c77072096c Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 14 Apr 2025 10:14:12 +0200
|
||||
Subject: [PATCH 11/37] docs(livemode): add LiveMode documentation
|
||||
|
||||
This commit introduces a high-level documentation of the livemode
|
||||
feature. The following is documented:
|
||||
- how the upgrade process differs from the standard one when using
|
||||
livemode
|
||||
- why is the feature useful, i.e., why would anyone use it
|
||||
- how to enable and use the feature
|
||||
- what configuration options are available, including an example of
|
||||
configuration
|
||||
|
||||
Jira-ref: RHELMISC-9703
|
||||
---
|
||||
.github/workflows/codespell.yml | 2 +-
|
||||
.../experimental-features/index.rst | 1 +
|
||||
.../experimental-features/livemode.md | 86 +++++++++++++++++++
|
||||
3 files changed, 88 insertions(+), 1 deletion(-)
|
||||
create mode 100644 docs/source/configuring-ipu/experimental-features/livemode.md
|
||||
|
||||
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
|
||||
index b8da5ebb..3e595e32 100644
|
||||
--- a/.github/workflows/codespell.yml
|
||||
+++ b/.github/workflows/codespell.yml
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: codespell-project/actions-codespell@v2
|
||||
with:
|
||||
- ignore_words_list: ro,fo,couldn,repositor,zeor
|
||||
+ ignore_words_list: ro,fo,couldn,repositor,zeor,bootup
|
||||
skip: "./repos/system_upgrade/common/actors/storagescanner/tests/files/mounts,\
|
||||
./repos/system_upgrade/common/actors/networkmanagerreadconfig/tests/files/nm_cfg_file_error,\
|
||||
./repos/system_upgrade/el8toel9/actors/xorgdrvfact/tests/files/journalctl-xorg-intel,\
|
||||
diff --git a/docs/source/configuring-ipu/experimental-features/index.rst b/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
index 7a26116e..37de2fed 100644
|
||||
--- a/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
+++ b/docs/source/configuring-ipu/experimental-features/index.rst
|
||||
@@ -13,6 +13,7 @@ are provided.
|
||||
:caption: Contents:
|
||||
:glob:
|
||||
|
||||
+ livemode
|
||||
|
||||
|
||||
.. Indices and tables
|
||||
diff --git a/docs/source/configuring-ipu/experimental-features/livemode.md b/docs/source/configuring-ipu/experimental-features/livemode.md
|
||||
new file mode 100644
|
||||
index 00000000..44200e80
|
||||
--- /dev/null
|
||||
+++ b/docs/source/configuring-ipu/experimental-features/livemode.md
|
||||
@@ -0,0 +1,86 @@
|
||||
+# LiveMode
|
||||
+
|
||||
+_LiveMode_ is an experimental feature that partially replaces
|
||||
+leapp's custom upgrade environment with a bootable squashfs image of the target
|
||||
+system. Intuitively, this squashfs-based mechanism is similar to using a live
|
||||
+CD (hence the name LiveMode) from which the DNF transaction and other
|
||||
+post-reboot steps will be applied. Such an upgrade environment closely
|
||||
+resembles an ordinary Linux installation, making developing desired
|
||||
+functionality (e.g. supporting network-based storage) much easier.
|
||||
+
|
||||
+## Technical details
|
||||
+During an upgrade, prior to rebooting, leapp constructs a minimal target system
|
||||
+container in order to obtain a version of the DNF stack expected by the new
|
||||
+packages installed during the upgrade. After the container is created, the new
|
||||
+DNF stack is used to download packages that will be installed during the
|
||||
+upgrade. Having all necessary packages, leapp checks the RPM transaction to be
|
||||
+performed during the upgrade. Finally, the upgrade environment is created - an
|
||||
+initramfs containing custom dracut modules that ultimately execute leapp very
|
||||
+early in the boot process. Such an upgrade environment guarantees isolation
|
||||
+from other system services as there is essentially only the upgrade process
|
||||
+running. However, the downside of using such an approach is that the bootup
|
||||
+process of the upgrade environment is non-standard, meaning that almost none of
|
||||
+the classical system initialisation services (e.g., LVM autoactivation) are
|
||||
+running. Developing advanced features such as support for network-based
|
||||
+storage, is, therefore demanding as only a little of the usual initialisation
|
||||
+is present and executed during bootup.
|
||||
+
|
||||
+The LiveMode feature obtains a similar isolation level of the upgrade process
|
||||
+in a different way. Instead of using an initramfs image that executes leapp
|
||||
+early, the system boots into a read-only squashfs system built from the target
|
||||
+system container build previously to check the upgrade RPM transaction. Since
|
||||
+leapp controls the creation of the target system container, it is also in
|
||||
+control of what will be running alongside the upgrade process, limiting the
|
||||
+possibility of arbitrary user-defined services interfering with the upgrade.
|
||||
+The upgrade environment boots into the `multi-user.target` target and leapp is
|
||||
+started as an ordinary systemd service. However, the squashfs image needs to be
|
||||
+stored on the disk, and, hence, the using feature **requires about 700mb of
|
||||
+additional disk space**.
|
||||
+
|
||||
+## Using the feature
|
||||
+It is possible to use the LiveMode feature by having set `LEAPP_UNSUPPORTED=1`
|
||||
+and running leapp as `leapp upgrade --enable-experimental-feature livemode`.
|
||||
+```
|
||||
+LEAPP_UNSUPPORTED=1 leapp upgrade --enable-experimental-feature livemode
|
||||
+```
|
||||
+### Configuration
|
||||
+The feature offers an extensive list of configuration options that can be set
|
||||
+by creating a YAML file in `/etc/leapp/actor_conf.d/` with the extension
|
||||
+`.yaml`. The content of the configuration file must be a mapping defining the
|
||||
+`livemode` key with a value that is a mapping with (some) of the following
|
||||
+keys:
|
||||
+
|
||||
+| Configuration field | Value type | Default | Semantics |
|
||||
+|---------------------|------------|---------|-----------|
|
||||
+| `squashfs_image_path` | `str` | `/var/lib/leapp/live-upgrade.img` | Location where the squashfs image of the minimal target system will be placed. |
|
||||
+| `additional_packages` | `List[str]` | `[]` | Additional packages to be installed into the squashfs image. |
|
||||
+| `autostart_upgrade_after_reboot` | `bool` | `True` | If set to True, the upgrade will start automatically after the reboot. Otherwise a manual trigger is required. |
|
||||
+| `setup_network_manager` | `bool` | `False` | Try enabling Network Manager in the squashfs image. |
|
||||
+| `dracut_network` | `str` | `''` | Dracut network arguments, required if the `url_to_load_squashfs_from` option is set. |
|
||||
+| `url_to_load_squashfs_image_from` | `str` | `''` | URL pointing to the squashfs image that should be used for the upgrade environment. |
|
||||
+| `setup_passwordless_root` | `bool` | `False` | If set to True, the root account of the squashfs image will have empty password. Use with caution. |
|
||||
+| `setup_opensshd_using_auth_keys` | `str` | `''` | If set to a non-empty string, openssh daemon will be setup within the squashfs image using the provided authorized keys file. |
|
||||
+| `capture_strace_info_into` | `str` | `''` | If set to a non-empty string, leapp will be executed under strace and results will be stored within the provided file path. |
|
||||
+
|
||||
+#### Configuration example
|
||||
+Consider the file `/etc/leapp/actor_conf.d/livemode.yaml` with the following contents.
|
||||
+```
|
||||
+livemode:
|
||||
+ additional_packages : [ vim ]
|
||||
+ autostart_upgrade_after_reboot : false
|
||||
+ setup_network_manager : true
|
||||
+ setup_opensshd_using_auth_keys : /root/.ssh/authorized_keys
|
||||
+```
|
||||
+
|
||||
+The configuration results in the following actions:
|
||||
+- Leapp will install the `vim` package into the upgrade environment.
|
||||
+- The upgrade will not be started automatically after reboot. Instead, user
|
||||
+ needs to resume the upgrade manually. Therefore, it is possible to manually
|
||||
+ inspect the system and verify that everything is in order, e.g., all of the
|
||||
+ necessary storage is mounted.
|
||||
+- Leapp will attempt to enable `NetworkManager` inside the upgrade environment
|
||||
+ using source system's network profiles. This attempt is best-effort, meaning
|
||||
+ that there is no guarantee that the network will be functional.
|
||||
+- Leapp will enable the `opensshd` service. If a network access is established
|
||||
+ successfully, it will be possible to login using ssh into the upgrade
|
||||
+ environment using the `root` account and interact with the system.
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,54 +0,0 @@
|
||||
From c3ec002d6ebc825c1c918e3abe9e2c849ef9ddc4 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 16 Apr 2025 13:39:28 +0200
|
||||
Subject: [PATCH 12/37] DOC: rename configuring-ipu.md to envars.md
|
||||
|
||||
The file has bas been created before we introduced the section of
|
||||
"Configuring in-place upgrade" and it contained mixture of various
|
||||
stuff. We have the section now, so let's rename this file to envars
|
||||
and keep here documented environments variables only.
|
||||
|
||||
Dropping information from this file about actors' configurations.
|
||||
This needs to be anyway documented separately now and original
|
||||
information has not been so helpful.
|
||||
---
|
||||
.../configuring-ipu/{configuring-ipu.md => envars.md} | 8 --------
|
||||
docs/source/configuring-ipu/index.rst | 2 +-
|
||||
2 files changed, 1 insertion(+), 9 deletions(-)
|
||||
rename docs/source/configuring-ipu/{configuring-ipu.md => envars.md} (95%)
|
||||
|
||||
diff --git a/docs/source/configuring-ipu/configuring-ipu.md b/docs/source/configuring-ipu/envars.md
|
||||
similarity index 95%
|
||||
rename from docs/source/configuring-ipu/configuring-ipu.md
|
||||
rename to docs/source/configuring-ipu/envars.md
|
||||
index 059b72c2..61a50b82 100644
|
||||
--- a/docs/source/configuring-ipu/configuring-ipu.md
|
||||
+++ b/docs/source/configuring-ipu/envars.md
|
||||
@@ -78,11 +78,3 @@ Change the default target RHEL version. Format: `MAJOR.MINOR`.
|
||||
|
||||
#### LEAPP_DEVEL_USE_PERSISTENT_PACKAGE_CACHE
|
||||
Caches downloaded packages when set to `1`. This will reduce the time needed by leapp when executed multiple times, because it will not have to download already downloaded packages. However, this can lead to a random issues in case the data is not up-to-date or when setting or repositories change. The environment variable is meant to be used only for the part of the upgrade before the reboot and has no effect or use otherwise.
|
||||
-
|
||||
-## Actor configuration
|
||||
-```{warning}
|
||||
-Actor configuration is currently a preview of the feature, it might change in future releases.
|
||||
-```
|
||||
-The actor configuration is to be placed in the `/etc/leapp/actor_conf.d/` directory. An actor configuration is a file in YAML format.
|
||||
-
|
||||
-To define configuration options on your own actor refer to this tutorial TODO link.
|
||||
diff --git a/docs/source/configuring-ipu/index.rst b/docs/source/configuring-ipu/index.rst
|
||||
index 1be3ebcf..6490d6fd 100644
|
||||
--- a/docs/source/configuring-ipu/index.rst
|
||||
+++ b/docs/source/configuring-ipu/index.rst
|
||||
@@ -12,7 +12,7 @@ experimental features.
|
||||
:caption: Contents:
|
||||
:glob:
|
||||
|
||||
- configuring-ipu
|
||||
+ envars
|
||||
experimental-features/index
|
||||
|
||||
.. Indices and tables
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,68 +0,0 @@
|
||||
From 53f125b42f3e17354cc2d3e93b80fe089cf4c3b2 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Tue, 4 Mar 2025 14:42:44 +0100
|
||||
Subject: [PATCH 13/37] fix(userspacegen): add exeception handling to swapping
|
||||
of RHUI clients
|
||||
|
||||
Leapp swaps to RHUI target clients (uninstall source client+install
|
||||
target client) in the scratch container to gain repository access.
|
||||
To perform this step atomically, without loosing repository access
|
||||
in between, `dnf shell` is invoked. The instruction as to which RPMs
|
||||
should be uninstalled and which should be installed are given on
|
||||
stdin of the `dnf shell` command. Currently, if we fail to swap clients
|
||||
we crash with an unhandled exception `CalledProcessError` that contains
|
||||
no information about what went wrong since the actual performed
|
||||
transaction is hidden within the stdin of the process. This patch
|
||||
adds error handling, so that we can tell that we have failed to swap
|
||||
RHUI clients. Leapp's logs also contain the full DNF transaction as well
|
||||
as possible explanations on why we failed.
|
||||
|
||||
jira-ref: RHEL-77945
|
||||
---
|
||||
.../libraries/userspacegen.py | 30 ++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
index 12736ab7..9fc96a52 100644
|
||||
--- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
+++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||||
@@ -1239,7 +1239,35 @@ def setup_target_rhui_access_if_needed(context, indata):
|
||||
'shell'
|
||||
]
|
||||
|
||||
- context.call(cmd, callback_raw=utils.logging_handler, stdin='\n'.join(dnf_transaction_steps))
|
||||
+ try:
|
||||
+ dnf_shell_instructions = '\n'.join(dnf_transaction_steps)
|
||||
+ api.current_logger().debug(
|
||||
+ 'Supplying the following instructions to the `dnf shell`: {}'.format(dnf_shell_instructions)
|
||||
+ )
|
||||
+ context.call(cmd, callback_raw=utils.logging_handler, stdin=dnf_shell_instructions)
|
||||
+ except CalledProcessError as error:
|
||||
+ api.current_logger().debug(
|
||||
+ 'Failed to swap RHUI clients. This is likely because there are no repositories '
|
||||
+ ' containing RHUI clients enabled, or we cannot access them.'
|
||||
+ )
|
||||
+ api.current_logger().debug(error)
|
||||
+
|
||||
+ swapping_clients_info_msg = 'Failed to swap `{0}` (source client{1}) with {2} (target client{3}).'
|
||||
+ swapping_clients_info_msg = swapping_clients_info_msg.format(
|
||||
+ ' '.join(indata.rhui_info.src_client_pkg_names),
|
||||
+ '' if len(indata.rhui_info.src_client_pkg_names) == 1 else 's',
|
||||
+ ' '.join(indata.rhui_info.target_client_pkg_names),
|
||||
+ '' if len(indata.rhui_info.target_client_pkg_names) == 1 else 's',
|
||||
+ )
|
||||
+
|
||||
+ details = {
|
||||
+ 'details': swapping_clients_info_msg,
|
||||
+ 'error': str(error)
|
||||
+ }
|
||||
+ raise StopActorExecutionError(
|
||||
+ 'Failed to swap RHUI clients to establish content access',
|
||||
+ details=details
|
||||
+ )
|
||||
|
||||
_apply_rhui_access_postinstall_tasks(context, setup_info)
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 474b26cbcadc804ff50935a87ca78379999960d4 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Tue, 4 Mar 2025 11:49:05 +0100
|
||||
Subject: [PATCH 14/37] selinux: do not run "semodule" when no modules are
|
||||
selected
|
||||
|
||||
Fixes:
|
||||
2025-03-04 11:21:31.550 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: External command has finished: ['semodule', '-lfull']
|
||||
2025-03-04 11:21:31.551 INFO PID: 679 leapp.workflow.Applications.selinuxapplycustom: Processing custom SELinux policy modules. Count: 1.
|
||||
2025-03-04 11:21:31.551 INFO PID: 679 leapp.workflow.Applications.selinuxapplycustom: Skipping module permissive_rhcd_t on priority 400 because it is already installed.
|
||||
2025-03-04 11:21:31.551 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: External command has started: ['semodule']
|
||||
2025-03-04 11:21:31.555 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: At least one mode must be specified.
|
||||
2025-03-04 11:21:31.555 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: usage: semodule [option]... MODE...
|
||||
2025-03-04 11:21:31.555 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: Manage SELinux policy modules.
|
||||
2025-03-04 11:21:31.556 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: MODES:
|
||||
2025-03-04 11:21:31.556 DEBUG PID: 679 leapp.workflow.Applications.selinuxapplycustom: -R, --reload reload policy
|
||||
...
|
||||
2025-03-04 11:21:31.564 WARNING PID: 679 leapp.workflow.Applications.selinuxapplycustom: Error installing modules in a single transaction:At least one mode must be specified.
|
||||
---
|
||||
.../common/actors/selinux/selinuxapplycustom/actor.py | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py b/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
index 55c64c3e..4856f36a 100644
|
||||
--- a/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/selinux/selinuxapplycustom/actor.py
|
||||
@@ -92,6 +92,10 @@ class SELinuxApplyCustom(Actor):
|
||||
|
||||
command.extend(['-X', str(module.priority), '-i', cil_filename])
|
||||
|
||||
+ if command == ['semodule']:
|
||||
+ # no modules selected for installation
|
||||
+ continue
|
||||
+
|
||||
try:
|
||||
run(command)
|
||||
except CalledProcessError as e:
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,213 +0,0 @@
|
||||
From 57dce775de28615260189a6612fe65e44a7d3bc9 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Sat, 29 Mar 2025 21:41:48 +0100
|
||||
Subject: [PATCH 15/37] feat(ipuconfig): provide info about supported upgrade
|
||||
paths
|
||||
|
||||
At the moment, information about supported upgrade paths is provided via
|
||||
a deprecated IPUPaths message. The current solution is temporary.
|
||||
This patch introduces new field in IPUConfig called
|
||||
'supported_upgrade_paths' that contains a "compressed", pre-filtered,
|
||||
list of upgrade paths. The decision to introduce this new field is
|
||||
because we want to refactor the config.version library to not contain
|
||||
its own supported upgrade paths definitions. Instead, we want to have the
|
||||
information represented only once. Therefore, in order to refactor
|
||||
config.version to use the information received by a message, we need
|
||||
the new field on IPUConfig as we cannot force already-written actors
|
||||
using config.version to add some message to their 'consumes' list.
|
||||
|
||||
Jira-ref: RHEL-80550
|
||||
---
|
||||
.../libraries/ipuworkflowconfig.py | 28 ++++++++++++++++++-
|
||||
.../common/libraries/config/mock_configs.py | 14 +++++++++-
|
||||
.../common/libraries/testutils.py | 20 +++++++++----
|
||||
.../system_upgrade/common/models/ipuconfig.py | 22 +++++++++++++++
|
||||
4 files changed, 77 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
index 749b3347..86df709e 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
@@ -85,6 +85,27 @@ def check_target_major_version(curr_version, target_version):
|
||||
)
|
||||
|
||||
|
||||
+def load_raw_upgrade_paths_for_flavour(flavour='default', paths_definition_file='upgrade_paths.json'):
|
||||
+ with open(api.get_common_file_path(paths_definition_file)) as fp:
|
||||
+ data = json.loads(fp.read())
|
||||
+
|
||||
+ raw_upgrade_paths = data.get(flavour, {})
|
||||
+
|
||||
+ if not raw_upgrade_paths:
|
||||
+ api.current_logger().warning('Cannot discover any upgrade paths for flavour: {}'.format(flavour))
|
||||
+
|
||||
+ return raw_upgrade_paths
|
||||
+
|
||||
+
|
||||
+def construct_models_for_paths_matching_source_major(raw_paths, src_major_version):
|
||||
+ multipaths_matching_source = []
|
||||
+ for src_version, target_versions in ipu_paths.items():
|
||||
+ if src_version.split('.')[0] == src_major_version:
|
||||
+ source_to_targets = IPUSourceToPossibleTargets(source_version=src_version, target_versions=target_versions)
|
||||
+ multipaths_matching_source.append()
|
||||
+ return multipaths_matching_source
|
||||
+
|
||||
+
|
||||
def produce_ipu_config(actor):
|
||||
flavour = os.environ.get('LEAPP_UPGRADE_PATH_FLAVOUR')
|
||||
target_version = os.environ.get('LEAPP_UPGRADE_PATH_TARGET_RELEASE')
|
||||
@@ -93,6 +114,10 @@ def produce_ipu_config(actor):
|
||||
|
||||
check_target_major_version(source_version, target_version)
|
||||
|
||||
+ raw_upgrade_paths = load_raw_upgrade_paths_for_flavour(flavour)
|
||||
+ source_major_version = source_version.split('.')[0]
|
||||
+ exposed_supported_paths = construct_models_for_paths_matching_source_major(raw_upgrade_paths, source_major_version)
|
||||
+
|
||||
actor.produce(IPUConfig(
|
||||
leapp_env_vars=get_env_vars(),
|
||||
os_release=os_release,
|
||||
@@ -102,5 +127,6 @@ def produce_ipu_config(actor):
|
||||
target=target_version
|
||||
),
|
||||
kernel=get_booted_kernel(),
|
||||
- flavour=flavour
|
||||
+ flavour=flavour,
|
||||
+ supported_upgrade_paths=exposed_supported_paths
|
||||
))
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/mock_configs.py b/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
index ee9dd760..a1c9c0fd 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
@@ -6,7 +6,7 @@ The library is supposed to be used only for testing purposes. Import of the
|
||||
library is expected only inside test files.
|
||||
"""
|
||||
|
||||
-from leapp.models import EnvVar, IPUConfig, OSRelease, Version
|
||||
+from leapp.models import EnvVar, IPUConfig, IPUSourceToPossibleTargets, OSRelease, Version
|
||||
|
||||
CONFIG = IPUConfig(
|
||||
leapp_env_vars=[EnvVar(name='LEAPP_DEVEL', value='0')],
|
||||
@@ -23,6 +23,9 @@ CONFIG = IPUConfig(
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ supported_upgrade_paths=[
|
||||
+ IPUSourceToPossibleTargets(source_version='7.6', target_versions=['8.0'])
|
||||
+ ]
|
||||
)
|
||||
|
||||
CONFIG_NO_NETWORK_RENAMING = IPUConfig(
|
||||
@@ -40,6 +43,9 @@ CONFIG_NO_NETWORK_RENAMING = IPUConfig(
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ supported_upgrade_paths=[
|
||||
+ IPUSourceToPossibleTargets(source_version='7.6', target_versions=['8.0'])
|
||||
+ ]
|
||||
)
|
||||
|
||||
CONFIG_ALL_SIGNED = IPUConfig(
|
||||
@@ -57,6 +63,9 @@ CONFIG_ALL_SIGNED = IPUConfig(
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ supported_upgrade_paths=[
|
||||
+ IPUSourceToPossibleTargets(source_version='7.6', target_versions=['8.0'])
|
||||
+ ]
|
||||
)
|
||||
|
||||
CONFIG_S390X = IPUConfig(
|
||||
@@ -73,4 +82,7 @@ CONFIG_S390X = IPUConfig(
|
||||
),
|
||||
architecture='s390x',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ supported_upgrade_paths=[
|
||||
+ IPUSourceToPossibleTargets(source_version='7.6', target_versions=['8.0'])
|
||||
+ ]
|
||||
)
|
||||
diff --git a/repos/system_upgrade/common/libraries/testutils.py b/repos/system_upgrade/common/libraries/testutils.py
|
||||
index afeb360a..1b3c3683 100644
|
||||
--- a/repos/system_upgrade/common/libraries/testutils.py
|
||||
+++ b/repos/system_upgrade/common/libraries/testutils.py
|
||||
@@ -6,7 +6,7 @@ from collections import namedtuple
|
||||
from leapp import reporting
|
||||
from leapp.actors.config import _normalize_config, normalize_schemas
|
||||
from leapp.libraries.common.config import architecture
|
||||
-from leapp.models import EnvVar
|
||||
+from leapp.models import EnvVar, IPUSourceToPossibleTargets
|
||||
from leapp.utils.deprecation import deprecated
|
||||
|
||||
|
||||
@@ -76,7 +76,11 @@ def _make_default_config(actor_config_schema):
|
||||
|
||||
class CurrentActorMocked(object): # pylint:disable=R0904
|
||||
def __init__(self, arch=architecture.ARCH_X86_64, envars=None, kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
- release_id='rhel', src_ver='7.8', dst_ver='8.1', msgs=None, flavour='default', config=None):
|
||||
+ release_id='rhel', src_ver='7.8', dst_ver='8.1', msgs=None, flavour='default', config=None,
|
||||
+ supported_upgrade_paths=None):
|
||||
+ """
|
||||
+ :param List[IPUSourceToPossibleTargets] supported_upgrade_paths: List of supported upgrade paths.
|
||||
+ """
|
||||
envarsList = [EnvVar(name=k, value=v) for k, v in envars.items()] if envars else []
|
||||
version = namedtuple('Version', ['source', 'target'])(src_ver, dst_ver)
|
||||
release = namedtuple('OS_release', ['release_id', 'version_id'])(release_id, src_ver)
|
||||
@@ -85,9 +89,15 @@ class CurrentActorMocked(object): # pylint:disable=R0904
|
||||
self._common_tools_folder = '../../tools'
|
||||
self._actor_folder = 'files'
|
||||
self._actor_tools_folder = 'tools'
|
||||
- self.configuration = namedtuple(
|
||||
- 'configuration', ['architecture', 'kernel', 'leapp_env_vars', 'os_release', 'version', 'flavour']
|
||||
- )(arch, kernel, envarsList, release, version, flavour)
|
||||
+
|
||||
+ if not supported_upgrade_paths:
|
||||
+ supported_upgrade_paths = [IPUSourceToPossibleTargets(source_version=src_ver, target_versions=[dst_ver])]
|
||||
+
|
||||
+ ipu_conf_fields = ['architecture', 'kernel', 'leapp_env_vars', 'os_release',
|
||||
+ 'version', 'flavour', 'supported_upgrade_paths']
|
||||
+ config_type = namedtuple('configuration', ipu_conf_fields)
|
||||
+ self.configuration = config_type(arch, kernel, envarsList, release, version, flavour, supported_upgrade_paths)
|
||||
+
|
||||
self._msgs = msgs or []
|
||||
self.config = {} if config is None else config
|
||||
|
||||
diff --git a/repos/system_upgrade/common/models/ipuconfig.py b/repos/system_upgrade/common/models/ipuconfig.py
|
||||
index 6e7e21b5..0a16b603 100644
|
||||
--- a/repos/system_upgrade/common/models/ipuconfig.py
|
||||
+++ b/repos/system_upgrade/common/models/ipuconfig.py
|
||||
@@ -34,6 +34,21 @@ class Version(Model):
|
||||
"""Version of the target system. E.g. '8.2.'."""
|
||||
|
||||
|
||||
+class IPUSourceToPossibleTargets(Model):
|
||||
+ """
|
||||
+ Represents upgrade paths from a source system version.
|
||||
+
|
||||
+ This model is not supposed to be produced nor consumed directly by any actor.
|
||||
+ """
|
||||
+ topic = SystemInfoTopic
|
||||
+
|
||||
+ source_version = fields.String()
|
||||
+ """Source system version."""
|
||||
+
|
||||
+ target_versions = fields.List(fields.String())
|
||||
+ """List of defined target system versions for the `source_version` system."""
|
||||
+
|
||||
+
|
||||
class IPUConfig(Model):
|
||||
"""
|
||||
IPU workflow configuration model
|
||||
@@ -59,3 +74,10 @@ class IPUConfig(Model):
|
||||
|
||||
flavour = fields.StringEnum(('default', 'saphana'), default='default')
|
||||
"""Flavour of the upgrade - Used to influence changes in supported source/target release"""
|
||||
+
|
||||
+ supported_upgrade_paths = fields.List(fields.Model(IPUSourceToPossibleTargets))
|
||||
+ """
|
||||
+ List of supported upgrade paths.
|
||||
+
|
||||
+ The list contains only upgrade paths for the `flavour` of the source system.
|
||||
+ """
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,381 +0,0 @@
|
||||
From 6bfb0ae05f8ac05f34b5974a85ae5a703ada72b0 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Sat, 29 Mar 2025 21:56:07 +0100
|
||||
Subject: [PATCH 16/37] feat(upgrade_paths): include information about distro
|
||||
id
|
||||
|
||||
This patch tweaks upgrade_paths.json and the code reading it to contain
|
||||
information about what for what distro are the upgrade paths defined.
|
||||
This allows the upgrade tooling to possibly support also other distros,
|
||||
such as CentOS Stream. However, this patch is only a small step towards
|
||||
such a goal and further work is needed to support these systems.
|
||||
|
||||
Jira-ref: RHEL-80550
|
||||
---
|
||||
commands/command_utils.py | 28 ++++--
|
||||
commands/tests/test_upgrade_paths.py | 15 ++--
|
||||
.../libraries/ipuworkflowconfig.py | 35 +++++---
|
||||
.../tests/test_ipuworkflowconfig.py | 85 ++++++++++++++++++-
|
||||
.../tests/files/upgrade_paths.json | 29 ++++---
|
||||
.../common/files/upgrade_paths.json | 36 +++++---
|
||||
6 files changed, 177 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/commands/command_utils.py b/commands/command_utils.py
|
||||
index 84b9de1b..a13ca59b 100644
|
||||
--- a/commands/command_utils.py
|
||||
+++ b/commands/command_utils.py
|
||||
@@ -71,15 +71,24 @@ def get_upgrade_flavour():
|
||||
return LEAPP_UPGRADE_FLAVOUR_DEFAULT
|
||||
|
||||
|
||||
+def _retrieve_os_release_contents(_os_release_path='/etc/os-release'):
|
||||
+ """
|
||||
+ Retrieve the contents of /etc/os-release
|
||||
+
|
||||
+ :rtype: dict[str, str]
|
||||
+ """
|
||||
+ with open(_os_release_path) as os_release_handle:
|
||||
+ lines = os_release_handle.readlines()
|
||||
+ return dict(line.strip().split('=', 1) for line in lines if '=' in line)
|
||||
+
|
||||
+
|
||||
def get_os_release_version_id(filepath):
|
||||
"""
|
||||
Retrieve data about System OS release from provided file.
|
||||
|
||||
:return: `str` version_id
|
||||
"""
|
||||
- with open(filepath) as f:
|
||||
- data = dict(l.strip().split('=', 1) for l in f.readlines() if '=' in l)
|
||||
- return data.get('VERSION_ID', '').strip('"')
|
||||
+ return _retrieve_os_release_contents(_os_release_path=filepath).get('VERSION_ID', '').strip('"')
|
||||
|
||||
|
||||
def get_upgrade_paths_config():
|
||||
@@ -92,13 +101,13 @@ def get_upgrade_paths_config():
|
||||
return upgrade_paths_map
|
||||
|
||||
|
||||
-def get_target_versions_from_config(src_version_id, flavor):
|
||||
+def get_target_versions_from_config(src_version_id, distro, flavor):
|
||||
"""
|
||||
Retrieve all possible target versions from upgrade_paths_map.
|
||||
If no match is found returns empty list.
|
||||
"""
|
||||
upgrade_paths_map = get_upgrade_paths_config()
|
||||
- return upgrade_paths_map.get(flavor, {}).get(src_version_id, [])
|
||||
+ return upgrade_paths_map.get(distro, {}).get(flavor, {}).get(src_version_id, [])
|
||||
|
||||
|
||||
def get_supported_target_versions(flavour=get_upgrade_flavour()):
|
||||
@@ -107,14 +116,17 @@ def get_supported_target_versions(flavour=get_upgrade_flavour()):
|
||||
The default value for `flavour` is `default`.
|
||||
"""
|
||||
|
||||
- current_version_id = get_os_release_version_id('/etc/os-release')
|
||||
- target_versions = get_target_versions_from_config(current_version_id, flavour)
|
||||
+ os_release_contents = _retrieve_os_release_contents()
|
||||
+ current_version_id = os_release_contents.get('VERSION_ID', '').strip('"')
|
||||
+ distro_id = os_release_contents.get('ID', '').strip('"')
|
||||
+
|
||||
+ target_versions = get_target_versions_from_config(current_version_id, distro_id, flavour)
|
||||
if not target_versions:
|
||||
# If we cannot find a particular major.minor version in the map,
|
||||
# we fallback to pick a target version just based on a major version.
|
||||
# This can happen for example when testing not yet released versions
|
||||
major_version = get_major_version(current_version_id)
|
||||
- target_versions = get_target_versions_from_config(major_version, flavour)
|
||||
+ target_versions = get_target_versions_from_config(major_version, distro_id, flavour)
|
||||
|
||||
return target_versions
|
||||
|
||||
diff --git a/commands/tests/test_upgrade_paths.py b/commands/tests/test_upgrade_paths.py
|
||||
index f1312f66..c2cb09aa 100644
|
||||
--- a/commands/tests/test_upgrade_paths.py
|
||||
+++ b/commands/tests/test_upgrade_paths.py
|
||||
@@ -8,19 +8,24 @@ from leapp.exceptions import CommandError
|
||||
|
||||
|
||||
@mock.patch("leapp.cli.commands.command_utils.get_upgrade_paths_config",
|
||||
- return_value={"default": {"7.9": ["8.4"], "8.6": ["9.0"], "7": ["8.4"], "8": ["9.0"]}})
|
||||
+ return_value={'rhel': {"default": {"7.9": ["8.4"], "8.6": ["9.0"], "7": ["8.4"], "8": ["9.0"]}}})
|
||||
def test_get_target_version(mock_open, monkeypatch):
|
||||
-
|
||||
- monkeypatch.setattr(command_utils, 'get_os_release_version_id', lambda x: '8.6')
|
||||
+ etc_os_release_contents = {'ID': 'rhel', 'VERSION_ID': '8.6'}
|
||||
+ monkeypatch.setattr(command_utils, '_retrieve_os_release_contents',
|
||||
+ lambda *args, **kwargs: etc_os_release_contents)
|
||||
assert command_utils.get_target_version('default') == '9.0'
|
||||
|
||||
monkeypatch.setenv('LEAPP_DEVEL_TARGET_RELEASE', '')
|
||||
- monkeypatch.setattr(command_utils, 'get_os_release_version_id', lambda x: '8.6')
|
||||
+ etc_os_release_contents = {'ID': 'rhel', 'VERSION_ID': '8.6'}
|
||||
+ monkeypatch.setattr(command_utils, '_retrieve_os_release_contents',
|
||||
+ lambda *args, **kwargs: etc_os_release_contents)
|
||||
assert command_utils.get_target_version('default') == '9.0'
|
||||
|
||||
monkeypatch.delenv('LEAPP_DEVEL_TARGET_RELEASE', raising=True)
|
||||
# unsupported path
|
||||
- monkeypatch.setattr(command_utils, 'get_os_release_version_id', lambda x: '8.5')
|
||||
+ etc_os_release_contents = {'ID': 'rhel', 'VERSION_ID': '8.5'}
|
||||
+ monkeypatch.setattr(command_utils, '_retrieve_os_release_contents',
|
||||
+ lambda *args, **kwargs: etc_os_release_contents)
|
||||
assert command_utils.get_target_version('default') == '9.0'
|
||||
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
index 86df709e..35f61669 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
@@ -1,9 +1,10 @@
|
||||
+import json
|
||||
import os
|
||||
import platform
|
||||
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
-from leapp.libraries.stdlib import CalledProcessError, run
|
||||
-from leapp.models import EnvVar, IPUConfig, OSRelease, Version
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
+from leapp.models import EnvVar, IPUConfig, IPUSourceToPossibleTargets, OSRelease, Version
|
||||
|
||||
ENV_IGNORE = ('LEAPP_CURRENT_PHASE', 'LEAPP_CURRENT_ACTOR', 'LEAPP_VERBOSE',
|
||||
'LEAPP_DEBUG')
|
||||
@@ -85,24 +86,34 @@ def check_target_major_version(curr_version, target_version):
|
||||
)
|
||||
|
||||
|
||||
-def load_raw_upgrade_paths_for_flavour(flavour='default', paths_definition_file='upgrade_paths.json'):
|
||||
+def load_upgrade_paths_definitions(paths_definition_file):
|
||||
with open(api.get_common_file_path(paths_definition_file)) as fp:
|
||||
- data = json.loads(fp.read())
|
||||
+ definitions = json.loads(fp.read())
|
||||
+ return definitions
|
||||
|
||||
- raw_upgrade_paths = data.get(flavour, {})
|
||||
|
||||
- if not raw_upgrade_paths:
|
||||
- api.current_logger().warning('Cannot discover any upgrade paths for flavour: {}'.format(flavour))
|
||||
+def load_raw_upgrade_paths_for_distro_and_flavour(distro_id, flavour, paths_definition_file='upgrade_paths.json'):
|
||||
+ all_definitions = load_upgrade_paths_definitions(paths_definition_file)
|
||||
+ raw_upgrade_paths_for_distro = all_definitions.get(distro_id, {})
|
||||
|
||||
- return raw_upgrade_paths
|
||||
+ if not raw_upgrade_paths_for_distro:
|
||||
+ api.current_logger().warning('No upgrade paths defined for distro \'{}\''.format(distro_id))
|
||||
+
|
||||
+ raw_upgrade_paths_for_flavour = raw_upgrade_paths_for_distro.get(flavour, {})
|
||||
+
|
||||
+ if not raw_upgrade_paths_for_flavour:
|
||||
+ api.current_logger().warning('Cannot discover any upgrade paths for flavour: {}/{}'.format(distro_id, flavour))
|
||||
+
|
||||
+ return raw_upgrade_paths_for_flavour
|
||||
|
||||
|
||||
def construct_models_for_paths_matching_source_major(raw_paths, src_major_version):
|
||||
multipaths_matching_source = []
|
||||
- for src_version, target_versions in ipu_paths.items():
|
||||
+ for src_version, target_versions in raw_paths.items():
|
||||
if src_version.split('.')[0] == src_major_version:
|
||||
- source_to_targets = IPUSourceToPossibleTargets(source_version=src_version, target_versions=target_versions)
|
||||
- multipaths_matching_source.append()
|
||||
+ source_to_targets = IPUSourceToPossibleTargets(source_version=src_version,
|
||||
+ target_versions=target_versions)
|
||||
+ multipaths_matching_source.append(source_to_targets)
|
||||
return multipaths_matching_source
|
||||
|
||||
|
||||
@@ -114,7 +125,7 @@ def produce_ipu_config(actor):
|
||||
|
||||
check_target_major_version(source_version, target_version)
|
||||
|
||||
- raw_upgrade_paths = load_raw_upgrade_paths_for_flavour(flavour)
|
||||
+ raw_upgrade_paths = load_raw_upgrade_paths_for_distro_and_flavour(os_release.release_id, flavour)
|
||||
source_major_version = source_version.split('.')[0]
|
||||
exposed_supported_paths = construct_models_for_paths_matching_source_major(raw_upgrade_paths, source_major_version)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
index a5e4d03b..d88424ce 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
@@ -7,7 +7,7 @@ import pytest
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.actor import ipuworkflowconfig
|
||||
from leapp.libraries.stdlib import CalledProcessError
|
||||
-from leapp.models import OSRelease
|
||||
+from leapp.models import IPUSourceToPossibleTargets, OSRelease
|
||||
|
||||
CUR_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -70,3 +70,86 @@ def test_get_booted_kernel(monkeypatch):
|
||||
monkeypatch.setattr(ipuworkflowconfig, 'run', _raise_call_error)
|
||||
with pytest.raises(StopActorExecutionError):
|
||||
ipuworkflowconfig.get_booted_kernel()
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('source_major_version', 'expected_result'),
|
||||
+ (
|
||||
+ ('7', []),
|
||||
+ (
|
||||
+ '8',
|
||||
+ [
|
||||
+ IPUSourceToPossibleTargets(source_version='8.10', target_versions=['9.4', '9.5', '9.6']),
|
||||
+ IPUSourceToPossibleTargets(source_version='8.4', target_versions=['9.2']),
|
||||
+ IPUSourceToPossibleTargets(source_version='8', target_versions=['9.4', '9.5', '9.6']),
|
||||
+ ]
|
||||
+ ),
|
||||
+ (
|
||||
+ '80',
|
||||
+ [
|
||||
+ IPUSourceToPossibleTargets(source_version='80.0', target_versions=['81.0']),
|
||||
+ ]
|
||||
+ ),
|
||||
+ )
|
||||
+)
|
||||
+def test_construct_models_for_paths_matching_source_major(source_major_version, expected_result):
|
||||
+ RAW_PATHS = {
|
||||
+ '8.10': ['9.4', '9.5', '9.6'],
|
||||
+ '8.4': ['9.2'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '8': ['9.4', '9.5', '9.6'],
|
||||
+ '80.0': ['81.0']
|
||||
+ }
|
||||
+
|
||||
+ result = ipuworkflowconfig.construct_models_for_paths_matching_source_major(RAW_PATHS, source_major_version)
|
||||
+ result = sorted(result, key=lambda x: x.source_version)
|
||||
+ assert result == sorted(expected_result, key=lambda x: x.source_version)
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('distro', 'flavour', 'expected_result'),
|
||||
+ (
|
||||
+ ('fedora', 'default', {}),
|
||||
+ (
|
||||
+ 'rhel', 'default',
|
||||
+ {
|
||||
+ '8.10': ['9.4', '9.5', '9.6'],
|
||||
+ '8.4': ['9.2'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '8': ['9.4', '9.5', '9.6'],
|
||||
+ '9': ['10.0']
|
||||
+ }
|
||||
+ ),
|
||||
+ (
|
||||
+ 'rhel', 'saphana',
|
||||
+ {
|
||||
+ '8.10': ['9.6', '9.4'],
|
||||
+ '8': ['9.6', '9.4'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '9': ['10.0']
|
||||
+ }
|
||||
+ ),
|
||||
+ )
|
||||
+)
|
||||
+def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flavour, expected_result):
|
||||
+ defined_upgrade_paths = {
|
||||
+ 'rhel': {
|
||||
+ 'default': {
|
||||
+ '8.10': ['9.4', '9.5', '9.6'],
|
||||
+ '8.4': ['9.2'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '8': ['9.4', '9.5', '9.6'],
|
||||
+ '9': ['10.0']
|
||||
+ },
|
||||
+ 'saphana': {
|
||||
+ '8.10': ['9.6', '9.4'],
|
||||
+ '8': ['9.6', '9.4'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '9': ['10.0']
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ monkeypatch.setattr(ipuworkflowconfig, 'load_upgrade_paths_definitions', lambda *args: defined_upgrade_paths)
|
||||
+
|
||||
+ result = ipuworkflowconfig.load_raw_upgrade_paths_for_distro_and_flavour(distro, flavour)
|
||||
+ assert result == expected_result
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json b/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
index edd32224..b6107376 100644
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
+++ b/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
@@ -1,15 +1,22 @@
|
||||
{
|
||||
- "default": {
|
||||
- "8.10": ["9.4", "9.5", "9.6"],
|
||||
- "8.4": ["9.2"],
|
||||
- "9.6": ["10.0"],
|
||||
- "8": ["9.4", "9.5", "9.6"],
|
||||
- "9": ["10.0"]
|
||||
+ "rhel": {
|
||||
+ "default": {
|
||||
+ "8.10": ["9.4", "9.5", "9.6"],
|
||||
+ "8.4": ["9.2"],
|
||||
+ "9.6": ["10.0"],
|
||||
+ "8": ["9.4", "9.5", "9.6"],
|
||||
+ "9": ["10.0"]
|
||||
+ },
|
||||
+ "saphana": {
|
||||
+ "8.10": ["9.6", "9.4"],
|
||||
+ "8": ["9.6", "9.4"],
|
||||
+ "9.6": ["10.0"],
|
||||
+ "9": ["10.0"]
|
||||
+ }
|
||||
},
|
||||
- "saphana": {
|
||||
- "8.10": ["9.6", "9.4"],
|
||||
- "8": ["9.6", "9.4"],
|
||||
- "9.6": ["10.0"],
|
||||
- "9": ["10.0"]
|
||||
+ "centos": {
|
||||
+ "default": {
|
||||
+ "8": ["9"]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
diff --git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
index 1c54dae8..7ace7943 100644
|
||||
--- a/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
+++ b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
@@ -1,18 +1,26 @@
|
||||
{
|
||||
- "default": {
|
||||
- "7.9": ["8.10"],
|
||||
- "8.10": ["9.4", "9.6"],
|
||||
- "9.6": ["10.0"],
|
||||
- "7": ["8.10"],
|
||||
- "8": ["9.4", "9.6"],
|
||||
- "9": ["10.0"]
|
||||
+ "rhel": {
|
||||
+ "default": {
|
||||
+ "7.9": ["8.10"],
|
||||
+ "8.10": ["9.4", "9.6"],
|
||||
+ "9.6": ["10.0"],
|
||||
+ "7": ["8.10"],
|
||||
+ "8": ["9.4", "9.6"],
|
||||
+ "9": ["10.0"]
|
||||
+ },
|
||||
+ "saphana": {
|
||||
+ "7.9": ["8.10"],
|
||||
+ "7": ["8.10"],
|
||||
+ "8.10": ["9.6", "9.4"],
|
||||
+ "8": ["9.6", "9.4"],
|
||||
+ "9.6": ["10.0"],
|
||||
+ "9": ["10.0"]
|
||||
+ }
|
||||
},
|
||||
- "saphana": {
|
||||
- "7.9": ["8.10"],
|
||||
- "7": ["8.10"],
|
||||
- "8.10": ["9.6", "9.4"],
|
||||
- "8": ["9.6", "9.4"],
|
||||
- "9.6": ["10.0"],
|
||||
- "9": ["10.0"]
|
||||
+ "centos": {
|
||||
+ "default": {
|
||||
+ "8": ["9"],
|
||||
+ "9": ["10"]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,407 +0,0 @@
|
||||
From 4432e62f02af820d040f45d7fc59296cf734bdc5 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Sat, 29 Mar 2025 22:00:38 +0100
|
||||
Subject: [PATCH 17/37] cleanup(ipupaths): remove IPUPaths message
|
||||
|
||||
Drop the already deprecated IPUPaths message that was used to inform
|
||||
actors about supported upgrade paths. Instead, the functionality has
|
||||
been assumed by IPUConfig.
|
||||
|
||||
Jira-ref: RHEL-80550
|
||||
---
|
||||
.../common/actors/checktargetversion/actor.py | 3 +-
|
||||
.../libraries/checktargetversion.py | 15 +--
|
||||
.../tests/test_checktargetversion.py | 27 +++---
|
||||
.../actors/scandefinedipupaths/actor.py | 31 ------
|
||||
.../libraries/scandefinedipupaths.py | 43 --------
|
||||
.../tests/files/upgrade_paths.json | 22 -----
|
||||
.../tests/test_scandefinedipupaths.py | 97 -------------------
|
||||
.../system_upgrade/common/models/ipupaths.py | 43 --------
|
||||
8 files changed, 17 insertions(+), 264 deletions(-)
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scandefinedipupaths/actor.py
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scandefinedipupaths/libraries/scandefinedipupaths.py
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
delete mode 100644 repos/system_upgrade/common/actors/scandefinedipupaths/tests/test_scandefinedipupaths.py
|
||||
delete mode 100644 repos/system_upgrade/common/models/ipupaths.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checktargetversion/actor.py b/repos/system_upgrade/common/actors/checktargetversion/actor.py
|
||||
index 291ce3da..31375bfc 100644
|
||||
--- a/repos/system_upgrade/common/actors/checktargetversion/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/checktargetversion/actor.py
|
||||
@@ -1,6 +1,5 @@
|
||||
from leapp.actors import Actor
|
||||
from leapp.libraries.actor import checktargetversion
|
||||
-from leapp.models import IPUPaths
|
||||
from leapp.reporting import Report
|
||||
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||||
|
||||
@@ -14,7 +13,7 @@ class CheckTargetVersion(Actor):
|
||||
"""
|
||||
|
||||
name = 'check_target_version'
|
||||
- consumes = (IPUPaths,)
|
||||
+ consumes = ()
|
||||
produces = (Report,)
|
||||
tags = (ChecksPhaseTag, IPUWorkflowTag)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checktargetversion/libraries/checktargetversion.py b/repos/system_upgrade/common/actors/checktargetversion/libraries/checktargetversion.py
|
||||
index 0df1ece2..2369ae11 100644
|
||||
--- a/repos/system_upgrade/common/actors/checktargetversion/libraries/checktargetversion.py
|
||||
+++ b/repos/system_upgrade/common/actors/checktargetversion/libraries/checktargetversion.py
|
||||
@@ -1,22 +1,15 @@
|
||||
from leapp import reporting
|
||||
-from leapp.exceptions import StopActorExecutionError
|
||||
from leapp.libraries.common.config import get_env, version
|
||||
from leapp.libraries.stdlib import api
|
||||
-from leapp.models import IPUPaths
|
||||
-from leapp.utils.deprecation import suppress_deprecation
|
||||
|
||||
FMT_LIST_SEPARATOR = '\n - '
|
||||
|
||||
|
||||
-@suppress_deprecation(IPUPaths)
|
||||
def get_supported_target_versions():
|
||||
- ipu_paths = next(api.consume(IPUPaths), None)
|
||||
src_version = version.get_source_version()
|
||||
- if not ipu_paths:
|
||||
- # NOTE: missing unit-tests. Unexpected situation and the solution
|
||||
- # is possibly temporary
|
||||
- raise StopActorExecutionError('Missing the IPUPaths message. Cannot determine defined upgrade paths.')
|
||||
- for ipu_path in ipu_paths.data:
|
||||
+ supported_paths = api.current_actor().configuration.supported_upgrade_paths
|
||||
+
|
||||
+ for ipu_path in supported_paths:
|
||||
if ipu_path.source_version == src_version:
|
||||
return ipu_path.target_versions
|
||||
|
||||
@@ -28,7 +21,7 @@ def get_supported_target_versions():
|
||||
.format(src_version)
|
||||
)
|
||||
maj_version = version.get_source_major_version()
|
||||
- for ipu_path in ipu_paths.data:
|
||||
+ for ipu_path in supported_paths:
|
||||
if ipu_path.source_version == maj_version:
|
||||
return ipu_path.target_versions
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checktargetversion/tests/test_checktargetversion.py b/repos/system_upgrade/common/actors/checktargetversion/tests/test_checktargetversion.py
|
||||
index 07391e7a..6927af23 100644
|
||||
--- a/repos/system_upgrade/common/actors/checktargetversion/tests/test_checktargetversion.py
|
||||
+++ b/repos/system_upgrade/common/actors/checktargetversion/tests/test_checktargetversion.py
|
||||
@@ -4,36 +4,33 @@ import pytest
|
||||
|
||||
from leapp import reporting
|
||||
from leapp.libraries.actor import checktargetversion
|
||||
+from leapp.libraries.common.config import architecture
|
||||
from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked, logger_mocked
|
||||
from leapp.libraries.stdlib import api
|
||||
-from leapp.models import IPUPath, IPUPaths
|
||||
+from leapp.models import IPUSourceToPossibleTargets
|
||||
from leapp.utils.deprecation import suppress_deprecation
|
||||
from leapp.utils.report import is_inhibitor
|
||||
|
||||
|
||||
-# It must be in a function so we can suppress the deprecation warning in tests.
|
||||
-@suppress_deprecation(IPUPaths)
|
||||
-def _get_upgrade_paths_data():
|
||||
- return IPUPaths(data=[
|
||||
- IPUPath(source_version='7.9', target_versions=['8.10']),
|
||||
- IPUPath(source_version='8.10', target_versions=['9.4', '9.5', '9.6']),
|
||||
- IPUPath(source_version='9.6', target_versions=['10.0']),
|
||||
- IPUPath(source_version='7', target_versions=['8.10']),
|
||||
- IPUPath(source_version='8', target_versions=['9.4', '9.5', '9.6']),
|
||||
- IPUPath(source_version='9', target_versions=['10.0'])
|
||||
- ])
|
||||
-
|
||||
-
|
||||
@pytest.fixture
|
||||
def setup_monkeypatch(monkeypatch):
|
||||
"""Fixture to set up common monkeypatches."""
|
||||
|
||||
def _setup(source_version, target_version, leapp_unsupported='0'):
|
||||
+ suppoted_upgrade_paths = [
|
||||
+ IPUSourceToPossibleTargets(source_version='7.9', target_versions=['8.10']),
|
||||
+ IPUSourceToPossibleTargets(source_version='8.10', target_versions=['9.4', '9.5', '9.6']),
|
||||
+ IPUSourceToPossibleTargets(source_version='9.6', target_versions=['10.0']),
|
||||
+ IPUSourceToPossibleTargets(source_version='7', target_versions=['8.10']),
|
||||
+ IPUSourceToPossibleTargets(source_version='8', target_versions=['9.4', '9.5', '9.6']),
|
||||
+ IPUSourceToPossibleTargets(source_version='9', target_versions=['10.0'])
|
||||
+ ]
|
||||
+
|
||||
curr_actor_mocked = CurrentActorMocked(
|
||||
src_ver=source_version,
|
||||
dst_ver=target_version,
|
||||
envars={'LEAPP_UNSUPPORTED': leapp_unsupported},
|
||||
- msgs=[_get_upgrade_paths_data()]
|
||||
+ supported_upgrade_paths=suppoted_upgrade_paths
|
||||
)
|
||||
monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||||
monkeypatch.setattr(api, 'current_logger', logger_mocked())
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/actor.py b/repos/system_upgrade/common/actors/scandefinedipupaths/actor.py
|
||||
deleted file mode 100644
|
||||
index a84c85f2..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/actor.py
|
||||
+++ /dev/null
|
||||
@@ -1,31 +0,0 @@
|
||||
-from leapp.actors import Actor
|
||||
-from leapp.libraries.actor import scandefinedipupaths
|
||||
-from leapp.models import IPUPaths
|
||||
-from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
-
|
||||
-
|
||||
-class ScanDefinedIPUPaths(Actor):
|
||||
- """
|
||||
- Load defined IPU paths for the current major source system version
|
||||
- and defined upgrade flavour.
|
||||
-
|
||||
- The upgrade paths are defined inside `files/upgrade_paths.json`.
|
||||
- Based on the defined upgrade flavour (default, saphana, ..) loads particular
|
||||
- definitions and filter out all upgrade paths from other system major versions.
|
||||
- I.e. for RHEL 8.10 system with the default upgrade flavour, load all upgrade
|
||||
- paths from any RHEL 8 system defined under the 'default' flavour.
|
||||
-
|
||||
- The code is mostly taken from the CLI command_utils. The duplicate solution
|
||||
- is not so problematic now as it will be unified next time.
|
||||
-
|
||||
- Note the deprecation suppression is expected here as this is considered as
|
||||
- temporary solution now.
|
||||
- """
|
||||
-
|
||||
- name = 'scan_defined_ipu_paths'
|
||||
- consumes = ()
|
||||
- produces = (IPUPaths,)
|
||||
- tags = (IPUWorkflowTag, FactsPhaseTag)
|
||||
-
|
||||
- def process(self):
|
||||
- scandefinedipupaths.process()
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/libraries/scandefinedipupaths.py b/repos/system_upgrade/common/actors/scandefinedipupaths/libraries/scandefinedipupaths.py
|
||||
deleted file mode 100644
|
||||
index 1e39f2c8..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/libraries/scandefinedipupaths.py
|
||||
+++ /dev/null
|
||||
@@ -1,43 +0,0 @@
|
||||
-import json
|
||||
-
|
||||
-from leapp.libraries.common.config.version import get_source_major_version
|
||||
-from leapp.libraries.stdlib import api
|
||||
-from leapp.models import IPUPath, IPUPaths
|
||||
-from leapp.utils.deprecation import suppress_deprecation
|
||||
-
|
||||
-
|
||||
-def load_ipu_paths_for_flavour(flavour, _filename='upgrade_paths.json'):
|
||||
- """
|
||||
- Load defined IPU paths from the upgrade_paths.json file for the specified
|
||||
- flavour.
|
||||
-
|
||||
- Note the file is required to be always present, so skipping any test
|
||||
- for the missing file. Crash hard and terribly if the file is missing
|
||||
- or the content is invalid.
|
||||
-
|
||||
- We expect the flavour to be always good as it is under our control
|
||||
- (already sanitized in IPUConfig), but return empty dict and log it if missing.
|
||||
- """
|
||||
- with open(api.get_common_file_path(_filename)) as fp:
|
||||
- data = json.loads(fp.read())
|
||||
- if flavour not in data:
|
||||
- api.current_logger().warning(
|
||||
- 'Cannot discover any upgrade paths for flavour: {}'
|
||||
- .format(flavour)
|
||||
- )
|
||||
- return data.get(flavour, {})
|
||||
-
|
||||
-
|
||||
-def get_filtered_ipu_paths(ipu_paths, src_major_version):
|
||||
- result = []
|
||||
- for src_version, tgt_versions in ipu_paths.items():
|
||||
- if src_version.split('.')[0] == src_major_version:
|
||||
- result.append(IPUPath(source_version=src_version, target_versions=tgt_versions))
|
||||
- return result
|
||||
-
|
||||
-
|
||||
-@suppress_deprecation(IPUPaths)
|
||||
-def process():
|
||||
- flavour = api.current_actor().configuration.flavour
|
||||
- ipu_paths = load_ipu_paths_for_flavour(flavour)
|
||||
- api.produce(IPUPaths(data=get_filtered_ipu_paths(ipu_paths, get_source_major_version())))
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json b/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
deleted file mode 100644
|
||||
index b6107376..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/files/upgrade_paths.json
|
||||
+++ /dev/null
|
||||
@@ -1,22 +0,0 @@
|
||||
-{
|
||||
- "rhel": {
|
||||
- "default": {
|
||||
- "8.10": ["9.4", "9.5", "9.6"],
|
||||
- "8.4": ["9.2"],
|
||||
- "9.6": ["10.0"],
|
||||
- "8": ["9.4", "9.5", "9.6"],
|
||||
- "9": ["10.0"]
|
||||
- },
|
||||
- "saphana": {
|
||||
- "8.10": ["9.6", "9.4"],
|
||||
- "8": ["9.6", "9.4"],
|
||||
- "9.6": ["10.0"],
|
||||
- "9": ["10.0"]
|
||||
- }
|
||||
- },
|
||||
- "centos": {
|
||||
- "default": {
|
||||
- "8": ["9"]
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/test_scandefinedipupaths.py b/repos/system_upgrade/common/actors/scandefinedipupaths/tests/test_scandefinedipupaths.py
|
||||
deleted file mode 100644
|
||||
index 9ffc9829..00000000
|
||||
--- a/repos/system_upgrade/common/actors/scandefinedipupaths/tests/test_scandefinedipupaths.py
|
||||
+++ /dev/null
|
||||
@@ -1,97 +0,0 @@
|
||||
-import json
|
||||
-import os
|
||||
-
|
||||
-import pytest
|
||||
-
|
||||
-from leapp.libraries.actor import scandefinedipupaths
|
||||
-from leapp.libraries.common.testutils import CurrentActorMocked, produce_mocked
|
||||
-from leapp.models import IPUPath, IPUPaths
|
||||
-from leapp.utils.deprecation import suppress_deprecation
|
||||
-
|
||||
-CUR_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
-
|
||||
-
|
||||
-class CurrentActorMockedModified(CurrentActorMocked):
|
||||
- def get_common_file_path(self, fname):
|
||||
- fpath = os.path.join(CUR_DIR, 'files', fname)
|
||||
- assert os.path.exists(fpath)
|
||||
- if os.path.exists(fpath):
|
||||
- return fpath
|
||||
- return None
|
||||
-
|
||||
-
|
||||
-@pytest.mark.parametrize(('flavour', 'expected_result'), (
|
||||
- ('nonsense', {}),
|
||||
- (
|
||||
- 'default',
|
||||
- {
|
||||
- '8.10': ['9.4', '9.5', '9.6'],
|
||||
- '8.4': ['9.2'],
|
||||
- '9.6': ['10.0'],
|
||||
- '8': ['9.4', '9.5', '9.6'],
|
||||
- '9': ['10.0']
|
||||
- }
|
||||
- ),
|
||||
- (
|
||||
- 'saphana',
|
||||
- {
|
||||
- '8.10': ['9.6', '9.4'],
|
||||
- '8': ['9.6', '9.4'],
|
||||
- '9.6': ['10.0'],
|
||||
- '9': ['10.0']
|
||||
- }
|
||||
- ),
|
||||
-))
|
||||
-def test_load_ipu_paths_for_flavour(monkeypatch, flavour, expected_result):
|
||||
- monkeypatch.setattr(scandefinedipupaths.api, 'current_actor', CurrentActorMockedModified())
|
||||
-
|
||||
- result = scandefinedipupaths.load_ipu_paths_for_flavour(flavour=flavour)
|
||||
- assert result == expected_result
|
||||
-
|
||||
-
|
||||
-_DATA_IPU_PATHS = {
|
||||
- '8.10': ['9.4', '9.5', '9.6'],
|
||||
- '8.4': ['9.2'],
|
||||
- '9.6': ['10.0'],
|
||||
- '8': ['9.4', '9.5', '9.6'],
|
||||
- '80.0': ['81.0']
|
||||
-}
|
||||
-
|
||||
-
|
||||
-@suppress_deprecation(IPUPaths)
|
||||
-@pytest.mark.parametrize(('maj_version', 'expected_result'), (
|
||||
- ('7', []),
|
||||
- (
|
||||
- '8',
|
||||
- [
|
||||
- IPUPath(source_version='8.10', target_versions=['9.4', '9.5', '9.6']),
|
||||
- IPUPath(source_version='8.4', target_versions=['9.2']),
|
||||
- IPUPath(source_version='8', target_versions=['9.4', '9.5', '9.6']),
|
||||
- ]
|
||||
- ),
|
||||
- (
|
||||
- '80',
|
||||
- [
|
||||
- IPUPath(source_version='80.0', target_versions=['81.0']),
|
||||
- ]
|
||||
- ),
|
||||
-
|
||||
-
|
||||
-))
|
||||
-def test_get_filtered_ipu_paths(monkeypatch, maj_version, expected_result):
|
||||
- result = scandefinedipupaths.get_filtered_ipu_paths(_DATA_IPU_PATHS, maj_version)
|
||||
- result = sorted(result, key=lambda x: x.source_version)
|
||||
- assert result == sorted(expected_result, key=lambda x: x.source_version)
|
||||
-
|
||||
-
|
||||
-def test_scan_defined_ipu_paths(monkeypatch):
|
||||
- # let's try one 'full' happy run
|
||||
- monkeypatch.setattr(scandefinedipupaths.api, 'current_actor', CurrentActorMockedModified(src_ver='9.6'))
|
||||
- monkeypatch.setattr(scandefinedipupaths.api, 'produce', produce_mocked())
|
||||
- scandefinedipupaths.process()
|
||||
-
|
||||
- assert scandefinedipupaths.api.produce.called == 1
|
||||
- msg = scandefinedipupaths.api.produce.model_instances[0]
|
||||
- assert isinstance(msg, IPUPaths)
|
||||
- assert len(msg.data) == 2
|
||||
- assert {i.source_version for i in msg.data} == {'9', '9.6'}
|
||||
diff --git a/repos/system_upgrade/common/models/ipupaths.py b/repos/system_upgrade/common/models/ipupaths.py
|
||||
deleted file mode 100644
|
||||
index 5469f25e..00000000
|
||||
--- a/repos/system_upgrade/common/models/ipupaths.py
|
||||
+++ /dev/null
|
||||
@@ -1,43 +0,0 @@
|
||||
-from leapp.models import fields, Model
|
||||
-from leapp.topics import SystemInfoTopic
|
||||
-from leapp.utils.deprecation import deprecated
|
||||
-
|
||||
-
|
||||
-class IPUPath(Model):
|
||||
- """
|
||||
- Represent upgrade paths from a source system version.
|
||||
-
|
||||
- This model is not supposed to be produced nor consumed directly by any actor.
|
||||
- See `IPUPaths` instead.
|
||||
- """
|
||||
- topic = SystemInfoTopic
|
||||
-
|
||||
- source_version = fields.String()
|
||||
- """Version of a particular source system."""
|
||||
-
|
||||
- target_versions = fields.List(fields.String())
|
||||
- """List of defined target system versions for the `source_version` system."""
|
||||
-
|
||||
-
|
||||
-@deprecated(
|
||||
- since="2025-02-01",
|
||||
- message="This model is temporary and not assumed to be used in any actors."
|
||||
-)
|
||||
-class IPUPaths(Model):
|
||||
- """
|
||||
- Defined Upgrade paths from the source system major version and used upgrade flavour.
|
||||
-
|
||||
- In example for the RHEL 8.10 system with the 'default' upgrade flavour it will
|
||||
- contain information about all defined upgrade paths from any RHEL 8 system
|
||||
- for the 'default' flavour (other flavour can be e.g. 'saphana' for systems
|
||||
- with SAP HANA installed.
|
||||
-
|
||||
- Note this model is marked as deprecated now as it is considered as a temporary
|
||||
- solution. It can be removed in any future release!
|
||||
- """
|
||||
- topic = SystemInfoTopic
|
||||
-
|
||||
- data = fields.List(fields.Model(IPUPath))
|
||||
- """
|
||||
- List of defined (filtered) upgrade paths.
|
||||
- """
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,123 +0,0 @@
|
||||
From 09ef3dee08656058d9ac4b9c69d6848b2eae6dfb Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 31 Mar 2025 09:56:58 +0200
|
||||
Subject: [PATCH 18/37] libs(version): use supported_upgrade_paths
|
||||
|
||||
Refactor the config.version library to use actor.configuration to obtain
|
||||
the list of supported upgrade paths instead of having its own (duplicit)
|
||||
definitions.
|
||||
|
||||
Mark leapp.libraries.common.config.version.SUPPORTED_VERSIONS as
|
||||
deprecated and update the documentation.
|
||||
|
||||
Jira-ref: RHEL-80550
|
||||
---
|
||||
.../libraries-and-api/deprecations-list.md | 3 +-
|
||||
.../libraries/config/tests/test_version.py | 28 +++++++++----------
|
||||
.../common/libraries/config/version.py | 23 +++++++++------
|
||||
3 files changed, 31 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/docs/source/libraries-and-api/deprecations-list.md b/docs/source/libraries-and-api/deprecations-list.md
|
||||
index 07cbf1d6..c8489af3 100644
|
||||
--- a/docs/source/libraries-and-api/deprecations-list.md
|
||||
+++ b/docs/source/libraries-and-api/deprecations-list.md
|
||||
@@ -14,7 +14,8 @@ Only the versions in which a deprecation has been made are listed.
|
||||
|
||||
## Next release <span style="font-size:0.5em; font-weight:normal">(till TODO date)</span>
|
||||
|
||||
-- No new deprecation yet
|
||||
+- Shared libraries
|
||||
+ - **`leapp.libraries.common.config.version.SUPPORTED_VERSIONS`** - The `SUPPORTED_VERSIONS` dict has been deprecated as it is problematic with the new design. Use `leapp.libraries.common.config.version.is_supported_version()` or `IPUConfig.supported_upgrade_paths` instead.
|
||||
|
||||
## v0.20.0 <span style="font-size:0.5em; font-weight:normal">(till September 2024)</span>
|
||||
- Models
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index 303e4de5..37a91c00 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -3,6 +3,7 @@ import pytest
|
||||
from leapp.libraries.common.config import version
|
||||
from leapp.libraries.common.testutils import CurrentActorMocked
|
||||
from leapp.libraries.stdlib import api
|
||||
+from leapp.models import IPUSourceToPossibleTargets
|
||||
from leapp.utils.deprecation import suppress_deprecation
|
||||
|
||||
|
||||
@@ -92,21 +93,20 @@ def test_is_rhel_alt(monkeypatch, result, kernel, release_id, src_ver):
|
||||
assert version.is_rhel_alt() == result
|
||||
|
||||
|
||||
-@pytest.mark.parametrize('result,is_alt,src_ver,saphana', [
|
||||
- (True, True, '7.6', False),
|
||||
- (True, False, '7.8', False),
|
||||
- (False, True, '7.8', False),
|
||||
- (False, False, '7.6', False),
|
||||
- (True, True, '7.6', True),
|
||||
- (True, False, '7.7', True),
|
||||
- (False, True, '7.7', True),
|
||||
- (False, False, '7.6', True),
|
||||
+@pytest.mark.parametrize('result,src_ver,is_saphana', [
|
||||
+ (True, '7.8', False), # default rhel
|
||||
+ (False, '7.6', False),
|
||||
+ (True, '7.7', True), # saphana
|
||||
+ (False, '7.6', True),
|
||||
])
|
||||
-def test_is_supported_version(monkeypatch, result, is_alt, src_ver, saphana):
|
||||
- monkeypatch.setattr(version, 'is_rhel_alt', lambda: is_alt)
|
||||
- monkeypatch.setattr(version, 'is_sap_hana_flavour', lambda: saphana)
|
||||
- monkeypatch.setattr(version, 'SUPPORTED_VERSIONS', {'rhel': ['7.8'], 'rhel-alt': ['7.6'], 'rhel-saphana': ['7.7']})
|
||||
- monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(src_ver=src_ver))
|
||||
+def test_is_supported_version(monkeypatch, result, src_ver, is_saphana):
|
||||
+ if is_saphana:
|
||||
+ supported_upgrade_paths = [IPUSourceToPossibleTargets(source_version='7.7', target_versions=['8.10'])]
|
||||
+ else:
|
||||
+ supported_upgrade_paths = [IPUSourceToPossibleTargets(source_version='7.8', target_versions=['8.10'])]
|
||||
+
|
||||
+ actor_mock = CurrentActorMocked(src_ver=src_ver, supported_upgrade_paths=supported_upgrade_paths)
|
||||
+ monkeypatch.setattr(api, 'current_actor', actor_mock)
|
||||
assert version.is_supported_version() == result
|
||||
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index febeed36..b8fc550b 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -126,6 +126,12 @@ class _SupportedVersionsDict(dict):
|
||||
|
||||
|
||||
SUPPORTED_VERSIONS = _SupportedVersionsDict()
|
||||
+"""
|
||||
+Deprecated since 2025-03-31.
|
||||
+
|
||||
+Use is_supported_version(), or IPUConfig.supported_upgrade_paths to check what source
|
||||
+versions are supported for the current (release, flavour).
|
||||
+"""
|
||||
|
||||
|
||||
def _version_to_tuple(version):
|
||||
@@ -319,13 +325,14 @@ def is_supported_version():
|
||||
:return: `True` if the current version is supported and `False` otherwise.
|
||||
:rtype: bool
|
||||
"""
|
||||
- release_id, version_id = current_version()
|
||||
- if is_rhel_alt():
|
||||
- release_id = 'rhel-alt'
|
||||
- elif is_sap_hana_flavour():
|
||||
- release_id = 'rhel-saphana'
|
||||
+ source_version = get_source_version()
|
||||
+ supported_upgrade_paths = api.current_actor().configuration.supported_upgrade_paths
|
||||
|
||||
- if not matches_release(SUPPORTED_VERSIONS, release_id):
|
||||
- return False
|
||||
+ # Check if there are any paths defined from the current source_version. If not,
|
||||
+ # the upgrade version is unsupported
|
||||
+ for ipu_source_to_targets in supported_upgrade_paths:
|
||||
+ # No need to use matches_version - our version list is always a singleton
|
||||
+ if ipu_source_to_targets.source_version == source_version:
|
||||
+ return True
|
||||
|
||||
- return matches_version(SUPPORTED_VERSIONS[release_id], version_id)
|
||||
+ return False
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,322 +0,0 @@
|
||||
From e330fef6ef748dd1ae1ca1f4ec2a4142818d1e43 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Fratrik <tomasfratrik8@gmail.com>
|
||||
Date: Mon, 14 Apr 2025 14:40:19 +0200
|
||||
Subject: [PATCH 19/37] Remove 7to8 CI tests
|
||||
|
||||
Removing 7to8 CI tests because the upgrade path from RHEL-7 to RHEL-8 is no longer supported.
|
||||
|
||||
Jira: RHELMISC-11004
|
||||
---
|
||||
.github/workflows/reuse-copr-build.yml | 4 +-
|
||||
.github/workflows/tmt-tests.yml | 59 ----------
|
||||
.github/workflows/unit-tests.yml | 17 ---
|
||||
.packit.yaml | 152 -------------------------
|
||||
4 files changed, 2 insertions(+), 230 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/reuse-copr-build.yml b/.github/workflows/reuse-copr-build.yml
|
||||
index c6702e1a..a772fb64 100644
|
||||
--- a/.github/workflows/reuse-copr-build.yml
|
||||
+++ b/.github/workflows/reuse-copr-build.yml
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
id: copr_build
|
||||
env:
|
||||
COPR_CONFIG: "copr_fedora.conf"
|
||||
- COPR_CHROOT: "epel-7-x86_64,epel-8-x86_64"
|
||||
+ COPR_CHROOT: "epel-8-x86_64"
|
||||
COPR_REPO: "@oamg/leapp"
|
||||
run: |
|
||||
cat << EOF > $COPR_CONFIG
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
||||
env:
|
||||
COPR_CONFIG: "copr_fedora.conf"
|
||||
- COPR_CHROOT: "epel-7-x86_64,epel-8-x86_64"
|
||||
+ COPR_CHROOT: "epel-8-x86_64"
|
||||
COPR_REPO: "@oamg/leapp"
|
||||
run: |
|
||||
cat << EOF > $COPR_CONFIG
|
||||
diff --git a/.github/workflows/tmt-tests.yml b/.github/workflows/tmt-tests.yml
|
||||
index 1fa00e60..c9f76ef7 100644
|
||||
--- a/.github/workflows/tmt-tests.yml
|
||||
+++ b/.github/workflows/tmt-tests.yml
|
||||
@@ -10,65 +10,6 @@ jobs:
|
||||
uses: ./.github/workflows/reuse-copr-build.yml
|
||||
secrets: inherit
|
||||
|
||||
- call_workflow_tests_79to88_integration:
|
||||
- needs: call_workflow_copr_build
|
||||
- uses: oamg/leapp/.github/workflows/reuse-tests-7to8.yml@main
|
||||
- secrets: inherit
|
||||
- with:
|
||||
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
||||
- tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*8to9)(?!.*max_sst)"
|
||||
- pull_request_status_name: "7.9to8.8"
|
||||
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.8;LEAPPDATA_BRANCH=upstream'
|
||||
- if: |
|
||||
- github.event.issue.pull_request
|
||||
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
||||
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
||||
-
|
||||
- call_workflow_tests_79to86_integration:
|
||||
- needs: call_workflow_copr_build
|
||||
- uses: oamg/leapp/.github/workflows/reuse-tests-7to8.yml@main
|
||||
- secrets: inherit
|
||||
- with:
|
||||
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
||||
- tmt_plan_regex: "^(?!.*max_sst)(.*tier1)"
|
||||
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.6;LEAPPDATA_BRANCH=upstream'
|
||||
- pull_request_status_name: "7.9to8.6"
|
||||
- if: |
|
||||
- github.event.issue.pull_request
|
||||
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
||||
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
||||
-
|
||||
- call_workflow_tests_79to88_sst:
|
||||
- needs: call_workflow_copr_build
|
||||
- uses: oamg/leapp/.github/workflows/reuse-tests-7to8.yml@main
|
||||
- secrets: inherit
|
||||
- with:
|
||||
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
||||
- tmt_plan_regex: "^(?!.*tier[2-3].*)(.*max_sst.*)"
|
||||
- pull_request_status_name: "7.9to8.8-sst"
|
||||
- update_pull_request_status: 'false'
|
||||
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.8;LEAPPDATA_BRANCH=upstream'
|
||||
- if: |
|
||||
- github.event.issue.pull_request
|
||||
- && startsWith(github.event.comment.body, '/rerun-sst')
|
||||
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
||||
-
|
||||
- call_workflow_tests_7to8_aws:
|
||||
- needs: call_workflow_copr_build
|
||||
- uses: oamg/leapp/.github/workflows/reuse-tests-7to8.yml@main
|
||||
- secrets: inherit
|
||||
- with:
|
||||
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
||||
- tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*8to9)(.*e2e)"
|
||||
- compose: "RHEL-7.9-rhui"
|
||||
- environment_settings: '{"provisioning": {"post_install_script": "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; echo 42; yum-config-manager --enable rhel-7-server-rhui-optional-rpms"}}'
|
||||
- pull_request_status_name: "7to8-aws-e2e"
|
||||
- variables: "SOURCE_RELEASE=7.9;TARGET_RELEASE=8.6;RHUI=aws;LEAPPDATA_BRANCH=upstream"
|
||||
- if: |
|
||||
- github.event.issue.pull_request
|
||||
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
||||
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
||||
-
|
||||
call_workflow_tests_86to90_integration:
|
||||
needs: call_workflow_copr_build
|
||||
uses: oamg/leapp/.github/workflows/reuse-tests-8to9.yml@main
|
||||
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
|
||||
index 42b72b8d..37748396 100644
|
||||
--- a/.github/workflows/unit-tests.yml
|
||||
+++ b/.github/workflows/unit-tests.yml
|
||||
@@ -49,23 +49,6 @@ jobs:
|
||||
python: python3.6
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi8-lint
|
||||
- # 7to8
|
||||
- - name: Run unit tests for el7toel8 and common repositories on python 3.6
|
||||
- python: python3.6
|
||||
- repos: 'el7toel8,common'
|
||||
- container: ubi8
|
||||
- - name: Run python linters for el7toel8 and common repositories on python 3.6
|
||||
- python: python3.6
|
||||
- repos: 'el7toel8,common'
|
||||
- container: ubi8-lint
|
||||
- - name: Run unit tests for el7toel8 and common repositories on python 2.7
|
||||
- python: python2.7
|
||||
- repos: 'el7toel8,common'
|
||||
- container: ubi7
|
||||
- - name: Run python linters for el7toel8 and common repositories on python 2.7
|
||||
- python: python2.7
|
||||
- repos: 'el7toel8,common'
|
||||
- container: ubi7-lint
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
diff --git a/.packit.yaml b/.packit.yaml
|
||||
index dd17303a..75788a25 100644
|
||||
--- a/.packit.yaml
|
||||
+++ b/.packit.yaml
|
||||
@@ -32,7 +32,6 @@ jobs:
|
||||
owner: "@oamg"
|
||||
project: leapp
|
||||
targets:
|
||||
- - epel-7-x86_64
|
||||
- epel-8-x86_64
|
||||
- epel-9-x86_64
|
||||
actions:
|
||||
@@ -53,7 +52,6 @@ jobs:
|
||||
owner: "@oamg"
|
||||
project: leapp
|
||||
targets:
|
||||
- - epel-7-x86_64
|
||||
- epel-8-x86_64
|
||||
- epel-9-x86_64
|
||||
actions:
|
||||
@@ -73,7 +71,6 @@ jobs:
|
||||
owner: "@oamg"
|
||||
project: leapp
|
||||
targets:
|
||||
- - epel-7-x86_64
|
||||
- epel-8-x86_64
|
||||
- epel-9-x86_64
|
||||
actions:
|
||||
@@ -95,155 +92,6 @@ jobs:
|
||||
# >7tox path https://gitlab.cee.redhat.com/oamg/leapp-tests/-/blob/main/config.yaml
|
||||
# Available only to RH Employees.
|
||||
|
||||
-# ###################################################################### #
|
||||
-# ############################### 7 TO 8 ############################### #
|
||||
-# ###################################################################### #
|
||||
-
|
||||
-# ###################################################################### #
|
||||
-# ### Abstract job definitions to make individual tests/jobs smaller ### #
|
||||
-# ###################################################################### #
|
||||
-- &sanity-abstract-7to8
|
||||
- job: tests
|
||||
- trigger: ignore
|
||||
- fmf_url: "https://gitlab.cee.redhat.com/oamg/leapp-tests"
|
||||
- fmf_ref: "rhel7"
|
||||
- use_internal_tf: True
|
||||
- labels:
|
||||
- - sanity
|
||||
- targets:
|
||||
- epel-7-x86_64:
|
||||
- distros: [RHEL-7.9-ZStream]
|
||||
- identifier: sanity-abstract-7to8
|
||||
- tmt_plan: ""
|
||||
-
|
||||
-- &sanity-abstract-7to8-aws
|
||||
- <<: *sanity-abstract-7to8
|
||||
- labels:
|
||||
- - sanity
|
||||
- - aws
|
||||
- targets:
|
||||
- epel-7-x86_64:
|
||||
- distros: [RHEL-7.9-rhui]
|
||||
- identifier: sanity-abstract-7to8-aws
|
||||
-
|
||||
-# On-demand minimal beaker tests
|
||||
-- &beaker-minimal-7to8-abstract-ondemand
|
||||
- <<: *sanity-abstract-7to8
|
||||
- manual_trigger: True
|
||||
- labels:
|
||||
- - beaker-minimal
|
||||
- identifier: beaker-minimal-7to8-abstract-ondemand
|
||||
-
|
||||
-# On-demand kernel-rt tests
|
||||
-- &kernel-rt-abstract-7to8-ondemand
|
||||
- <<: *beaker-minimal-7to8-abstract-ondemand
|
||||
- labels:
|
||||
- - kernel-rt
|
||||
- identifier: sanity-7to8-kernel-rt-abstract-ondemand
|
||||
-
|
||||
-# ###################################################################### #
|
||||
-# ######################### Individual tests ########################### #
|
||||
-# ###################################################################### #
|
||||
-
|
||||
-# Tests: 7.9 -> 8.10
|
||||
-- &sanity-79to810
|
||||
- <<: *sanity-abstract-7to8
|
||||
- trigger: pull_request
|
||||
- identifier: sanity-7.9to8.10
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:7to8 & tag:sanity & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-7.9"
|
||||
- distro_target: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.10"
|
||||
-
|
||||
-- &sanity-79to810-aws
|
||||
- <<: *sanity-abstract-7to8-aws
|
||||
- trigger: pull_request
|
||||
- identifier: sanity-7.9to8.10-aws
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:7to8 & tag:upgrade_happy_path & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-7.9"
|
||||
- distro_target: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.10"
|
||||
- RHUI: "aws"
|
||||
- LEAPPDATA_BRANCH: "upstream"
|
||||
- LEAPP_NO_RHSM: "1"
|
||||
- USE_CUSTOM_REPOS: rhui
|
||||
-
|
||||
-- &beaker-minimal-79to810
|
||||
- <<: *beaker-minimal-7to8-abstract-ondemand
|
||||
- trigger: pull_request
|
||||
- labels:
|
||||
- - beaker-minimal
|
||||
- - beaker-minimal-7.9to8.10
|
||||
- - 7.9to8.10
|
||||
- identifier: sanity-7.9to8.10-beaker-minimal-ondemand
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:7to8 & tag:partitioning & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-7.9"
|
||||
- distro_target: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.10"
|
||||
-
|
||||
-- &kernel-rt-79to810
|
||||
- <<: *kernel-rt-abstract-7to8-ondemand
|
||||
- trigger: pull_request
|
||||
- labels:
|
||||
- - kernel-rt
|
||||
- - kernel-rt-7.9to8.10
|
||||
- - 7.9to8.10
|
||||
- identifier: sanity-7.9to8.10-kernel-rt-ondemand
|
||||
- tf_extra_params:
|
||||
- test:
|
||||
- tmt:
|
||||
- plan_filter: 'tag:7to8 & tag:kernel-rt & enabled:true'
|
||||
- environments:
|
||||
- - tmt:
|
||||
- context:
|
||||
- distro: "rhel-7.9"
|
||||
- distro_target: "rhel-8.10"
|
||||
- settings:
|
||||
- provisioning:
|
||||
- tags:
|
||||
- BusinessUnit: sst_upgrades@leapp_upstream_test
|
||||
- env:
|
||||
- SOURCE_RELEASE: "7.9"
|
||||
- TARGET_RELEASE: "8.10"
|
||||
-
|
||||
-
|
||||
# ###################################################################### #
|
||||
# ############################## 8 TO 9 ################################ #
|
||||
# ###################################################################### #
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,45 +0,0 @@
|
||||
From 9dd50a2fc3f30d3f5a00998ed9fc96d34129426d Mon Sep 17 00:00:00 2001
|
||||
From: karolinku <kkula@redhat.com>
|
||||
Date: Fri, 25 Apr 2025 14:23:20 +0200
|
||||
Subject: [PATCH 20/37] Fix lint in Makefile for docs
|
||||
|
||||
isort is failing when getting empty list of arguments, what takes
|
||||
place when only doc files was modified in a commit. This fix handles
|
||||
that issue.
|
||||
|
||||
JIRA: RHELMISC-11679
|
||||
---
|
||||
Makefile | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 3e090159..ceb013ab 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -356,16 +356,17 @@ lint:
|
||||
echo "--- Linting done. ---"; \
|
||||
fi
|
||||
|
||||
- if [[ "`git rev-parse --abbrev-ref HEAD`" != "$(MASTER_BRANCH)" ]] && [[ -n "`git diff $(MASTER_BRANCH) --name-only --diff-filter AMR`" ]]; then \
|
||||
+ if [[ "`git rev-parse --abbrev-ref HEAD`" != "$(MASTER_BRANCH)" ]]; then \
|
||||
. $(VENVNAME)/bin/activate; \
|
||||
- git diff $(MASTER_BRANCH) --name-only --diff-filter AMR | grep -v "^docs/" | xargs isort -c --diff || \
|
||||
- { \
|
||||
+ files_to_sort=`git diff main --name-only --diff-filter AMR | grep -v "^docs/"`; \
|
||||
+ if [ -n "$$files_to_sort" ]; then \
|
||||
+ echo "$$files_to_sort" | xargs isort -c --diff || { \
|
||||
echo; \
|
||||
- echo "------------------------------------------------------------------------------"; \
|
||||
- echo "Hint: Apply the required changes."; \
|
||||
+ echo "Hint: Apply the required changes.";\
|
||||
echo " Execute the following command to apply them automatically: make lint_fix"; \
|
||||
exit 1; \
|
||||
- } && echo "--- isort check done. ---"; \
|
||||
+ } && echo "--- isort check done. ---"; \
|
||||
+ fi \
|
||||
fi
|
||||
|
||||
lint_fix:
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 47f37314e26fe0e899b8fdd2fe280f2f8ebf15b5 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Fratrik <tomasfratrik8@gmail.com>
|
||||
Date: Mon, 28 Apr 2025 14:32:54 +0200
|
||||
Subject: [PATCH 21/37] Improve report of removed kernel drivers
|
||||
|
||||
* Insert target RHEL version in report KCS titles for removed kernel drivers.
|
||||
|
||||
Jira: RHEL-49402
|
||||
---
|
||||
.../libraries/checkdddd.py | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py b/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
index defe3f9a..1f01adde 100644
|
||||
--- a/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
+++ b/repos/system_upgrade/common/actors/checkdetecteddevicesanddrivers/libraries/checkdddd.py
|
||||
@@ -37,13 +37,17 @@ def create_inhibitors(inhibiting_entries):
|
||||
),
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/solutions/6971716',
|
||||
- title='Leapp preupgrade getting "Inhibitor: Detected loaded kernel drivers which have been '
|
||||
- 'removed in RHEL 8. Upgrade cannot proceed." '
|
||||
+ title=('Leapp preupgrade getting "Inhibitor: Detected loaded kernel drivers which have been '
|
||||
+ 'removed in RHEL {target}. Upgrade cannot proceed."').format(target=get_target_major_version())
|
||||
),
|
||||
reporting.ExternalLink(
|
||||
url='https://access.redhat.com/solutions/5436131',
|
||||
- title='Leapp upgrade fail with error "Inhibitor: Detected loaded kernel drivers which '
|
||||
- 'have been removed in RHEL 8. Upgrade cannot proceed."'
|
||||
+ title=(
|
||||
+ 'Leapp upgrade fail with error "Inhibitor: Detected loaded kernel drivers which '
|
||||
+ 'have been removed in RHEL {target}. Upgrade cannot proceed."'
|
||||
+ ).format(
|
||||
+ target=get_target_major_version()
|
||||
+ )
|
||||
),
|
||||
reporting.Audience('sysadmin'),
|
||||
reporting.Groups([reporting.Groups.KERNEL, reporting.Groups.DRIVERS]),
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,151 +0,0 @@
|
||||
From daaf3cea58f4065e9e938c0c76ecd5d302ec7969 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Fratrik <tomasfratrik8@gmail.com>
|
||||
Date: Mon, 28 Apr 2025 14:19:01 +0200
|
||||
Subject: [PATCH 22/37] Improve report of unsupported network configuration
|
||||
|
||||
* Remove KCS from summary since it is present in the related links.
|
||||
* Generalize KCS title when using Kernel-Assigned NIC Names.
|
||||
* Show KCS about unsupported network configuration device types only when IPU 8 -> 9.
|
||||
* Adjust unit tests to reflect this change.
|
||||
|
||||
Jira: RHEL-77175
|
||||
---
|
||||
.../actors/persistentnetnamesdisable/actor.py | 24 ++++++----
|
||||
.../tests/test_persistentnetnamesdisable.py | 46 +++++++++++++++++--
|
||||
2 files changed, 56 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
index 1f7f1413..1add3588 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/actor.py
|
||||
@@ -2,6 +2,7 @@ import re
|
||||
|
||||
from leapp import reporting
|
||||
from leapp.actors import Actor
|
||||
+from leapp.libraries.common.config.version import get_target_major_version
|
||||
from leapp.models import KernelCmdlineArg, PersistentNetNamesFacts
|
||||
from leapp.reporting import create_report, Report
|
||||
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
@@ -39,26 +40,31 @@ class PersistentNetNamesDisable(Actor):
|
||||
if self.single_eth0(interfaces):
|
||||
self.disable_persistent_naming()
|
||||
elif len(interfaces) > 1 and self.ethX_count(interfaces) > 0:
|
||||
- create_report([
|
||||
+ report_entries = [
|
||||
reporting.Title('Unsupported network configuration'),
|
||||
reporting.Summary(
|
||||
'Detected multiple physical network interfaces where one or more use kernel naming (e.g. eth0). '
|
||||
'Upgrade process can not continue because stability of names can not be guaranteed. '
|
||||
- 'Please read the article at https://access.redhat.com/solutions/4067471 for more information.'
|
||||
),
|
||||
reporting.ExternalLink(
|
||||
- title='How to perform an in-place upgrade to RHEL 8 when using kernel NIC names on RHEL 7',
|
||||
+ title='How to Perform an In-Place Upgrade when Using Kernel-Assigned NIC Names',
|
||||
url='https://access.redhat.com/solutions/4067471'
|
||||
),
|
||||
- reporting.ExternalLink(
|
||||
- title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
- '"Network configuration for unsupported device types detected"',
|
||||
- url='https://access.redhat.com/solutions/7009239'
|
||||
- ),
|
||||
reporting.Remediation(
|
||||
hint='Rename all ethX network interfaces following the attached KB solution article.'
|
||||
),
|
||||
reporting.Severity(reporting.Severity.HIGH),
|
||||
reporting.Groups([reporting.Groups.NETWORK]),
|
||||
reporting.Groups([reporting.Groups.INHIBITOR])
|
||||
- ])
|
||||
+ ]
|
||||
+
|
||||
+ if get_target_major_version() == '9':
|
||||
+ report_entries.append(
|
||||
+ reporting.ExternalLink(
|
||||
+ title='RHEL 8 to RHEL 9: inplace upgrade fails at '
|
||||
+ '"Network configuration for unsupported device types detected"',
|
||||
+ url='https://access.redhat.com/solutions/7009239'
|
||||
+ )
|
||||
+ )
|
||||
+
|
||||
+ create_report(report_entries)
|
||||
diff --git a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
index 96768da9..95b695c0 100644
|
||||
--- a/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
+++ b/repos/system_upgrade/common/actors/persistentnetnamesdisable/tests/test_persistentnetnamesdisable.py
|
||||
@@ -1,3 +1,6 @@
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.common.config import version
|
||||
from leapp.models import Interface, KernelCmdlineArg, PCIAddress, PersistentNetNamesFacts
|
||||
from leapp.reporting import Report
|
||||
from leapp.snactor.fixture import current_actor_context
|
||||
@@ -14,7 +17,11 @@ def test_actor_single_eth0(current_actor_context):
|
||||
assert not current_actor_context.consume(Report)
|
||||
|
||||
|
||||
-def test_actor_more_ethX(current_actor_context):
|
||||
+@pytest.mark.parametrize(
|
||||
+ 'target_version', ['9', '10']
|
||||
+)
|
||||
+def test_actor_more_ethX(monkeypatch, current_actor_context, target_version):
|
||||
+ monkeypatch.setattr(version, 'get_target_major_version', lambda: target_version)
|
||||
pci1 = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
pci2 = PCIAddress(domain="0000", bus="3d", function="00", device="Serial controller")
|
||||
interface = [Interface(name="eth0", mac="52:54:00:0b:4a:6d", vendor="redhat",
|
||||
@@ -25,8 +32,20 @@ def test_actor_more_ethX(current_actor_context):
|
||||
devpath="/devices/hidraw/hidraw0")]
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
- assert current_actor_context.consume(Report)
|
||||
- assert is_inhibitor(current_actor_context.consume(Report)[0].report)
|
||||
+
|
||||
+ report_fields = current_actor_context.consume(Report)[0].report
|
||||
+ assert is_inhibitor(report_fields)
|
||||
+
|
||||
+ external_links = report_fields.get('detail', {}).get('external', [])
|
||||
+
|
||||
+ rhel8to9_present = any(
|
||||
+ 'RHEL 8 to RHEL 9' in link.get('title', '') for link in external_links
|
||||
+ )
|
||||
+
|
||||
+ if target_version == '9':
|
||||
+ assert rhel8to9_present
|
||||
+ else:
|
||||
+ assert not rhel8to9_present
|
||||
|
||||
|
||||
def test_actor_single_int_not_ethX(current_actor_context):
|
||||
@@ -39,7 +58,11 @@ def test_actor_single_int_not_ethX(current_actor_context):
|
||||
assert not current_actor_context.consume(Report)
|
||||
|
||||
|
||||
-def test_actor_ethX_and_not_ethX(current_actor_context):
|
||||
+@pytest.mark.parametrize(
|
||||
+ 'target_version', ['9', '10']
|
||||
+)
|
||||
+def test_actor_ethX_and_not_ethX(monkeypatch, current_actor_context, target_version):
|
||||
+ monkeypatch.setattr(version, 'get_target_major_version', lambda: target_version)
|
||||
pci1 = PCIAddress(domain="0000", bus="3e", function="00", device="PCI bridge")
|
||||
pci2 = PCIAddress(domain="0000", bus="3d", function="00", device="Serial controller")
|
||||
interface = [Interface(name="virbr0", mac="52:54:00:0b:4a:6d", vendor="redhat",
|
||||
@@ -51,4 +74,17 @@ def test_actor_ethX_and_not_ethX(current_actor_context):
|
||||
current_actor_context.feed(PersistentNetNamesFacts(interfaces=interface))
|
||||
current_actor_context.run()
|
||||
assert current_actor_context.consume(Report)
|
||||
- assert is_inhibitor(current_actor_context.consume(Report)[0].report)
|
||||
+
|
||||
+ report_fields = current_actor_context.consume(Report)[0].report
|
||||
+ assert is_inhibitor(report_fields)
|
||||
+
|
||||
+ external_links = report_fields.get('detail', {}).get('external', [])
|
||||
+
|
||||
+ rhel8to9_present = any(
|
||||
+ 'RHEL 8 to RHEL 9' in link.get('title', '') for link in external_links
|
||||
+ )
|
||||
+
|
||||
+ if target_version == '9':
|
||||
+ assert rhel8to9_present
|
||||
+ else:
|
||||
+ assert not rhel8to9_present
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,35 +0,0 @@
|
||||
From d3793ab2546148d3fc9832e5164a2f0a7de80352 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 30 Apr 2025 13:29:40 +0200
|
||||
Subject: [PATCH 23/37] DOCS: add missing envar LEAPP_OVL_IMG_FS_EXT4
|
||||
|
||||
The LEAPP_OVL_IMG_FS_EXT4 has not been documented and it can be
|
||||
quite useful on some systems.
|
||||
---
|
||||
docs/source/configuring-ipu/envars.md | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/docs/source/configuring-ipu/envars.md b/docs/source/configuring-ipu/envars.md
|
||||
index 61a50b82..a042ba4a 100644
|
||||
--- a/docs/source/configuring-ipu/envars.md
|
||||
+++ b/docs/source/configuring-ipu/envars.md
|
||||
@@ -47,6 +47,16 @@ Set the path to the target OS ISO image that should be used for the IPU. It‘s
|
||||
#### LEAPP_TARGET_PRODUCT_CHANNEL
|
||||
The alternative to the --channel leapp option. As a parameter accepts a channel acronym. E.g. `eus` or `e4s`. For more info, see the leapp preupgrade --help. In case the beta channel is required, use the `LEAPP_DEVEL_TARGET_PRODUCT_TYPE` envar instead.
|
||||
|
||||
+#### LEAPP_OVL_IMG_FS_EXT4
|
||||
+During the execution of IPUWorkflow the process requires creation of internal
|
||||
+disk images for the correct virtualisation of the host storage and creation
|
||||
+of OverlayFS (OVL) layer. During that time these images are formatted with
|
||||
+XFS filesystem by default. However for some system setups this could be
|
||||
+problematic and could lead sometimes to issues. For these uncommon problems
|
||||
+it is possible to specify `LEAPP_OVL_IMG_FS_EXT4=1` when running leapp to
|
||||
+instruct the use of the EXT4 file system instead.
|
||||
+
|
||||
+
|
||||
### Development variables
|
||||
```{note}
|
||||
To use development variables, the LEAPP_UNSUPPORTED variable has to be set.
|
||||
--
|
||||
2.49.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,701 +0,0 @@
|
||||
From 5fe6b4df9cfde15f527b5ecf52fda4e7fec6dfe5 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Mon, 5 May 2025 13:55:35 +0200
|
||||
Subject: [PATCH 25/37] Add RHEL 10.1 and 9.7 product certificates
|
||||
|
||||
---
|
||||
.../common/files/prod-certs/10.1/279.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/362.pem | 36 +++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/363.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/419.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/433.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/479.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/486.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/10.1/72.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/279.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/362.pem | 36 +++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/363.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/419.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/433.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/479.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/486.pem | 35 ++++++++++++++++++
|
||||
.../common/files/prod-certs/9.7/72.pem | 35 ++++++++++++++++++
|
||||
16 files changed, 562 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/279.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/362.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/363.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/419.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/433.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/479.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/486.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/10.1/72.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/279.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/362.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/363.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/419.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/433.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/479.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/486.pem
|
||||
create mode 100644 repos/system_upgrade/common/files/prod-certs/9.7/72.pem
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/279.pem b/repos/system_upgrade/common/files/prod-certs/10.1/279.pem
|
||||
new file mode 100644
|
||||
index 00000000..958d5716
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files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gY6h6/s4Vk7NeccIHRz7xSQ/eiVSGk7TM/DbACjp1pl9CVX2BMn5p1GNn3W
|
||||
+oS0c9DY/pbphdlGVDrcDRmYjuAZ6fNtmy7zDqtUSJnen0A+PrcRIc5ICEoTXUE9l
|
||||
+RtxUFT2Caja3PWVumVu1kNGzjbNAvFRD9FHQt80ADpSLgEcG0HEaFUdevYN3glKb
|
||||
+7J1RXTKEhhnBBCI9qfrl4SIz3VvLrxW4AeJ87h/7FPJZFAJrkKQmQPeyadA=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/362.pem b/repos/system_upgrade/common/files/prod-certs/10.1/362.pem
|
||||
new file mode 100644
|
||||
index 00000000..6382f50a
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/362.pem
|
||||
@@ -0,0 +1,36 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGNzCCBB+gAwIBAgIJALDxRLt/tU/gMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDg0NFoXDTQ1MDEy
|
||||
+OTEyNDg0NFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs0MGFlYjVl
|
||||
+ZC0yZjNiLTRiZWYtOTRjYi00YjgzMDkyZmEzY2NdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLD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||||
+qWNgEtddX3XUZ1nB8S3n8QDhk4RoQIs2e66w95vOYyNipBO93gqVeJbEK7Krxgbl
|
||||
+Xx6s08kPuwcdG8FxgqPC8jote7eVEHmrMnlhOyNz9WRYULyz6IlfQ6gQe7SmeSrC
|
||||
+lsla8bykzN2/7MnDPqjByF0zbdtdoZ9U5JXlqJn2UuTIe+Z65jDqSwBv8bQF+F8g
|
||||
+EiZtesy4n7sxXpINSFBkh24ohRd0ur8BXCoOLpzS96YkyHvXXdqaJcCoSJ6abqe0
|
||||
+Q7IFWYfUIU7GCwtSL4M9ODjc8Cr5YUJgnsnlC1qYekOB1pGfROMC/9qEAU2TsOYp
|
||||
+8yOZN+NmrsmSnaBLHEN9lhwpt+2It5Dm9B/SAW64fil/oVyHUj3qfIDXSzbD+l0q
|
||||
+LQ6l66epVP/b3UU1R7+JzDDLUDm2bBWFr205L4CKkcpaReK+mXM3eTuMtiHWnLkY
|
||||
+MQ6jgDAM+5GGGHqq/iJmBWM+Trp5HfyI3XEVWsXDBJ2zEDAAEwByWwhwGFI58SFy
|
||||
+Zv3x3vpv56b7MW5fALXYFKkHzwjVw9YVXnhJmXO09GN7auPVYsFEPl3QUS/OiXPL
|
||||
+suQmwYd7aS8Bua3kgAfg204O6OppflhkExzroRvvr7FT/9LftaaBI+HLDnvOdd2n
|
||||
+y+Nqehto96G/A6A=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/363.pem b/repos/system_upgrade/common/files/prod-certs/10.1/363.pem
|
||||
new file mode 100644
|
||||
index 00000000..2b7eeb6d
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/363.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGKTCCBBGgAwIBAgIJALDxRLt/tU/fMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydG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JAXZD5QIFlcGeXMxiS
|
||||
+zIhD+K2P9GM4Z4n1CoYZceTwIaCDogRGo/2gO20dB0AZW2tPjvr/RpfI7zpR
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/419.pem b/repos/system_upgrade/common/files/prod-certs/10.1/419.pem
|
||||
new file mode 100644
|
||||
index 00000000..906b58e2
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/419.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGGjCCBAKgAwIBAgIJALDxRLt/tU/yMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDkwM1oXDTQ1MDEy
|
||||
+OTEyNDkwM1owRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs4ZDMyOWZh
|
||||
+MS0wYTgyLTRlMTktYmUxMy1mYzFiNWUxNDVhYzhdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN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E5aEYdrdqXVj+NHpLBbVpE
|
||||
+KDlHJ41LdPu7HKXcqw/sqTyYuZJHqi5AZ2eLbBB6+0FRfgZC4B29LFokTlAoDTCM
|
||||
+C0q7e2NwITdDDULLJq37DZlZiHBdDRrwyBNM5O4P5Ufyy6y5djN/93P/OxNhXMum
|
||||
+n2J/yAQNvmzONEgz4g8Rfl+EIdNRaXMYdEHzQ4Rn0ba6f68hAilqVUgIdUdiLFG9
|
||||
+ni0ISWWPQefkMRAWpOZymD0cumQUI2s+2nkzwVzTsmrQPAyFwHpIn+yfbUUDNBUR
|
||||
+osnW+tTG51K7b2RVTkh6/ecXTGgaxHlltg6FILj/sS7umphD2CEmDSAK0eqLvUaE
|
||||
+SqjtntlkgwbEGdHSvoMBVdl232yXCvxTX612VauD3e3HGr01Z2/lXqDq/5lZfZe9
|
||||
+5YO65vQQLn1D8bNvKJ5hhI9m0qc4vYVbvwNqztLh
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/433.pem b/repos/system_upgrade/common/files/prod-certs/10.1/433.pem
|
||||
new file mode 100644
|
||||
index 00000000..b834a5f4
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/433.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGLDCCBBSgAwIBAgIJALDxRLt/tU/hMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDg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BgwrBgEE
|
||||
+AZIICQGDMQIECwwJMTAuMSBCZXRhMBcGDCsGAQQBkggJAYMxAwQHDAVzMzkweDAs
|
||||
+BgwrBgEEAZIICQGDMQQEHAwacmhlbC0xMCxyaGVsLTEwLWJldGEtczM5MHgwDQYJ
|
||||
+KoZIhvcNAQELBQADggIBACwo67Ht6qWmhyumMwWHpdlU7yzLc/s4oGTixAYsNEjf
|
||||
++wtcCNtoO89crtwd6upsrK0V/qaDRpqugk40QyoGwDKGN7J9GLqrSBDTtMwKv5vY
|
||||
+gE0GNiK/AUmE65uT6qAHq35OCAsNphGHyvOhDSEnLdAeU0VAMAOxi3Rb2KxmquE9
|
||||
+mpjledsrBHUTHxUYobHKKEVSRS3JmVTIxcuLEKnIS69k4jq3hnbbd7y9jyadZQWB
|
||||
+3ASqCnrm+1jKg4U8sYdF1yRdkh9TTU1XS+7z5MZ3tB6Fdzd67SJCkvH2XQGLdx/8
|
||||
+4AL7Dm09uJrYWBunjs3DRKSIJ7As+l8iE99C4yfgR1rqogQmss57+24uI0UTC3O2
|
||||
+4q1G+MfPXqF3N4NUuQmuO/M2ATfCXAfM3T6pkdS4g4XhWrpn5Pm5LvLhjU3/3/GM
|
||||
+I8fANCW84MZmadnPjx77MJphF/mJzvwbkp8sCNUYy5Lbk/vleWOClGG/sgqrUlBj
|
||||
+k8lI2ngkuIV3+tk0wfIZDOGIt67r3HZ9hP17jhmOR5olSaB36EB1q6OHktEO19uX
|
||||
+xSRKHqgNMP7KQT/YmxKJb4lz49yQEj8XUiEt+K0r18OmA4QDJrl4jQ37yerlZLQj
|
||||
+tKniBp5H/p7UN1dO5bKQ5Dp0p4YjXpqp6/K4kpJs6eVZh0Ikp3KcSO5afv604/aF
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/479.pem b/repos/system_upgrade/common/files/prod-certs/10.1/479.pem
|
||||
new file mode 100644
|
||||
index 00000000..23ff46a9
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/479.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGGDCCBACgAwIBAgIJALDxRLt/tU/1MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDkwM1oXDTQ1MDEy
|
||||
+OTEyNDkwM1owRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFszMWE2MzI1
|
||||
+Zi1mOTE3LTQzNjgtOGM2MC05ODYwMDgyNWQzOThdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvr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mD8XGFJiEnWll
|
||||
+tyvjvio2PjhqwayEOR1dOzsdgDko5fAnfdxA/pPCYB9uyXxE/pjE5sH6m2qIhCSw
|
||||
+UcDIgpWpHnBPjw2sstnSRIdOkN4lb086vorvHph3YuEMa00SIWR2QAOY3cAYeqn0
|
||||
+7RHCUVVdHHo5BlQjU4Fzpsxft8lmdzVsvMDI2fuT4at9UEe0ViTPKIBohVIgp5hz
|
||||
+WQpi9eB/4PJNIWup9hrcVQxNWiid/Zk9IKpSyw==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/486.pem b/repos/system_upgrade/common/files/prod-certs/10.1/486.pem
|
||||
new file mode 100644
|
||||
index 00000000..c66eae07
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/486.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJzCCBA+gAwIBAgIJALDxRLt/tU/iMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDg0NFoXDTQ1MDEy
|
||||
+OTEyNDg0NFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFthYThkMTI0
|
||||
+NS1kODY4LTQwYzYtODg4MS02OWM3MGIyZGI0NmFdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|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+bdKYcS6WrZ2UGgJ1bQ0xHZf7Fh6FYd8wOH9zs0rtfUYuRQwbUlCmipVhhf5EY2FW
|
||||
+vMTRj8DW1RdOQv7cEo9w4QWFSFQnsTvhR6DZuS8/WK4Z+8i8TV5KoQy6z4nVPdVu
|
||||
+NiclCJNkjGZgYMqWA3yfmrhh1kxTCnvRdRro+tbTEkdC9oLKrGCrACucjHhAyuK5
|
||||
+2xfr0q7rmHvxia2oc/9HjB3HV/xai1b/DiWuOb4mjLj/3SS7Ua07a14TZIlEDUrM
|
||||
+YEzZBFIha+241FVdF434jFr4mAYSbm6yhNahSsPswV2O3vDMGz5tNOc1caWmQXkT
|
||||
+UC/EXzfyrmy6fBQN32lacDr0OOD9LdVz28IT90brVIAVkFyRtGLLGwId/aDxoJJe
|
||||
+M+TLHMGf+LfvP/jiwbpZxa6yfXDp6J0rHofNYLCYkeSa6TH55qYDWbi7DosCjpWj
|
||||
+NnqN8aiDKf3f0OO0tRo1zcGCEMnfG3UzDjp37CWyVYZ/TUq8/ygJrcIxjXg0K1SH
|
||||
+v01NOwphvkXlsNvjapGIgZTuo3/nASIjC92WP14MjdWv/nKhRkJ4ZMJtKSc6FgLC
|
||||
+SXF8MHwPmaIyne4k3+tJ0AlmQenPqBs6GCB5xBd01wxhRTf7qxIF/+yr6A==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/10.1/72.pem b/repos/system_upgrade/common/files/prod-certs/10.1/72.pem
|
||||
new file mode 100644
|
||||
index 00000000..fa452aa5
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/10.1/72.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGGTCCBAGgAwIBAgIJALDxRLt/tU/0MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDV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
|
||||
+rifVE8bFrfYMm83IIR9pNy+wKjArX6S1OIW8A+A=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/279.pem b/repos/system_upgrade/common/files/prod-certs/9.7/279.pem
|
||||
new file mode 100644
|
||||
index 00000000..d03c3bb3
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/279.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJTCCBA2gAwIBAgIJALDxRLt/tU/KMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDc1NVoXDTQ1MDEy
|
||||
+OTEyNDc1NVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFtkMjU0NzVk
|
||||
+Ni1kZTI1LTQ1ZWItYjQwOC1kNzQ2ZDJiYjE2NjddMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||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n6iYebK9yfM/mkaqXmjTFTmIcblcnC7He0lWCnlPvCDr8T3qXM2xJX42/Dk
|
||||
+PRDY+/E84LrvURx8hbFUgj4YXEPnk/O7nJf3tTHp3l05GAB52gDycQ/AnvhOcwf7
|
||||
+KHjUnTqvSnMbgtlbg4rhutn3Ag/vuVEwd+gTMT6pF2lE8eA4ILttcCH6wHrv4Rs1
|
||||
+dyDkRPxVFPoYCJ8NMU/dRdhZoyfOKYVYGXD80ynjWH+lV4O+wVgRj+cMXzs2Y78l
|
||||
+4WnBcBlTGFk6ZWuFgurZWelhSUXK/hkhxDIX1eMh3HZoUwu8fP6H3q0r2qsCCRhV
|
||||
+g6yzu4uzd5sgNVaOS99573Hvcga+3tZJZbX49xb2lgVlnbyNzINEQxrPqVXi9CsZ
|
||||
+r5vbXJg9DCJ1SVRxTSjUDcjkQ1TmAWzOt0QUN8iJYLyRpy/Y+NEPRZk=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/362.pem b/repos/system_upgrade/common/files/prod-certs/9.7/362.pem
|
||||
new file mode 100644
|
||||
index 00000000..41c163cf
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/362.pem
|
||||
@@ -0,0 +1,36 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGNDCCBBygAwIBAgIJALDxRLt/tU+0MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDczNFoXDTQ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+GgYMKwYBBAGSCAkBgmoCBAoMCDkuNyBCZXRhMBkGDCsGAQQBkggJAYJqAwQJDAdw
|
||||
+cGM2NGxlMCwGDCsGAQQBkggJAYJqBAQcDBpyaGVsLTkscmhlbC05LWJldGEtcHBj
|
||||
+NjRsZTANBgkqhkiG9w0BAQsFAAOCAgEARIGB5FE60xrKLHZinX4m6eqq5lAFqvus
|
||||
+HM3jS0R5qrg1QcoPuQGoZdOI3BlBDZXkuaR/K34e2+dCB+qu7LAOs5FqrUBGxL1V
|
||||
+gOVeMehWZN5mDAgEtJNE7rIKa6DlPNGqW1WXcnWqCCpduppGDaHKO6jSqlkxJxrQ
|
||||
+SadszgeVPifp7t1xq4vaFUDEGMZJlYov2uL1WQC2tuLaRJMBQv6OyZvEbC/fxYKX
|
||||
+xena2M9FccS8yr8xJ7SRN/2v3uaPBxjHDUbbGDzoeXCIVPyF0cVDeO3MblANVkcf
|
||||
+RNCu2WUkWGM78wBLVdavwp2Cal++J6kSzImuetCoPaJvRpS4mc/nRMOpcz8ly4DF
|
||||
+4HwNieBT8sJmKlcOXYLyUywvpFdLKQgnSPMEUyAqfhiPsSqy7xQOvgOQ/Cjf5Q6p
|
||||
+xVhEhvi86Puxh80kpbHM+LNFXDmcgVgnsbdBriO4mW+9hnelsa4J+7vn5q43Hsbg
|
||||
+z4LlZpS1PqcNRNa8b65FmEWsvjd74vLowL2SWe0xSbyeqvtWZR5KglOHK9ggsGBz
|
||||
+dKb5vvLTeSXCogtDgl2qkaDSXqYu3Af5/0Zwe57c5MC3k5+0jW91ZjzoTunRgHWo
|
||||
+cDgpyvABKiglu/xKlVzE3Te/Cr11zV1jBwFxsASuIWmI4VPYAtWCAxtG6XrJKfPi
|
||||
+iDaGn3oBNKU=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/363.pem b/repos/system_upgrade/common/files/prod-certs/9.7/363.pem
|
||||
new file mode 100644
|
||||
index 00000000..eb822e4d
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/363.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJjCCBA6gAwIBAgIJALDxRLt/tU+zMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDczNFoXDTQ1MDEy
|
||||
+OTEyNDczNFowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs3NTU2NjYw
|
||||
+Ny1mNzBiLTRhNjYtYmI3YS1iOWJlYzU1NTAyY2FdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
|
||||
+xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
|
||||
+QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN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+nkI8I1TK/r6q
|
||||
+JVwGEXi/I5wY0z8oYF5MeU+oE0pA06t471/bM0zTVnzVSFd0UUnVe+1nKjehPtDf
|
||||
+1EI8XCbuTK1lyEiYMMx92T39jrXRjt+mkW3OJRzSCTef8wfbyNxaBo6FTyJG5Jvm
|
||||
+EEaiVpsZs7UEx0CHdCbPJ+gb5SZ7nsmPT2GdJyfhO928dwmJzANYcI1mlDWFjjyx
|
||||
+DJYI+otDEDl3TFh6LXMjM7fPvnIoTq9vvxCgMohrgFWLiUOdcdZSdH4I
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/419.pem b/repos/system_upgrade/common/files/prod-certs/9.7/419.pem
|
||||
new file mode 100644
|
||||
index 00000000..43c22d13
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/419.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGFzCCA/+gAwIBAgIJALDxRLt/tU/JMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDc1NVoXDTQ1MDEy
|
||||
+OTEyNDc1NVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFs2NjU1MzE5
|
||||
+Zi1kYWE2LTQyZjQtYmVlYS05OGUwNWJkZDJlMjhdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33k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YB2V3w6IK5P
|
||||
+IfRGqGPksWGnPHoRgAVvAIwa0DDH9UQl/se4J3dOSLfnkRFAthMew9eLBFzCltCl
|
||||
+fZWmBsR84qfOha4m45QMwogysbIxTPBr6JqrpN0qkc87zBkx2SrtjavTf83g7lGE
|
||||
+0XmRqY8Pyr5SSdHDUmxHSxoDvx1+/Rt2b3d3+nwRrhUgXU+4Ev7P0YyS3T22jZ8g
|
||||
+GVZ330tXOhhIhFWmB5hI7eAwU8IIkxhH+TEsHHWbF4yaGveDnpgIpyGThGnsK3pB
|
||||
+M2BTeB0UiY2COFg6Mm4iODJ2GuM2mDPR0ZAhphGV/JSqZE3N9vSm1rO8tZjc8sDv
|
||||
+xIdHSVQupm5Dbbs6iO31vl+PkQ23WpHtNEVkKhhkUNS5g3rO9P3ULZeFigAWtWuw
|
||||
++IClKc/8R2ksGegS69H4wXXVh1Ie3sHEyWlkB8pgzQmvS0VCX+EhaIs6P8QCu90Z
|
||||
+NLscEhCeLT+pBDISXuf58R6W+DOyetwpFBh7Z5glcw8bmCkne5Su06/9+crfULup
|
||||
+i8/1NtQO28KMvuDdHchtZ6arn0xHSkcwW9NyRBnnjAUjDH0nOvkJVJqzubvNj8uW
|
||||
+7+Bph5JIcD945pirT4gt1WAEhLUPqdBoFfKw
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/433.pem b/repos/system_upgrade/common/files/prod-certs/9.7/433.pem
|
||||
new file mode 100644
|
||||
index 00000000..c3309765
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/433.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGKTCCBBGgAwIBAgIJALDxRLt/tU+1MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YX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o1ZdjTDdQn+xQ/W0MCYk5QKf092PKjplsAYoF87H
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/479.pem b/repos/system_upgrade/common/files/prod-certs/9.7/479.pem
|
||||
new file mode 100644
|
||||
index 00000000..e38d2e54
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/479.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGFTCCA/2gAwIBAgIJALDxRLt/tU/MMA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDc1NVoXDTQ1MDEy
|
||||
+OTEyNDc1NVowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFsxMmVmNTE1
|
||||
+ZC03OWJhLTRkZjAtYmExMC01ZjE4OGJkYWQ5NGFdMIICIjANBgkqhkiG9w0BAQEF
|
||||
+AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
|
||||
+sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
|
||||
+8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
|
||||
+RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
|
||||
+5xEOrR3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+I5FdUxIEMgw0xpXA9WyKRUzImgiMboW+Qw6DaQPIyF8eXj6AKFjs
|
||||
+dFHvi24891HjF7vNBrwLS9jMdrwoNo7+MBGN3M4Q8E6q0K+eRccpYEIt5tLqTBiU
|
||||
+LrP/RPfY7wZaiHrXNFtuHFdBMdgG9SXMAVjThBsSB22LIYeIHbtvXoF5NRF7F2x8
|
||||
+f1BuGRkTpWERDeO0iQCm1feSzhnfpmZ4uqrGKINr98SqHaRv7NyWcEAq8BZ8iMsq
|
||||
+iSmpwRnpK3Y3Z7JZaa5qOyhANvdJjhiV42QNZ9B3WESB5Y22uf643RqcquCSnKTd
|
||||
+RmXymDyyO7NNBUWdBceTdomAOEviDl0FNv5nhGs++eEJHMfKL2rFXYvRyqSwVkIm
|
||||
+Y6MmDGFEYYvHybEKh25m3wrwoZai3LGX4g==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/486.pem b/repos/system_upgrade/common/files/prod-certs/9.7/486.pem
|
||||
new file mode 100644
|
||||
index 00000000..a9c3a580
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/486.pem
|
||||
@@ -0,0 +1,35 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIGJDCCBAygAwIBAgIJALDxRLt/tU+2MA0GCSqGSIb3DQEBCwUAMIGuMQswCQYD
|
||||
+VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
|
||||
+YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
|
||||
+IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
|
||||
+ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTI1MDEyOTEyNDczNFoXDTQ1MDEy
|
||||
+OTEyNDczNFowRDFCMEAGA1UE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EAZIICQGDZgMECAwGeDg2XzY0MCsGDCsGAQQB
|
||||
+kggJAYNmBAQbDBlyaGVsLTkscmhlbC05LWJldGEteDg2XzY0MA0GCSqGSIb3DQEB
|
||||
+CwUAA4ICAQBTdLKi7NjqPmP+Sy9Bd0xQRQDNS0Tpvs4OR11rYuBRvQl04maKij4X
|
||||
+OiYWp0/PeQdkT2GMRcU4Yvs3oFtnj9jIAUmDAxT4wCrPUGgxRiwve5RJSRpXwaYt
|
||||
+eCXJVa0TkJ9CPy1h1am5r8/tD+5amftuy5ActB5R1yuiUhtao+ii12BscFBa0GxL
|
||||
+xBYD9Kp0+/bgXWY5vLQfcAdRmCGWnWD7DiH6+63o100RdMM7NKiErzC88GEtzbJJ
|
||||
+hEkBB+BkxhKP+LTiJOXQWwstd6u7E0yk9t5vyCuZmWVUdF1ZEP60+GrY7j4wB1uX
|
||||
+hQ62x2aXnTalx2mFiRJWt3enF9Si2fH+2UOwZm9iRLeblhf+C7N6bpxO/mXkPWEq
|
||||
+cInjmpRzJh8w7nqZU7HFdt0v71ZHDr+Ppu61gStbebJyUNU4R93jqXqatEfzmhTB
|
||||
+beuLeTwf5M0gYt19PHFE5ls8qsjCNbppxNTo4FmpTi8XvSSYoe/FjzoChTZWD8La
|
||||
+w5MQrKxqlScRkI2yWMoNJNfS/0mTE7e7DoEnwbbDWQVdb6Kx7bi5HVMW+PLPsX+U
|
||||
+aeDYf2i6Vlqhr8mtLcV+9HUdDP+a13OOKjIqNRMGnq4Ks+h5XbFpUa10ZTdtqbQJ
|
||||
+Xj72H08QzoBwcZfFwWDODjU5co0X7QAhQ6D6b9b1OrGtt1lXurS53w==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/repos/system_upgrade/common/files/prod-certs/9.7/72.pem b/repos/system_upgrade/common/files/prod-certs/9.7/72.pem
|
||||
new file mode 100644
|
||||
index 00000000..4c6e257c
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/prod-certs/9.7/72.pem
|
||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K28Ejv6BJcDnohXDMWNfmL85i5jvQ/BMxu7pvFiAuPsGeCZ1Yj5
|
||||
+1s3kQxKzQ/nCE/ZBDLG+B7hlRGNYPoYvfxcNjEaKbYny9jkvb8JqPgRBmowsLcxC
|
||||
+jukhm6gp+R/kkp0nQjnYsoan49ai/YTU4pY0uyDAAfM9h6owwKkO/1PWTiXCqVJK
|
||||
+Rm6ezgUGOYAUA/i4p+LLyIArOUqHwRxJ2S4=
|
||||
+-----END CERTIFICATE-----
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,178 +0,0 @@
|
||||
From 9c621a91199c093f603ef30ba3daf59010c20e47 Mon Sep 17 00:00:00 2001
|
||||
From: karolinku <kkula@redhat.com>
|
||||
Date: Thu, 10 Apr 2025 09:14:51 +0200
|
||||
Subject: [PATCH 26/37] Add handling of shorten PCI ID and lowercases
|
||||
|
||||
HW data file is inconsistent and sometimes contains both upper/lower
|
||||
cases so this patch is unifying it. Also PCI ID can be passed as full
|
||||
ID: Vendor:Device:SVendor:SDevice, but also in shorten version:
|
||||
Vendor:Device. This patch introduce handling of both cases.
|
||||
|
||||
The data comming from DDDD file was sanitised.
|
||||
|
||||
JIRA: RHEL-72544
|
||||
---
|
||||
.../deviceanddriverdeprecationdataload.py | 9 +++
|
||||
.../libraries/pcidevicesscanner.py | 19 ++++--
|
||||
.../tests/test_pcidevicesscanner.py | 64 +++++++++++++++++--
|
||||
3 files changed, 81 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/loaddevicedriverdeprecationdata/libraries/deviceanddriverdeprecationdataload.py b/repos/system_upgrade/common/actors/loaddevicedriverdeprecationdata/libraries/deviceanddriverdeprecationdataload.py
|
||||
index b12e77c9..acea583d 100644
|
||||
--- a/repos/system_upgrade/common/actors/loaddevicedriverdeprecationdata/libraries/deviceanddriverdeprecationdataload.py
|
||||
+++ b/repos/system_upgrade/common/actors/loaddevicedriverdeprecationdata/libraries/deviceanddriverdeprecationdataload.py
|
||||
@@ -25,6 +25,15 @@ def process():
|
||||
docs_url='',
|
||||
docs_title='')
|
||||
|
||||
+ # Unify all device ids to lowercase
|
||||
+ try:
|
||||
+ for entry in deprecation_data['data']:
|
||||
+ if "device_id" in entry.keys():
|
||||
+ entry["device_id"] = entry.get("device_id").lower()
|
||||
+ except (KeyError, AttributeError, TypeError):
|
||||
+ # this may happen if receiving invalid data
|
||||
+ pass
|
||||
+
|
||||
try:
|
||||
api.produce(
|
||||
DeviceDriverDeprecationData(
|
||||
diff --git a/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py b/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
index eb063abb..285a8a21 100644
|
||||
--- a/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
@@ -60,7 +60,7 @@ def parse_pci_device(textual_block, numeric_block):
|
||||
driver=device['Driver'],
|
||||
modules=device['Module'],
|
||||
numa_node=device['NUMANode'],
|
||||
- pci_id=":".join(PCI_ID_REG.findall(numeric_block))
|
||||
+ pci_id=(":".join(PCI_ID_REG.findall(numeric_block)).lower())
|
||||
)
|
||||
|
||||
|
||||
@@ -78,14 +78,19 @@ def parse_pci_devices(pci_textual, pci_numeric):
|
||||
def produce_detected_devices(devices):
|
||||
prefix_re = re.compile('0x')
|
||||
entry_lookup = {
|
||||
- prefix_re.sub('', entry.device_id): entry
|
||||
+ prefix_re.sub('', entry.device_id.lower()): entry
|
||||
for message in api.consume(DeviceDriverDeprecationData) for entry in message.entries
|
||||
}
|
||||
- api.produce(*[
|
||||
- DetectedDeviceOrDriver(**entry_lookup[device.pci_id].dump())
|
||||
- for device in devices
|
||||
- if device.pci_id in entry_lookup
|
||||
- ])
|
||||
+
|
||||
+ device_list = []
|
||||
+ for device in devices:
|
||||
+ shorten_pci_id = ":".join(device.pci_id.split(':')[:-2])
|
||||
+ if device.pci_id in entry_lookup:
|
||||
+ device_list.append(DetectedDeviceOrDriver(**entry_lookup[device.pci_id].dump()))
|
||||
+ elif shorten_pci_id in entry_lookup:
|
||||
+ device_list.append(DetectedDeviceOrDriver(**entry_lookup[shorten_pci_id].dump()))
|
||||
+
|
||||
+ api.produce(*device_list)
|
||||
|
||||
|
||||
def produce_detected_drivers(devices):
|
||||
diff --git a/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py b/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
index 4bd545ba..2bfde232 100644
|
||||
--- a/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
@@ -2,8 +2,16 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
-from leapp.libraries.actor.pcidevicesscanner import parse_pci_devices, produce_pci_devices
|
||||
-from leapp.models import PCIDevice, PCIDevices
|
||||
+from leapp.libraries.actor.pcidevicesscanner import parse_pci_devices, produce_detected_devices, produce_pci_devices
|
||||
+from leapp.libraries.common.testutils import CurrentActorMocked, produce_mocked
|
||||
+from leapp.libraries.stdlib import api
|
||||
+from leapp.models import (
|
||||
+ DetectedDeviceOrDriver,
|
||||
+ DeviceDriverDeprecationData,
|
||||
+ DeviceDriverDeprecationEntry,
|
||||
+ PCIDevice,
|
||||
+ PCIDevices
|
||||
+)
|
||||
|
||||
|
||||
def test_parse_pci_devices():
|
||||
@@ -37,9 +45,9 @@ Module: ata_generic
|
||||
'''
|
||||
devices_numeric = '''Slot: 00:00.0
|
||||
Class: Host bridge
|
||||
-Vendor: 15b45
|
||||
+Vendor: 15B45
|
||||
Device: 0724
|
||||
-SVendor: 15b46
|
||||
+SVendor: 15B46
|
||||
SDevice: 0725
|
||||
PhySlot: 3
|
||||
Rev: 02
|
||||
@@ -76,6 +84,7 @@ Module: ata_generic
|
||||
assert dev.progif == '80'
|
||||
assert dev.driver == 'ata_piix'
|
||||
assert dev.pci_id == '15b43:0722'
|
||||
+ assert dev.pci_id.islower() is True
|
||||
assert len(dev.modules) == 3
|
||||
assert 'ata_piix' in dev.modules
|
||||
assert 'pata_acpi' in dev.modules
|
||||
@@ -206,6 +215,53 @@ def test_produce_no_devices():
|
||||
assert not output[0].devices
|
||||
|
||||
|
||||
+def test_shorten_id(monkeypatch):
|
||||
+
|
||||
+ input_data = [PCIDevice(
|
||||
+ slot='b765:00:02.0',
|
||||
+ dev_cls='Ethernet controller',
|
||||
+ vendor='Mellanox Technologies',
|
||||
+ name='MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function]',
|
||||
+ subsystem_vendor='Mellanox Technologies',
|
||||
+ subsystem_name='Device 61b0',
|
||||
+ physical_slot='2',
|
||||
+ rev='',
|
||||
+ progif='',
|
||||
+ driver='mlx4_core',
|
||||
+ modules=['mlx4_core'],
|
||||
+ numa_node='0',
|
||||
+ pci_id='15b3:1004:15b3:61b0'
|
||||
+ )]
|
||||
+
|
||||
+ messages = [DeviceDriverDeprecationData(entries=[DeviceDriverDeprecationEntry(
|
||||
+ available_in_rhel=[7, 8, 9],
|
||||
+ deprecation_announced="",
|
||||
+ device_id="0x15B3:0x1004",
|
||||
+ device_name="Mellanox Technologies: MT27500 Family [ConnectX-3 Virtual Function]",
|
||||
+ device_type="pci",
|
||||
+ driver_name="mlx4_core",
|
||||
+ maintained_in_rhel=[7, 8]
|
||||
+ )])]
|
||||
+
|
||||
+ expected_output = DetectedDeviceOrDriver(
|
||||
+ available_in_rhel=[7, 8, 9],
|
||||
+ deprecation_announced="",
|
||||
+ device_id="0x15B3:0x1004",
|
||||
+ device_name="Mellanox Technologies: MT27500 Family [ConnectX-3 Virtual Function]",
|
||||
+ device_type="pci",
|
||||
+ driver_name="mlx4_core",
|
||||
+ maintained_in_rhel=[7, 8]
|
||||
+ )
|
||||
+
|
||||
+ current_actor = CurrentActorMocked(msgs=messages, src_ver='8.10', dst_ver='9.6')
|
||||
+ monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ produce_detected_devices(input_data)
|
||||
+ assert api.produce.model_instances
|
||||
+ assert expected_output == api.produce.model_instances[0]
|
||||
+
|
||||
+
|
||||
# TODO(pstodulk): update the test - drop current_actor_context and use monkeypatch
|
||||
@pytest.mark.skipif(not os.path.exists('/usr/sbin/lspci'), reason='lspci not installed on the system')
|
||||
def test_actor_execution(current_actor_context):
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,125 +0,0 @@
|
||||
From d7d37caae69e27caec73d35236bedb6e1e70bcd4 Mon Sep 17 00:00:00 2001
|
||||
From: karolinku <kkula@redhat.com>
|
||||
Date: Wed, 7 May 2025 13:35:37 +0200
|
||||
Subject: [PATCH 27/37] Prevent device list from containing incorrent content
|
||||
|
||||
Some PCI devices got from lspci output do not have to neccessarily
|
||||
provide SVendor and SDevice fields. PCI ID of such devices is
|
||||
composed in the pci_device_scanner actor just from:
|
||||
Vendor:Device
|
||||
instead of the full id:
|
||||
Vendor:Device:SVendor:SDevice
|
||||
|
||||
The recent change comparing such devices with bundled DDDD
|
||||
data drops last two fragments from the composed PCI ID,
|
||||
which led to the situation when the `shortened_pci_id`
|
||||
resulted in an empty string and it has been incorrectly
|
||||
matched with one of (consider random) drivers and possibly
|
||||
inhibited the in-place upgrade.
|
||||
|
||||
So let's ensure that we do not match any PCI device with
|
||||
any entry from DDDD undefined PCI ID.
|
||||
|
||||
JIRA: RHEL-72544
|
||||
---
|
||||
.../libraries/pcidevicesscanner.py | 1 +
|
||||
.../tests/test_pcidevicesscanner.py | 71 +++++++++++++++++++
|
||||
2 files changed, 72 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py b/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
index 285a8a21..36e4f7e0 100644
|
||||
--- a/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/pcidevicesscanner/libraries/pcidevicesscanner.py
|
||||
@@ -80,6 +80,7 @@ def produce_detected_devices(devices):
|
||||
entry_lookup = {
|
||||
prefix_re.sub('', entry.device_id.lower()): entry
|
||||
for message in api.consume(DeviceDriverDeprecationData) for entry in message.entries
|
||||
+ if entry.device_id
|
||||
}
|
||||
|
||||
device_list = []
|
||||
diff --git a/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py b/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
index 2bfde232..e8e4bb99 100644
|
||||
--- a/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
+++ b/repos/system_upgrade/common/actors/pcidevicesscanner/tests/test_pcidevicesscanner.py
|
||||
@@ -262,6 +262,77 @@ def test_shorten_id(monkeypatch):
|
||||
assert expected_output == api.produce.model_instances[0]
|
||||
|
||||
|
||||
+def test_cut_pci_id(monkeypatch):
|
||||
+
|
||||
+ input_data = [
|
||||
+ PCIDevice(
|
||||
+ slot='00:03.0',
|
||||
+ dev_cls='Ethernet controller',
|
||||
+ vendor='Intel Corporation',
|
||||
+ name='82599 Ethernet Controller Virtual Function',
|
||||
+ subsystem_vendor='',
|
||||
+ subsystem_name='',
|
||||
+ physical_slot='3',
|
||||
+ rev='01',
|
||||
+ progif='',
|
||||
+ driver='ixgbevf',
|
||||
+ modules=['ixgbevf'],
|
||||
+ numa_node='',
|
||||
+ pci_id='8086:10ed'
|
||||
+ ),
|
||||
+ PCIDevice(
|
||||
+ slot='b765:00:02.0',
|
||||
+ dev_cls='Ethernet controller',
|
||||
+ vendor='Mellanox Technologies',
|
||||
+ name='MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function]',
|
||||
+ subsystem_vendor='Mellanox Technologies',
|
||||
+ subsystem_name='Device 61b0',
|
||||
+ physical_slot='2',
|
||||
+ rev='',
|
||||
+ progif='',
|
||||
+ driver='mlx4_core',
|
||||
+ modules=['mlx4_core'],
|
||||
+ numa_node='0',
|
||||
+ pci_id='15b3:1004:15b3:61b0'
|
||||
+ )]
|
||||
+
|
||||
+ messages = [DeviceDriverDeprecationData(entries=[DeviceDriverDeprecationEntry(
|
||||
+ available_in_rhel=[7],
|
||||
+ deprecation_announced='',
|
||||
+ device_id='',
|
||||
+ device_name='',
|
||||
+ device_type='pci',
|
||||
+ driver_name='wil6210',
|
||||
+ maintained_in_rhel=[]
|
||||
+ ),
|
||||
+ DeviceDriverDeprecationEntry(
|
||||
+ available_in_rhel=[7, 8, 9],
|
||||
+ deprecation_announced="",
|
||||
+ device_id="0x15B3:0x1004",
|
||||
+ device_name="Mellanox Technologies: MT27500 Family [ConnectX-3 Virtual Function]",
|
||||
+ device_type="pci",
|
||||
+ driver_name="mlx4_core",
|
||||
+ maintained_in_rhel=[7, 8])]
|
||||
+ )]
|
||||
+
|
||||
+ expected_output = DetectedDeviceOrDriver(
|
||||
+ available_in_rhel=[7, 8, 9],
|
||||
+ deprecation_announced="",
|
||||
+ device_id="0x15B3:0x1004",
|
||||
+ device_name="Mellanox Technologies: MT27500 Family [ConnectX-3 Virtual Function]",
|
||||
+ device_type="pci",
|
||||
+ driver_name="mlx4_core",
|
||||
+ maintained_in_rhel=[7, 8]
|
||||
+ )
|
||||
+ current_actor = CurrentActorMocked(msgs=messages, src_ver='8.10', dst_ver='9.6')
|
||||
+ monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ produce_detected_devices(input_data)
|
||||
+ assert api.produce.model_instances
|
||||
+ assert expected_output == api.produce.model_instances[0]
|
||||
+
|
||||
+
|
||||
# TODO(pstodulk): update the test - drop current_actor_context and use monkeypatch
|
||||
@pytest.mark.skipif(not os.path.exists('/usr/sbin/lspci'), reason='lspci not installed on the system')
|
||||
def test_actor_execution(current_actor_context):
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,206 +0,0 @@
|
||||
From 097981dd9505d1609b91fbed4e6d28e960161926 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 14 Apr 2025 13:02:40 +0200
|
||||
Subject: [PATCH 28/37] feat(command_utils): allow missing minor/major version
|
||||
for CentOS
|
||||
|
||||
CentOS versioning consists only of the major version number. Therefore,
|
||||
in case we are running on CentOS, we do not want to enforce version to
|
||||
have the format MAJOR.MINOR. Rather, we want to check that the version
|
||||
is of the form MAJOR. This patch introduces the necessary
|
||||
infrastructure, allowing easy extensibility of version format checking
|
||||
for also other distributions. In case we do not know what version
|
||||
format should a distro use, we default to MINOR.MAJOR.
|
||||
|
||||
Jira-ref: RHEL-80334
|
||||
---
|
||||
commands/command_utils.py | 92 ++++++++++++++++++++++++++++++---------
|
||||
commands/upgrade/util.py | 4 +-
|
||||
2 files changed, 74 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/commands/command_utils.py b/commands/command_utils.py
|
||||
index a13ca59b..155bacad 100644
|
||||
--- a/commands/command_utils.py
|
||||
+++ b/commands/command_utils.py
|
||||
@@ -3,6 +3,8 @@ import json
|
||||
import os
|
||||
import re
|
||||
import resource
|
||||
+from collections import namedtuple
|
||||
+from enum import Enum
|
||||
|
||||
from leapp.actors import config as actor_config
|
||||
from leapp.exceptions import CommandError
|
||||
@@ -16,26 +18,52 @@ LEAPP_UPGRADE_FLAVOUR_DEFAULT = 'default'
|
||||
LEAPP_UPGRADE_FLAVOUR_SAP_HANA = 'saphana'
|
||||
LEAPP_UPGRADE_PATHS = 'upgrade_paths.json'
|
||||
|
||||
-VERSION_REGEX = re.compile(r"^([1-9]\d*)\.(\d+)$")
|
||||
|
||||
+_VersionFormat = namedtuple('VersionFormat', ('human_readable', 'regex'))
|
||||
|
||||
-def check_version(version):
|
||||
+
|
||||
+class VersionFormats(Enum):
|
||||
+ MAJOR_ONLY = _VersionFormat('MAJOR_VER', re.compile(r'^[1-9]\d*$'))
|
||||
+ MAJOR_MINOR = _VersionFormat('MAJOR_VER.MINOR_VER', re.compile(r"^([1-9]\d*)\.(\d+)$"))
|
||||
+
|
||||
+
|
||||
+class _VersionKind(str, Enum):
|
||||
+ """ Enum encoding information whether the given OS version is source or target. """
|
||||
+ SOURCE = 'source'
|
||||
+ TARGET = 'target'
|
||||
+
|
||||
+
|
||||
+class DistroIDs(str, Enum):
|
||||
+ RHEL = 'rhel'
|
||||
+ CENTOS = 'centos'
|
||||
+
|
||||
+
|
||||
+_DISTRO_VERSION_FORMATS = {
|
||||
+ DistroIDs.RHEL: VersionFormats.MAJOR_MINOR,
|
||||
+ DistroIDs.CENTOS: VersionFormats.MAJOR_ONLY,
|
||||
+}
|
||||
+"""
|
||||
+Maps distro ID to the expected OS version format.
|
||||
+
|
||||
+If a distro is not listed in the dictionary, then VersionFormats.MAJOR_MINOR
|
||||
+is used as a default.
|
||||
+"""
|
||||
+
|
||||
+
|
||||
+def assert_version_format(version_str, desired_format, version_kind):
|
||||
"""
|
||||
- Versioning schema: MAJOR.MINOR
|
||||
- In case version contains an invalid version string, an CommandError will be raised.
|
||||
+ Check whether a given version_str has the given desired format.
|
||||
+
|
||||
+ In case the version does not conform to the desired_format, an CommandError will be raised.
|
||||
|
||||
:raises: CommandError
|
||||
- :return: release tuple
|
||||
"""
|
||||
- if not re.match(VERSION_REGEX, version):
|
||||
- raise CommandError(
|
||||
- "Unexpected format of target version: {}. "
|
||||
- "The required format is 'X.Y' (major and minor version).".format(version)
|
||||
- )
|
||||
- return version.split('.')
|
||||
+ if not re.match(desired_format.regex, version_str):
|
||||
+ error_str = 'Unexpected format of target version: {0}. The required format is \'{1}\'.'
|
||||
+ raise CommandError(error_str.format(version_str, desired_format.human_readable))
|
||||
|
||||
|
||||
-def get_major_version(version):
|
||||
+def get_major_version_from_a_valid_version(version):
|
||||
"""
|
||||
Return the major version from the given version string.
|
||||
|
||||
@@ -45,7 +73,7 @@ def get_major_version(version):
|
||||
:rtype: str
|
||||
:returns: The major version from the given version string.
|
||||
"""
|
||||
- return str(check_version(version)[0])
|
||||
+ return version.split('.')[0]
|
||||
|
||||
|
||||
def detect_sap_hana():
|
||||
@@ -71,7 +99,7 @@ def get_upgrade_flavour():
|
||||
return LEAPP_UPGRADE_FLAVOUR_DEFAULT
|
||||
|
||||
|
||||
-def _retrieve_os_release_contents(_os_release_path='/etc/os-release'):
|
||||
+def _retrieve_os_release_contents(_os_release_path='/etc/os-release', strip_double_quotes=True):
|
||||
"""
|
||||
Retrieve the contents of /etc/os-release
|
||||
|
||||
@@ -79,7 +107,20 @@ def _retrieve_os_release_contents(_os_release_path='/etc/os-release'):
|
||||
"""
|
||||
with open(_os_release_path) as os_release_handle:
|
||||
lines = os_release_handle.readlines()
|
||||
- return dict(line.strip().split('=', 1) for line in lines if '=' in line)
|
||||
+
|
||||
+ os_release_contents = {}
|
||||
+ for line in lines:
|
||||
+ if '=' not in line:
|
||||
+ continue
|
||||
+
|
||||
+ key, value = line.strip().split('=', 1)
|
||||
+
|
||||
+ if strip_double_quotes:
|
||||
+ value = value.strip('"')
|
||||
+
|
||||
+ os_release_contents[key] = value
|
||||
+
|
||||
+ return os_release_contents
|
||||
|
||||
|
||||
def get_os_release_version_id(filepath):
|
||||
@@ -88,7 +129,7 @@ def get_os_release_version_id(filepath):
|
||||
|
||||
:return: `str` version_id
|
||||
"""
|
||||
- return _retrieve_os_release_contents(_os_release_path=filepath).get('VERSION_ID', '').strip('"')
|
||||
+ return _retrieve_os_release_contents(_os_release_path=filepath).get('VERSION_ID', '')
|
||||
|
||||
|
||||
def get_upgrade_paths_config():
|
||||
@@ -117,15 +158,20 @@ def get_supported_target_versions(flavour=get_upgrade_flavour()):
|
||||
"""
|
||||
|
||||
os_release_contents = _retrieve_os_release_contents()
|
||||
- current_version_id = os_release_contents.get('VERSION_ID', '').strip('"')
|
||||
- distro_id = os_release_contents.get('ID', '').strip('"')
|
||||
+ current_version_id = os_release_contents.get('VERSION_ID', '')
|
||||
+ distro_id = os_release_contents.get('ID', '')
|
||||
+
|
||||
+ # We want to guarantee our actors that if they see 'centos'/'rhel'/...
|
||||
+ # then they will always see expected version format
|
||||
+ expected_version_format = _DISTRO_VERSION_FORMATS.get(distro_id, VersionFormats.MAJOR_MINOR).value
|
||||
+ assert_version_format(current_version_id, expected_version_format, _VersionKind.SOURCE)
|
||||
|
||||
target_versions = get_target_versions_from_config(current_version_id, distro_id, flavour)
|
||||
if not target_versions:
|
||||
# If we cannot find a particular major.minor version in the map,
|
||||
# we fallback to pick a target version just based on a major version.
|
||||
# This can happen for example when testing not yet released versions
|
||||
- major_version = get_major_version(current_version_id)
|
||||
+ major_version = get_major_version_from_a_valid_version(current_version_id)
|
||||
target_versions = get_target_versions_from_config(major_version, distro_id, flavour)
|
||||
|
||||
return target_versions
|
||||
@@ -145,9 +191,15 @@ def vet_upgrade_path(args):
|
||||
"""
|
||||
flavor = get_upgrade_flavour()
|
||||
env_version_override = os.getenv('LEAPP_DEVEL_TARGET_RELEASE')
|
||||
+
|
||||
if env_version_override:
|
||||
- check_version(env_version_override)
|
||||
+ os_release_contents = _retrieve_os_release_contents()
|
||||
+ distro_id = os_release_contents.get('ID', '')
|
||||
+ expected_version_format = _DISTRO_VERSION_FORMATS.get(distro_id, VersionFormats.MAJOR_MINOR).value
|
||||
+ assert_version_format(env_version_override, expected_version_format, _VersionKind.TARGET)
|
||||
+
|
||||
return (env_version_override, flavor)
|
||||
+
|
||||
target_release = args.target or get_target_version(flavor)
|
||||
return (target_release, flavor)
|
||||
|
||||
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
|
||||
index 6cdfa6d8..b54b0b34 100644
|
||||
--- a/commands/upgrade/util.py
|
||||
+++ b/commands/upgrade/util.py
|
||||
@@ -260,8 +260,8 @@ def prepare_configuration(args):
|
||||
|
||||
current_version = command_utils.get_os_release_version_id('/etc/os-release')
|
||||
os.environ['LEAPP_IPU_IN_PROGRESS'] = '{source}to{target}'.format(
|
||||
- source=command_utils.get_major_version(current_version),
|
||||
- target=command_utils.get_major_version(target_version)
|
||||
+ source=command_utils.get_major_version_from_a_valid_version(current_version),
|
||||
+ target=command_utils.get_major_version_from_a_valid_version(target_version)
|
||||
)
|
||||
|
||||
configuration = {
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,62 +0,0 @@
|
||||
From d450430eb06a9649ea924fa8b0ba4f123197dd27 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 21 Apr 2025 20:15:34 +0200
|
||||
Subject: [PATCH 29/37] refactor(versions/config): rename _simple_versions
|
||||
|
||||
Rename the function _simple_versions to _are_comparison_operators_used
|
||||
with **negated semantics**. The new name should make it clear what is
|
||||
being checked in the version list.
|
||||
---
|
||||
.../common/libraries/config/tests/test_version.py | 6 +++---
|
||||
repos/system_upgrade/common/libraries/config/version.py | 7 ++++---
|
||||
2 files changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index 37a91c00..3cb6479c 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -17,9 +17,9 @@ def test_validate_versions():
|
||||
assert version._validate_versions(['7.6', 'z.z'])
|
||||
|
||||
|
||||
-def test_simple_versions():
|
||||
- assert version._simple_versions(['7.6', '7.7'])
|
||||
- assert not version._simple_versions(['7.6', '< 7.7'])
|
||||
+def test_comparison_operator_detection():
|
||||
+ assert not version._are_comparison_operators_used(['7.6', '7.7'])
|
||||
+ assert version._are_comparison_operators_used(['7.6', '< 7.7'])
|
||||
|
||||
|
||||
def test_cmp_versions():
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index b8fc550b..24bb7729 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -149,9 +149,9 @@ def _validate_versions(versions):
|
||||
"but provided was '{}'".format(versions))
|
||||
|
||||
|
||||
-def _simple_versions(versions):
|
||||
+def _are_comparison_operators_used(versions):
|
||||
"""Return ``True`` if provided versions are list of strings without comparison operators."""
|
||||
- return all(len(v.split()) == 1 for v in versions)
|
||||
+ return not all(len(v.split()) == 1 for v in versions)
|
||||
|
||||
|
||||
def _cmp_versions(versions):
|
||||
@@ -190,10 +190,11 @@ def matches_version(match_list, detected):
|
||||
"but provided was {}: '{}'".format(type(detected), detected))
|
||||
_validate_versions([detected])
|
||||
|
||||
- if _simple_versions(match_list):
|
||||
+ if not _are_comparison_operators_used(match_list):
|
||||
# match_list = ['7.6', '7.7', '7.8', '7.9']
|
||||
_validate_versions(match_list)
|
||||
return detected in match_list
|
||||
+
|
||||
if _cmp_versions(match_list):
|
||||
detected = _version_to_tuple(detected)
|
||||
# match_list = ['>= 7.6', '< 7.10']
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 70557869df83660a1a0c31808cf9c97a2704aa9a Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Mon, 21 Apr 2025 20:40:11 +0200
|
||||
Subject: [PATCH 30/37] fix(lib/version): broken _validate_version on RHEL 10
|
||||
|
||||
The validate version used to split a given version on `.` and then
|
||||
check that every fragment is a digit, which is false for RHEL 10
|
||||
since `10` is not a digit.
|
||||
---
|
||||
repos/system_upgrade/common/libraries/config/version.py | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index 24bb7729..2e837a61 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -1,4 +1,5 @@
|
||||
import operator
|
||||
+import re
|
||||
|
||||
import six
|
||||
|
||||
@@ -141,10 +142,10 @@ def _version_to_tuple(version):
|
||||
|
||||
|
||||
def _validate_versions(versions):
|
||||
- """Raise ``TypeError`` if provided versions are not strings in the form ``<integer>.<integer>``."""
|
||||
- for ver in versions:
|
||||
- split = ver.split('.')
|
||||
- if not len(split) == 2 or not all(x.isdigit() for x in split):
|
||||
+ """Raise ``ValueError`` if provided versions are not strings in the form ``<integer>.<integer>``."""
|
||||
+ version_format_regex = re.compile(r'^([1-9]\d*)\.(\d+)$')
|
||||
+ for version in versions:
|
||||
+ if not re.match(version_format_regex, version):
|
||||
raise ValueError("Versions have to be in the form of '<integer>.<integer>' "
|
||||
"but provided was '{}'".format(versions))
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,37 +0,0 @@
|
||||
From a633641884f50fc917668cf1c8bd80d6c88297c7 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 2 May 2025 16:29:10 +0200
|
||||
Subject: [PATCH 31/37] upgrade_paths: add information about centos virtual
|
||||
versions
|
||||
|
||||
Add additional field to upgrade paths for CentOS that maps CentOS
|
||||
versions consisting only of a major version number to corresponding
|
||||
RHEL versions of the form MAJOR.MINOR ("virtual version"). This
|
||||
information is inteded to be used by leapp to in version checks
|
||||
to obtain a MAJOR.MINOR version so that code written for RHEL can work
|
||||
as expected also on CentOS.
|
||||
|
||||
Jira-ref: RHEL-80334
|
||||
---
|
||||
repos/system_upgrade/common/files/upgrade_paths.json | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/upgrade_paths.json b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
index 7ace7943..279e6eaa 100644
|
||||
--- a/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
+++ b/repos/system_upgrade/common/files/upgrade_paths.json
|
||||
@@ -21,6 +21,11 @@
|
||||
"default": {
|
||||
"8": ["9"],
|
||||
"9": ["10"]
|
||||
+ },
|
||||
+ "_virtual_versions": {
|
||||
+ "8": "8.10",
|
||||
+ "9": "9.6",
|
||||
+ "10": "10.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,334 +0,0 @@
|
||||
From 5f569408469d4e43ff559c5b90c3cc068d59d3a4 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 2 May 2025 16:35:18 +0200
|
||||
Subject: [PATCH 32/37] models(ipuconfig): extend Version class to contain
|
||||
virtual versions
|
||||
|
||||
Add virtual_{source,target}_version fields to the Version model. These
|
||||
fields store a virtual MAJOR.MINOR CentOS version so that
|
||||
version-specific checks originally written for RHEL can work as expected
|
||||
also on CentOS. On non-CentOS system, the value of these fields should
|
||||
be the same as source/target versions. The ipuworkflowconfig actor is
|
||||
modified accordingly to populate the newly added fields.
|
||||
|
||||
Jira-ref: RHEL-80334
|
||||
---
|
||||
.../checksaphana/tests/test_checksaphana.py | 4 ++
|
||||
.../libraries/ipuworkflowconfig.py | 51 +++++++++++++++++--
|
||||
.../tests/test_ipuworkflowconfig.py | 41 ++++++++++++++-
|
||||
.../common/libraries/config/mock_configs.py | 16 ++++--
|
||||
.../libraries/config/tests/test_version.py | 12 +++--
|
||||
.../common/libraries/testutils.py | 13 ++++-
|
||||
.../system_upgrade/common/models/ipuconfig.py | 15 ++++++
|
||||
7 files changed, 137 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py b/repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py
|
||||
index 1417b00a..1e43f403 100644
|
||||
--- a/repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py
|
||||
+++ b/repos/system_upgrade/common/actors/checksaphana/tests/test_checksaphana.py
|
||||
@@ -181,6 +181,8 @@ class MockSAPHanaVersionInstance(object):
|
||||
)
|
||||
)
|
||||
def test_checksaphana__fullfills_rhel86_hana_min_version(monkeypatch, major, rev, patchlevel, result):
|
||||
+ monkeypatch.setattr(checksaphana.api, 'current_actor', testutils.CurrentActorMocked())
|
||||
+
|
||||
monkeypatch.setattr(version, 'get_target_major_version', lambda: '8')
|
||||
monkeypatch.setattr(version, 'get_target_version', lambda: '8.6')
|
||||
monkeypatch.setattr(checksaphana, 'SAP_HANA_RHEL86_REQUIRED_PATCH_LEVELS', ((4, 48, 2), (5, 52, 0)))
|
||||
@@ -213,6 +215,8 @@ def test_checksaphana__fullfills_rhel86_hana_min_version(monkeypatch, major, rev
|
||||
)
|
||||
)
|
||||
def test_checksaphana__fullfills_hana_rhel90_min_version(monkeypatch, major, rev, patchlevel, result):
|
||||
+ monkeypatch.setattr(checksaphana.api, 'current_actor', testutils.CurrentActorMocked())
|
||||
+
|
||||
monkeypatch.setattr(version, 'get_target_major_version', lambda: '9')
|
||||
monkeypatch.setattr(version, 'get_target_version', lambda: '9.0')
|
||||
monkeypatch.setattr(checksaphana, 'SAP_HANA_RHEL90_REQUIRED_PATCH_LEVELS', ((5, 59, 4), (6, 63, 0)))
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
index 35f61669..f76677fd 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
@@ -10,6 +10,7 @@ ENV_IGNORE = ('LEAPP_CURRENT_PHASE', 'LEAPP_CURRENT_ACTOR', 'LEAPP_VERBOSE',
|
||||
'LEAPP_DEBUG')
|
||||
|
||||
ENV_MAPPING = {'LEAPP_DEVEL_DM_DISABLE_UDEV': 'DM_DISABLE_UDEV'}
|
||||
+CENTOS_VIRTUAL_VERSIONS_KEY = '_virtual_versions'
|
||||
|
||||
|
||||
def get_env_vars():
|
||||
@@ -92,8 +93,7 @@ def load_upgrade_paths_definitions(paths_definition_file):
|
||||
return definitions
|
||||
|
||||
|
||||
-def load_raw_upgrade_paths_for_distro_and_flavour(distro_id, flavour, paths_definition_file='upgrade_paths.json'):
|
||||
- all_definitions = load_upgrade_paths_definitions(paths_definition_file)
|
||||
+def extract_upgrade_paths_for_distro_and_flavour(all_definitions, distro_id, flavour):
|
||||
raw_upgrade_paths_for_distro = all_definitions.get(distro_id, {})
|
||||
|
||||
if not raw_upgrade_paths_for_distro:
|
||||
@@ -117,6 +117,39 @@ def construct_models_for_paths_matching_source_major(raw_paths, src_major_versio
|
||||
return multipaths_matching_source
|
||||
|
||||
|
||||
+def construct_virtual_versions(all_upgrade_path_defs, distro_id, source_version, target_version):
|
||||
+ if distro_id.lower() != 'centos':
|
||||
+ return (source_version, target_version)
|
||||
+
|
||||
+ centos_upgrade_paths = all_upgrade_path_defs.get('centos', {})
|
||||
+ if not centos_upgrade_paths:
|
||||
+ raise StopActorExecutionError('There are no upgrade paths defined for CentOS.')
|
||||
+
|
||||
+ virtual_versions = centos_upgrade_paths.get(CENTOS_VIRTUAL_VERSIONS_KEY, {})
|
||||
+ if not virtual_versions: # Unlikely, only if using old upgrade_paths.json, but the user should not touch the file
|
||||
+ details = {'details': 'The file does not contain any information about virtual versions of CentOS'}
|
||||
+ raise StopActorExecutionError('The internal upgrade_paths.json file is malformed.')
|
||||
+
|
||||
+ source_virtual_version = virtual_versions.get(source_version)
|
||||
+ target_virtual_version = virtual_versions.get(target_version)
|
||||
+
|
||||
+ if not source_virtual_version or not target_virtual_version:
|
||||
+ if not source_virtual_version and not target_virtual_version:
|
||||
+ what_is_missing = 'CentOS {} (source) and CentOS {} (target)'.format(source_virtual_version,
|
||||
+ target_virtual_version)
|
||||
+ elif not source_virtual_version:
|
||||
+ what_is_missing = 'CentOS {} (source)'.format(source_virtual_version)
|
||||
+ else:
|
||||
+ what_is_missing = 'CentOS {} (target)'.format(target_virtual_version)
|
||||
+
|
||||
+ details_msg = 'The {} field in upgrade path definitions does not provide any information for {}'
|
||||
+ details = {'details': details_msg.format(CENTOS_VIRTUAL_VERSIONS_KEY, what_is_missing)}
|
||||
+ raise StopActorExecutionError('Failed to identify virtual minor version number for the system.',
|
||||
+ details=details)
|
||||
+
|
||||
+ return (source_virtual_version, target_virtual_version)
|
||||
+
|
||||
+
|
||||
def produce_ipu_config(actor):
|
||||
flavour = os.environ.get('LEAPP_UPGRADE_PATH_FLAVOUR')
|
||||
target_version = os.environ.get('LEAPP_UPGRADE_PATH_TARGET_RELEASE')
|
||||
@@ -125,17 +158,27 @@ def produce_ipu_config(actor):
|
||||
|
||||
check_target_major_version(source_version, target_version)
|
||||
|
||||
- raw_upgrade_paths = load_raw_upgrade_paths_for_distro_and_flavour(os_release.release_id, flavour)
|
||||
+ all_upgrade_path_defs = load_upgrade_paths_definitions('upgrade_paths.json')
|
||||
+ raw_upgrade_paths = extract_upgrade_paths_for_distro_and_flavour(all_upgrade_path_defs,
|
||||
+ os_release.release_id,
|
||||
+ flavour)
|
||||
source_major_version = source_version.split('.')[0]
|
||||
exposed_supported_paths = construct_models_for_paths_matching_source_major(raw_upgrade_paths, source_major_version)
|
||||
|
||||
+ virtual_source_version, virtual_target_version = construct_virtual_versions(all_upgrade_path_defs,
|
||||
+ os_release.release_id,
|
||||
+ source_version,
|
||||
+ target_version)
|
||||
+
|
||||
actor.produce(IPUConfig(
|
||||
leapp_env_vars=get_env_vars(),
|
||||
os_release=os_release,
|
||||
architecture=platform.machine(),
|
||||
version=Version(
|
||||
source=source_version,
|
||||
- target=target_version
|
||||
+ target=target_version,
|
||||
+ virtual_source_version=virtual_source_version,
|
||||
+ virtual_target_version=virtual_target_version,
|
||||
),
|
||||
kernel=get_booted_kernel(),
|
||||
flavour=flavour,
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
index d88424ce..6184121b 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/tests/test_ipuworkflowconfig.py
|
||||
@@ -149,7 +149,44 @@ def test_load_raw_upgrade_paths_for_distro_and_flavour(monkeypatch, distro, flav
|
||||
}
|
||||
}
|
||||
}
|
||||
- monkeypatch.setattr(ipuworkflowconfig, 'load_upgrade_paths_definitions', lambda *args: defined_upgrade_paths)
|
||||
|
||||
- result = ipuworkflowconfig.load_raw_upgrade_paths_for_distro_and_flavour(distro, flavour)
|
||||
+ result = ipuworkflowconfig.extract_upgrade_paths_for_distro_and_flavour(defined_upgrade_paths,
|
||||
+ distro, flavour)
|
||||
assert result == expected_result
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize(
|
||||
+ ('construction_params', 'expected_versions'),
|
||||
+ [
|
||||
+ (('centos', '8', '9'), ('8.10', '9.5')),
|
||||
+ (('rhel', '8.10', '9.4'), ('8.10', '9.4')),
|
||||
+ ]
|
||||
+)
|
||||
+def test_virtual_version_construction(construction_params, expected_versions):
|
||||
+ defined_upgrade_paths = {
|
||||
+ 'rhel': {
|
||||
+ 'default': {
|
||||
+ '8.10': ['9.4', '9.5', '9.6'],
|
||||
+ '8.4': ['9.2'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '8': ['9.4', '9.5', '9.6'],
|
||||
+ '9': ['10.0']
|
||||
+ },
|
||||
+ 'saphana': {
|
||||
+ '8.10': ['9.6', '9.4'],
|
||||
+ '8': ['9.6', '9.4'],
|
||||
+ '9.6': ['10.0'],
|
||||
+ '9': ['10.0']
|
||||
+ }
|
||||
+ },
|
||||
+ 'centos': {
|
||||
+ '8': ['9'],
|
||||
+ '_virtual_versions': {
|
||||
+ '8': '8.10',
|
||||
+ '9': '9.5',
|
||||
+ }
|
||||
+ },
|
||||
+ }
|
||||
+
|
||||
+ result = ipuworkflowconfig.construct_virtual_versions(defined_upgrade_paths, *construction_params)
|
||||
+ assert result == expected_versions
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/mock_configs.py b/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
index a1c9c0fd..a7ee0000 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/mock_configs.py
|
||||
@@ -19,7 +19,9 @@ CONFIG = IPUConfig(
|
||||
),
|
||||
version=Version(
|
||||
source='7.6',
|
||||
- target='8.0'
|
||||
+ target='8.0',
|
||||
+ virtual_source_version='7.6',
|
||||
+ virtual_target_version='8.0'
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
@@ -39,7 +41,9 @@ CONFIG_NO_NETWORK_RENAMING = IPUConfig(
|
||||
),
|
||||
version=Version(
|
||||
source='7.6',
|
||||
- target='8.0'
|
||||
+ target='8.0',
|
||||
+ virtual_source_version='7.6',
|
||||
+ virtual_target_version='8.0'
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
@@ -59,7 +63,9 @@ CONFIG_ALL_SIGNED = IPUConfig(
|
||||
),
|
||||
version=Version(
|
||||
source='7.6',
|
||||
- target='8.0'
|
||||
+ target='8.0',
|
||||
+ virtual_source_version='7.6',
|
||||
+ virtual_target_version='8.0'
|
||||
),
|
||||
architecture='x86_64',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
@@ -78,7 +84,9 @@ CONFIG_S390X = IPUConfig(
|
||||
),
|
||||
version=Version(
|
||||
source='7.6',
|
||||
- target='8.0'
|
||||
+ target='8.0',
|
||||
+ virtual_source_version='7.6',
|
||||
+ virtual_target_version='8.0'
|
||||
),
|
||||
architecture='s390x',
|
||||
kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index 3cb6479c..a8a1023e 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -27,7 +27,9 @@ def test_cmp_versions():
|
||||
assert not version._cmp_versions(['>= 7.6', '& 7.7'])
|
||||
|
||||
|
||||
-def test_matches_version_wrong_args():
|
||||
+def test_matches_version_wrong_args(monkeypatch):
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
+
|
||||
with pytest.raises(TypeError):
|
||||
version.matches_version('>= 7.6', '7.7')
|
||||
with pytest.raises(TypeError):
|
||||
@@ -42,7 +44,9 @@ def test_matches_version_wrong_args():
|
||||
version.matches_version(['>= 7.6', '& 7.7'], '7.7')
|
||||
|
||||
|
||||
-def test_matches_version_fail():
|
||||
+def test_matches_version_fail(monkeypatch):
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
+
|
||||
assert not version.matches_version(['> 7.6', '< 7.7'], '7.6')
|
||||
assert not version.matches_version(['> 7.6', '< 7.7'], '7.7')
|
||||
assert not version.matches_version(['> 7.6', '< 7.10'], '7.6')
|
||||
@@ -50,7 +54,9 @@ def test_matches_version_fail():
|
||||
assert not version.matches_version(['7.6', '7.7', '7.10'], '7.8')
|
||||
|
||||
|
||||
-def test_matches_version_pass():
|
||||
+def test_matches_version_pass(monkeypatch):
|
||||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
|
||||
+
|
||||
assert version.matches_version(['7.6', '7.7', '7.10'], '7.7')
|
||||
assert version.matches_version(['> 7.6', '< 7.10'], '7.7')
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/testutils.py b/repos/system_upgrade/common/libraries/testutils.py
|
||||
index 1b3c3683..3e145d91 100644
|
||||
--- a/repos/system_upgrade/common/libraries/testutils.py
|
||||
+++ b/repos/system_upgrade/common/libraries/testutils.py
|
||||
@@ -74,15 +74,24 @@ def _make_default_config(actor_config_schema):
|
||||
return _normalize_config({}, merged_schema) # Will fill default values during normalization
|
||||
|
||||
|
||||
+# Note: The constructor of the following class takes in too many arguments (R0913). A builder-like
|
||||
+# pattern would be nice here. Ideally, the builder should actively prevent the developer from setting fields
|
||||
+# that do not affect actor's behavior in __setattr__.
|
||||
class CurrentActorMocked(object): # pylint:disable=R0904
|
||||
- def __init__(self, arch=architecture.ARCH_X86_64, envars=None, kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
+ def __init__(self, arch=architecture.ARCH_X86_64, envars=None, # pylint:disable=R0913
|
||||
+ kernel='3.10.0-957.43.1.el7.x86_64',
|
||||
release_id='rhel', src_ver='7.8', dst_ver='8.1', msgs=None, flavour='default', config=None,
|
||||
+ virtual_source_version=None, virtual_target_version=None,
|
||||
supported_upgrade_paths=None):
|
||||
"""
|
||||
:param List[IPUSourceToPossibleTargets] supported_upgrade_paths: List of supported upgrade paths.
|
||||
"""
|
||||
envarsList = [EnvVar(name=k, value=v) for k, v in envars.items()] if envars else []
|
||||
- version = namedtuple('Version', ['source', 'target'])(src_ver, dst_ver)
|
||||
+
|
||||
+ version_fields = ['source', 'target', 'virtual_source_version', 'virtual_target_version']
|
||||
+ version_values = [src_ver, dst_ver, virtual_source_version or src_ver, virtual_target_version or dst_ver]
|
||||
+ version = namedtuple('Version', version_fields)(*version_values)
|
||||
+
|
||||
release = namedtuple('OS_release', ['release_id', 'version_id'])(release_id, src_ver)
|
||||
|
||||
self._common_folder = '../../files'
|
||||
diff --git a/repos/system_upgrade/common/models/ipuconfig.py b/repos/system_upgrade/common/models/ipuconfig.py
|
||||
index 0a16b603..379ac13f 100644
|
||||
--- a/repos/system_upgrade/common/models/ipuconfig.py
|
||||
+++ b/repos/system_upgrade/common/models/ipuconfig.py
|
||||
@@ -33,6 +33,21 @@ class Version(Model):
|
||||
target = fields.String()
|
||||
"""Version of the target system. E.g. '8.2.'."""
|
||||
|
||||
+ virtual_source_version = fields.String()
|
||||
+ """
|
||||
+ Source OS version used when checking whether to execute version-dependent code.
|
||||
+
|
||||
+ On RHEL and other systems that have version of the form MINOR.MAJOR, `virtual_source_version`
|
||||
+ matches `source_version`.
|
||||
+
|
||||
+ CentOS has version of the form MAJOR, lacking the minor version number. The
|
||||
+ `virtual_source_version` value is obtained by combining CentOS major
|
||||
+ version number with a minor version number stored internally in the upgrade_paths.json file.
|
||||
+ """
|
||||
+
|
||||
+ virtual_target_version = fields.String()
|
||||
+ """ See :py:attr:`virtual_source_version` """
|
||||
+
|
||||
|
||||
class IPUSourceToPossibleTargets(Model):
|
||||
"""
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,101 +0,0 @@
|
||||
From 9a48ac590bf9594ea7e9eefdaa668af5f7c75976 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hecko <mhecko@redhat.com>
|
||||
Date: Fri, 2 May 2025 17:12:55 +0200
|
||||
Subject: [PATCH 33/37] libs(common, version): autocorrect centos versions into
|
||||
MAJOR.MINOR
|
||||
|
||||
When executing version.matches_version on CentOS, autocorrect versions
|
||||
of the form MAJOR into MAJOR.MINOR using virtual versions available in
|
||||
IPU configuration. Autocorrection is implemented only if a used version
|
||||
matches source/target version. For example, if match_list contains '8'
|
||||
on a CentOS 8 system, the version will be autocorrected to '8.10'.
|
||||
However, if a version that does not match the source/target version is
|
||||
present, it will be left untouched.
|
||||
|
||||
Jira-ref: RHEL-80334
|
||||
---
|
||||
.../libraries/config/tests/test_version.py | 15 ++++++++
|
||||
.../common/libraries/config/version.py | 34 +++++++++++++++++++
|
||||
2 files changed, 49 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index a8a1023e..420571c0 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -61,6 +61,21 @@ def test_matches_version_pass(monkeypatch):
|
||||
assert version.matches_version(['> 7.6', '< 7.10'], '7.7')
|
||||
|
||||
|
||||
+def test_matches_version_centos_autocorrect(monkeypatch):
|
||||
+ actor_mock = CurrentActorMocked(release_id='centos',
|
||||
+ src_ver='8', dst_ver='9',
|
||||
+ virtual_source_version='8.10', virtual_target_version='9.5')
|
||||
+ monkeypatch.setattr(api, 'current_actor', actor_mock)
|
||||
+
|
||||
+ assert version.matches_version(['8'], '8.10')
|
||||
+ assert version.matches_version(['9'], '9.5')
|
||||
+ assert not version.matches_version(['8'], '9.5')
|
||||
+
|
||||
+ assert version.matches_version(['> 8', '<= 9'], '9.5')
|
||||
+
|
||||
+ assert version.matches_version(['> 8.10', '<= 9.7'], '9')
|
||||
+
|
||||
+
|
||||
@pytest.mark.parametrize('result,version_list', [
|
||||
(True, ['7.6', '7.7']),
|
||||
(True, ['7.6']),
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index 2e837a61..4b6e616c 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -164,6 +164,15 @@ def _cmp_versions(versions):
|
||||
return all(s[0] in OP_MAP for s in split)
|
||||
|
||||
|
||||
+def _autocorrect_centos_version(version_to_correct):
|
||||
+ version_cfg = api.current_actor().configuration.version
|
||||
+ if version_to_correct == version_cfg.source:
|
||||
+ version_to_correct = version_cfg.virtual_source_version
|
||||
+ elif version_to_correct == version_cfg.target:
|
||||
+ version_to_correct = version_cfg.virtual_target_version
|
||||
+ return version_to_correct
|
||||
+
|
||||
+
|
||||
def matches_version(match_list, detected):
|
||||
"""
|
||||
Check if the `detected` version meets the criteria specified in `match_list`.
|
||||
@@ -189,6 +198,31 @@ def matches_version(match_list, detected):
|
||||
if not isinstance(detected, six.string_types):
|
||||
raise TypeError("Detected version has to be a string "
|
||||
"but provided was {}: '{}'".format(type(detected), detected))
|
||||
+
|
||||
+ # If we are on CentOS, and we are provided with a version of the form MAJOR, try to correct
|
||||
+ # the version into MAJOR.MINOR using virtual versions
|
||||
+ if api.current_actor().configuration.os_release.release_id == 'centos':
|
||||
+ new_detected = _autocorrect_centos_version(detected)
|
||||
+ # We might have a matchlist ['> 8', '<= 9'] that, e.g., results from blindly using source/target versions
|
||||
+ # to make a matchlist. Our `detected` version might be some fixed string, e.g., `9.1`. So we need to
|
||||
+ # also autocorrect the matchlist. Due to how autocorrection works, no changes are done to matchlist
|
||||
+ # parts that contain full versions.
|
||||
+ new_matchlist = []
|
||||
+ for predicate in match_list:
|
||||
+ if ' ' in predicate:
|
||||
+ op, version = predicate.split(' ', 1)
|
||||
+ version = _autocorrect_centos_version(version)
|
||||
+ new_matchlist.append('{} {}'.format(op, version))
|
||||
+ else:
|
||||
+ version = _autocorrect_centos_version(predicate)
|
||||
+ new_matchlist.append(version)
|
||||
+
|
||||
+ msg = 'Performed autocorrection from matches_version(%s, %s) to matches_version(%s, %s)'
|
||||
+ api.current_logger().debug(msg, match_list, detected, new_matchlist, new_detected)
|
||||
+
|
||||
+ match_list = new_matchlist
|
||||
+ detected = new_detected
|
||||
+
|
||||
_validate_versions([detected])
|
||||
|
||||
if not _are_comparison_operators_used(match_list):
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,127 +0,0 @@
|
||||
From c82153f14d9391c72d914c80d764de0d7ef7ff1e Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 7 May 2025 22:23:21 +0200
|
||||
Subject: [PATCH 34/37] Introduce distro-based rpm-gpg trusted directory
|
||||
|
||||
The original trusted rpm-gpg directories under
|
||||
files/rpm-gpg/
|
||||
is not flexible when considering other distributions as well.
|
||||
The new path pattern will be:
|
||||
files/distro/<DISTRO>/rpm-gpg/
|
||||
|
||||
Removing files/rpm-gpg directory with the included RHEL GPG keys
|
||||
in favor of the new distro based directory.
|
||||
|
||||
jira: RHEL-80335
|
||||
|
||||
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
||||
---
|
||||
.../rpm-gpg/10/RPM-GPG-KEY-redhat-release | 0
|
||||
.../rpm-gpg/10beta/RPM-GPG-KEY-redhat-release | 0
|
||||
.../rpm-gpg/8/RPM-GPG-KEY-redhat-release | 0
|
||||
.../rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta | 0
|
||||
.../rpm-gpg/9/RPM-GPG-KEY-redhat-release | 0
|
||||
.../rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta | 0
|
||||
repos/system_upgrade/common/libraries/gpg.py | 8 ++++++-
|
||||
.../common/libraries/tests/test_gpg.py | 21 +++++++++++--------
|
||||
8 files changed, 19 insertions(+), 10 deletions(-)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/10/RPM-GPG-KEY-redhat-release (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/8/RPM-GPG-KEY-redhat-release (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/9/RPM-GPG-KEY-redhat-release (100%)
|
||||
rename repos/system_upgrade/common/files/{ => distro/rhel}/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta (100%)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/10/RPM-GPG-KEY-redhat-release b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/10/RPM-GPG-KEY-redhat-release
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/10/RPM-GPG-KEY-redhat-release
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/10/RPM-GPG-KEY-redhat-release
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/10beta/RPM-GPG-KEY-redhat-release
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/8/RPM-GPG-KEY-redhat-release b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/8/RPM-GPG-KEY-redhat-release
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/8/RPM-GPG-KEY-redhat-release
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/8/RPM-GPG-KEY-redhat-release
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/8beta/RPM-GPG-KEY-redhat-beta
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/9/RPM-GPG-KEY-redhat-release b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/9/RPM-GPG-KEY-redhat-release
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/9/RPM-GPG-KEY-redhat-release
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/9/RPM-GPG-KEY-redhat-release
|
||||
diff --git a/repos/system_upgrade/common/files/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta b/repos/system_upgrade/common/files/distro/rhel/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta
|
||||
similarity index 100%
|
||||
rename from repos/system_upgrade/common/files/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta
|
||||
rename to repos/system_upgrade/common/files/distro/rhel/rpm-gpg/9beta/RPM-GPG-KEY-redhat-beta
|
||||
diff --git a/repos/system_upgrade/common/libraries/gpg.py b/repos/system_upgrade/common/libraries/gpg.py
|
||||
index a8071329..c9c3f1fc 100644
|
||||
--- a/repos/system_upgrade/common/libraries/gpg.py
|
||||
+++ b/repos/system_upgrade/common/libraries/gpg.py
|
||||
@@ -121,7 +121,13 @@ def get_path_to_gpg_certs():
|
||||
# only beta is special in regards to the GPG signing keys
|
||||
if target_product_type == 'beta':
|
||||
certs_dir = '{}beta'.format(target_major_version)
|
||||
- return os.path.join(api.get_common_folder_path(GPG_CERTS_FOLDER), certs_dir)
|
||||
+ distro = api.current_actor().configuration.os_release.release_id
|
||||
+ return os.path.join(
|
||||
+ api.get_common_folder_path('distro'),
|
||||
+ distro,
|
||||
+ GPG_CERTS_FOLDER,
|
||||
+ certs_dir
|
||||
+ )
|
||||
|
||||
|
||||
def is_nogpgcheck_set():
|
||||
diff --git a/repos/system_upgrade/common/libraries/tests/test_gpg.py b/repos/system_upgrade/common/libraries/tests/test_gpg.py
|
||||
index 7cf37fa2..82b51abb 100644
|
||||
--- a/repos/system_upgrade/common/libraries/tests/test_gpg.py
|
||||
+++ b/repos/system_upgrade/common/libraries/tests/test_gpg.py
|
||||
@@ -11,14 +11,16 @@ from leapp.libraries.stdlib import api
|
||||
from leapp.models import GpgKey, InstalledRPM, RPM
|
||||
|
||||
|
||||
-@pytest.mark.parametrize('target, product_type, exp', [
|
||||
- ('8.6', 'beta', '../../files/rpm-gpg/8beta'),
|
||||
- ('8.8', 'htb', '../../files/rpm-gpg/8'),
|
||||
- ('9.0', 'beta', '../../files/rpm-gpg/9beta'),
|
||||
- ('9.2', 'ga', '../../files/rpm-gpg/9'),
|
||||
+@pytest.mark.parametrize('target, product_type, distro, exp', [
|
||||
+ ('8.6', 'beta', 'rhel', '../../files/distro/rhel/rpm-gpg/8beta'),
|
||||
+ ('8.8', 'htb', 'rhel', '../../files/distro/rhel/rpm-gpg/8'),
|
||||
+ ('9.0', 'beta', 'rhel', '../../files/distro/rhel/rpm-gpg/9beta'),
|
||||
+ ('9.2', 'ga', 'rhel', '../../files/distro/rhel/rpm-gpg/9'),
|
||||
+ ('10.0', 'ga', 'rhel', '../../files/distro/rhel/rpm-gpg/10'),
|
||||
+ ('10', 'ga', 'centos', '../../files/distro/centos/rpm-gpg/10'),
|
||||
])
|
||||
-def test_get_path_to_gpg_certs(monkeypatch, target, product_type, exp):
|
||||
- current_actor = CurrentActorMocked(dst_ver=target,
|
||||
+def test_get_path_to_gpg_certs(monkeypatch, target, product_type, distro, exp):
|
||||
+ current_actor = CurrentActorMocked(dst_ver=target, release_id=distro,
|
||||
envars={'LEAPP_DEVEL_TARGET_PRODUCT_TYPE': product_type})
|
||||
monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
|
||||
@@ -33,7 +35,7 @@ def is_rhel7():
|
||||
@pytest.mark.skipif(distro.id() not in ("rhel", "centos"), reason="Requires RHEL or CentOS for valid results.")
|
||||
def test_gpg_show_keys(loaded_leapp_repository, monkeypatch):
|
||||
src = '7.9' if is_rhel7() else '8.6'
|
||||
- current_actor = CurrentActorMocked(src_ver=src)
|
||||
+ current_actor = CurrentActorMocked(src_ver=src, release_id='rhel')
|
||||
monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
|
||||
# python2 compatibility :/
|
||||
@@ -78,7 +80,8 @@ def test_gpg_show_keys(loaded_leapp_repository, monkeypatch):
|
||||
# with some test data now -- rhel9 release key
|
||||
# rhel9_key_path = os.path.join(api.get_common_folder_path('rpm-gpg'), '9')
|
||||
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
- rhel9_key_path = os.path.join(cur_dir, '..', '..', 'files', 'rpm-gpg', '9',
|
||||
+ rhel9_key_path = os.path.join(cur_dir, '..', '..', 'files',
|
||||
+ 'distro', 'rhel', 'rpm-gpg', '9',
|
||||
'RPM-GPG-KEY-redhat-release')
|
||||
res = gpg._gpg_show_keys(rhel9_key_path)
|
||||
finally:
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,227 +0,0 @@
|
||||
From cacee2edb7d93fa4418e9795ab3462a707868937 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 7 May 2025 22:31:35 +0200
|
||||
Subject: [PATCH 35/37] Add official Centos Stream 9 and 10 RPM GPG keys
|
||||
|
||||
These keys are obtained from centos-gpg-keys packages on 7th May
|
||||
|
||||
jira: RHEL-80335
|
||||
|
||||
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
||||
---
|
||||
.../10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 | 37 +++++++++++++++++++
|
||||
.../10/RPM-GPG-KEY-centosofficial-SHA256 | 30 +++++++++++++++
|
||||
.../rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras | 37 +++++++++++++++++++
|
||||
.../9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 | 37 +++++++++++++++++++
|
||||
.../rpm-gpg/9/RPM-GPG-KEY-centosofficial | 30 +++++++++++++++
|
||||
5 files changed, 171 insertions(+)
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-centosofficial-SHA256
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
create mode 100644 repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-centosofficial
|
||||
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
new file mode 100644
|
||||
index 00000000..e15f9a82
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
@@ -0,0 +1,37 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQENBGG65jsBCADef7Fspss6f2PKrlrxufWlBaQI+kcdSDbY7o/dyyjpT7dcX8t8
|
||||
+Ou73irjiShK3q0pdrh1Wy/mXc7RIJwAbCt9OVgyx4PV6AW5LfU7P7xyEAbTgLhz9
|
||||
+lLPjBGhBvfRpW+7naPqkTcIKxpVR8Khq6fsvThGCNzNkGa46F1srE3mf1zC9wdVR
|
||||
+VtXO7gHEZ2LrNcl195jZkBQOLcXANcSOFh5eRfhumULmk4XgCGmZQT5UNFofqOmn
|
||||
+aWQGBq3XaU7RWjl7RH+IS2EW0rAtz9Le+cH+j0aFhzo7jBMOxGYG62rUaHdxssjV
|
||||
+S1CrfpYT6NeG5i/1hiP4hO9suezJw4yuXNZ3ABEBAAG0VkNlbnRPUyBFeHRyYXMg
|
||||
+U0lHIChodHRwczovL3dpa2kuY2VudG9zLm9yZy9TcGVjaWFsSW50ZXJlc3RHcm91
|
||||
+cCkgPHNlY3VyaXR5QGNlbnRvcy5vcmc+iQE5BBMBCgAjAhsvBwsJCAcDAgEGFQgC
|
||||
+CQoLBBYCAwECHgECF4AFAmIePKwACgkQH/aiFx2ZdmgUpAgAt1Y139EUQOLd013m
|
||||
+jZx3shUVHRWCU0SaWLuXLupdxqhe/Iygen48aiDWfAtWr9neAJK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|
||||
+ugGoL6cWBR6RYka+/eEFMd3kSrng9ahbNX0F4ztdZ2alPrrE6BvJ7n/Mt6tZKgL7
|
||||
+x9V0GpbstAkQH/aiFx2ZdmgN/gf+PEUa1LT98RS28fyNPaXYGx5vLWYxUtAdeN9a
|
||||
+TfugGHCVhVsowbIEnuFUHE1JmTJ1hDaFYXqkgG9zDo81JVz/yCHpNIQO0YF2h+qX
|
||||
+BXiKP7PQ+iT/PjQHidlYUuz73hjDwRl3AhLafcwVHeD3cCgo/ZP/Vi9Y9iBFVZDl
|
||||
+jGHxAIe0PWbEAUuqNJOgrlVmmCtSqVkN1Neihx1zjpw3rqfUQzwvhvcsOfkKfnBs
|
||||
+Boc66IZ0J5pmSzgJnSbLrr2dv1/jYHaolA24vkMqMxKzJbz+GeQ/SqBZ5/rA37VL
|
||||
+x90Tu9UVSfbyEbwS9Zj1sVmc3mdm1kn6dmTlOfTDIqehfHBlnQ==
|
||||
+=jx2B
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-centosofficial-SHA256 b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-centosofficial-SHA256
|
||||
new file mode 100644
|
||||
index 00000000..ceee67dd
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/10/RPM-GPG-KEY-centosofficial-SHA256
|
||||
@@ -0,0 +1,30 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQINBFzMWxkBEADHrskpBgN9OphmhRkc7P/YrsAGSvvl7kfu+e9KAaU6f5MeAVyn
|
||||
+rIoM43syyGkgFyWgjZM8/rur7EMPY2yt+2q/1ZfLVCRn9856JqTIq0XRpDUe4nKQ
|
||||
+8BlA7wDVZoSDxUZkSuTIyExbDf0cpw89Tcf62Mxmi8jh74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PW01ph/3bM7pf9hyM9FAfU4X
|
||||
+AFcyb1oYI4/82EkICUe6jeuZrz67dPeLVAlYrGW4hp/825g0fqJHxPDp25GS4rAa
|
||||
+4RqyibLzNjSGdXYeLj2NcB/8OqaP+T1hv3JDaqe70QoYa/GIC4rh15NyXVbUP+LG
|
||||
+V4vUiL7mb9ynzvF5zYHJbcg4R7dOsiZHrMFwy7FZesQaVrXeJlxRcEj65rpm1ZtZ
|
||||
+mwAE1k2LsRkvLyr9hpZkXnMeOKYIPwpdmBjXNVNVbq7097OxZOYPPos+iZKMWfl4
|
||||
+UQnMsCVxonZtamdI4qEc3jMkSZPJKgOplGOms5jdY+EdSvsFWEQ0Snd3dChfU7DV
|
||||
+o4Rbcy5klwHrvuZIOLaovhyxuRPhP6gV9+gzpTK/7vrvDlFbbZE6s212mDZ13RWB
|
||||
+mTfAxz4h
|
||||
+=agO/
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras
|
||||
new file mode 100644
|
||||
index 00000000..5ea1515a
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras
|
||||
@@ -0,0 +1,37 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQENBGG65jsBCADef7Fspss6f2PKrlrxufWlBaQI+kcdSDbY7o/dyyjpT7dcX8t8
|
||||
+Ou73irjiShK3q0pdrh1Wy/mXc7RIJwAbCt9OVgyx4PV6AW5LfU7P7xyEAbTgLhz9
|
||||
+lLPjBGhBvfRpW+7naPqkTcIKxpVR8Khq6fsvThGCNzNkGa46F1srE3mf1zC9wdVR
|
||||
+VtXO7gH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JZ81TF0qCdllTYGAXXUdYsJlg64dH0u84naTOFIuInywCmNyPmC8e8/0
|
||||
+g56hCV2L7bRJGjBCa6VH+TgvVGnkFsoMM9ijhuTIIQARAQABiQI+BBgBAgAJBQJh
|
||||
+uuY7AhsuASkJEB/2ohcdmXZowF0gBBkBAgAGBQJhuuY7AAoJEItcgRH8pdD/Zv0I
|
||||
+AIdipgQOIf7JcWmXli29nFedwdY1RJbKxABP2vMioYXDXjTkLBFsE9v4upnVnIZy
|
||||
+EM6IyrN8qaEVGMbCAiG+G+ABc3P/2mIWjlk4TUR4dFMGrnjbtGAalRd1EVJX/x8N
|
||||
+Vr9er+EMJDYR0PhKIQkZbUdjwYwB0R1wyJsvTsVf7k52Y013oI9iZd7nkOZxeKZX
|
||||
+qlHLbf1fSY6szmHEGVu/LNY8gUc3n2z8UByiqeJ2unrU5iL4FQ45DAoUWT0Y2WBF
|
||||
+WTYvJCTNGmiuKroBqC+nFgUekWJGvv3hBTHd5Eq54PWoWzV9BeM7XWdmpT66xOgb
|
||||
+ye5/zLerWSoC+8fVdBqW7LSEqggAzRaID+mLFPTe2LbQkaBkmIpqeoDOy700Xy6K
|
||||
+VW05GndH0E0t86DbQClFyzucYLzX2dXyV2DWjoWDIevQnS51zzsd+lWyuKPICKte
|
||||
++K+yk5QEiwgaDf5oPmI8WL2zIAfiwVHlU0epMLU1pZLAQYotsQ6m5qPPMVXcfIqF
|
||||
+3UJwZEnZRccfOKq1hHSS2/Ns4ihAfkrfes1IFLSzbyvinXQUqFVrY8oZCKhNPSRd
|
||||
+IXXPIx0KvnlI9e0EittvsrQxebAa2MwLXOVYL8WVvOLY7oNTrOxe45jOdzMz2+rK
|
||||
+dodVWwuBwNKuwSE6b5A0dwUj8ZEo/5L4noufZF6aGOLdbVcoUg==
|
||||
+=RGYd
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
new file mode 100644
|
||||
index 00000000..e15f9a82
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
@@ -0,0 +1,37 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQENBGG65jsBCADef7Fspss6f2PKrlrxufWlBaQI+kcdSDbY7o/dyyjpT7dcX8t8
|
||||
+Ou73irjiShK3q0pdrh1Wy/mXc7RIJwAbCt9OVgyx4PV6AW5LfU7P7xyEAbTgLhz9
|
||||
+lLPjBGhBvfRpW+7naPqkTcIKxpVR8Khq6fsvThGCNzNkGa46F1srE3mf1zC9wdVR
|
||||
+VtXO7gHEZ2LrNcl195jZkBQOLcXANcSOFh5eRfhumULmk4XgCGmZQT5UNFofqOmn
|
||||
+aWQGBq3XaU7RWjl7RH+IS2EW0rAtz9Le+cH+j0aFhzo7jBMOxGYG62rUaHdxssjV
|
||||
+S1CrfpYT6NeG5i/1hiP4hO9suezJw4yuXNZ3ABEBAAG0VkNlbnRPUyBFeHRyYXMg
|
||||
+U0lHIChodHRwczovL3dpa2kuY2VudG9zLm9yZy9TcGVjaWFsSW50ZXJlc3RHcm91
|
||||
+cCkgPHNlY3VyaXR5QGNlbnRvcy5vcmc+iQE5BBMBCgAjAhsvBwsJCAcDAgEGFQgC
|
||||
+CQoLBBYCAwECHgECF4AFAmIePKwACgkQH/aiFx2ZdmgUpAgAt1Y139EUQOLd013m
|
||||
+jZx3shUVHRWCU0SaWLuXLupdxqhe/Iygen48aiDWfAtWr9neAJKKZFboDXXPyxDy
|
||||
+9529aDgJnjwGRSFAcmvsuMaEMse6PZepTFtwhg2A/N0sDLVJSWagbQmTHdpkgEwn
|
||||
+rrwO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/aiFx2ZdmgN/gf+PEUa1LT98RS28fyNPaXYGx5vLWYxUtAdeN9a
|
||||
+TfugGHCVhVsowbIEnuFUHE1JmTJ1hDaFYXqkgG9zDo81JVz/yCHpNIQO0YF2h+qX
|
||||
+BXiKP7PQ+iT/PjQHidlYUuz73hjDwRl3AhLafcwVHeD3cCgo/ZP/Vi9Y9iBFVZDl
|
||||
+jGHxAIe0PWbEAUuqNJOgrlVmmCtSqVkN1Neihx1zjpw3rqfUQzwvhvcsOfkKfnBs
|
||||
+Boc66IZ0J5pmSzgJnSbLrr2dv1/jYHaolA24vkMqMxKzJbz+GeQ/SqBZ5/rA37VL
|
||||
+x90Tu9UVSfbyEbwS9Zj1sVmc3mdm1kn6dmTlOfTDIqehfHBlnQ==
|
||||
+=jx2B
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
diff --git a/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-centosofficial b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-centosofficial
|
||||
new file mode 100644
|
||||
index 00000000..30235a86
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/files/distro/centos/rpm-gpg/9/RPM-GPG-KEY-centosofficial
|
||||
@@ -0,0 +1,30 @@
|
||||
+-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
+Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
+
|
||||
+mQINBFzMWxkBEADHrskpBgN9OphmhRkc7P/YrsAGSvvl7kfu+e9KAaU6f5MeAVyn
|
||||
+rIoM43syyGkgFyWgjZM8/rur7EMPY2yt+2q/1ZfLVCRn9856JqTIq0XRpDUe4nKQ
|
||||
+8BlA7wDVZoSDxUZkSuTIyExbDf0cpw89Tcf62Mxmi8jh74vRlPy1PgjWL5494b3X
|
||||
+5fxDidH4bqPZyxTBqPrUFuo+EfUVEqiGF94Ppq6ZUvrBGOVo1V1+Ifm9CGEK597c
|
||||
+aevcGc1RFlgxIgN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+q4HTqyVpyuzMXsFpJ9L/FqH2DJ4exGGpBv00ba/Zauy7GsqOc5PnNBsYaHCply0X
|
||||
+407DRx51t9YwYI/ttValuehq9+gRJpOTTKp6AjZn/a5Yt3h6jDgpNfM/EyLFIY9z
|
||||
+V6CXqQQ/8JRvaik/JsGCf+eeLZOw4koIjZGEAg04iuyNTjhx0e/QHEVcYAqNLhXG
|
||||
+rCTTbCn3NSUO9qxEXC+K/1m1kaXoCGA0UWlVGZ1JSifbbMx0yxq/brpEZPUYm+32
|
||||
+o8XfbocBWljFUJ+6aljTvZ3LQLKTSPW7TFO+GXycAOmCGhlXh2tlc6iTc41PACqy
|
||||
+yy+mHmSv
|
||||
+=kkH7
|
||||
+-----END PGP PUBLIC KEY BLOCK-----
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,53 +0,0 @@
|
||||
From fe6d00b01d667a23964fe273a15ee9e457f85bf7 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 7 May 2025 21:13:04 +0200
|
||||
Subject: [PATCH 36/37] Deprecate is_rhel_alt from share libraries
|
||||
|
||||
The function has no value anymore as RHEL-ALT 7 is EOL for years
|
||||
and RHEL 7 is not longer maintained in this project neither.
|
||||
I have considered the direct removal as this function is really
|
||||
old (it's not even used anywhere in the project anymore).
|
||||
|
||||
But as it is just one small function without additional impact
|
||||
and another rhel-alt artifacts became deprecated this month,
|
||||
I consider it better to fulfill our promise and add it on the
|
||||
deprecation list for 6months instead.
|
||||
|
||||
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
||||
---
|
||||
docs/source/libraries-and-api/deprecations-list.md | 2 ++
|
||||
repos/system_upgrade/common/libraries/config/version.py | 5 +++++
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/docs/source/libraries-and-api/deprecations-list.md b/docs/source/libraries-and-api/deprecations-list.md
|
||||
index c8489af3..b3abfc5d 100644
|
||||
--- a/docs/source/libraries-and-api/deprecations-list.md
|
||||
+++ b/docs/source/libraries-and-api/deprecations-list.md
|
||||
@@ -16,6 +16,8 @@ Only the versions in which a deprecation has been made are listed.
|
||||
|
||||
- Shared libraries
|
||||
- **`leapp.libraries.common.config.version.SUPPORTED_VERSIONS`** - The `SUPPORTED_VERSIONS` dict has been deprecated as it is problematic with the new design. Use `leapp.libraries.common.config.version.is_supported_version()` or `IPUConfig.supported_upgrade_paths` instead.
|
||||
+ - **`leapp.libraries.common.config.version.is_rhel_alt()`** - The function can return only `False` nowadays as RHEL-ALT 7 is EOL for years and future version of leapp-repository will not support RHEL 7 anymore.
|
||||
+
|
||||
|
||||
## v0.20.0 <span style="font-size:0.5em; font-weight:normal">(till September 2024)</span>
|
||||
- Models
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/version.py b/repos/system_upgrade/common/libraries/config/version.py
|
||||
index 4b6e616c..7f29c9cd 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/version.py
|
||||
@@ -314,6 +314,11 @@ def is_sap_hana_flavour():
|
||||
return api.current_actor().configuration.flavour == 'saphana'
|
||||
|
||||
|
||||
+@deprecated(since='2025-05-31', message=(
|
||||
+ 'RHEL-ALT reached EOL years ago and it is connected just to RHEL 7 systems.'
|
||||
+ 'As such the function is useless nowadays and will return always False.'
|
||||
+ 'The function is going to be removed in the next leapp-repository release.'
|
||||
+))
|
||||
def is_rhel_alt():
|
||||
"""
|
||||
Check if the current system is RHEL-ALT or not (only for RHEL 7)
|
||||
--
|
||||
2.49.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,91 +0,0 @@
|
||||
From 397975d6b63ff70755ea41b8ec8fc413966218e4 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 30 May 2025 14:13:35 +0200
|
||||
Subject: [PATCH 38/43] Makefile: Non-zero exit code on failed tests in
|
||||
container
|
||||
|
||||
Previously all exit codes from execution of tests inside
|
||||
container have been ignored and make command ended with zero always.
|
||||
|
||||
Also drop testing of el7toel8 repository for Python 3.6 on RHEL 8.
|
||||
The test started to fail for unknown reason (changes in pytest or
|
||||
another nonstandard python module?). As we are in the middle of
|
||||
dropping all el7toel8 and python2 related content, let's just drop
|
||||
it. Keeping the full removal of Py2 and el7toel8 content on separate
|
||||
PR.
|
||||
---
|
||||
Makefile | 29 ++++++++++++++++-------------
|
||||
1 file changed, 16 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ceb013ab..6769b2f3 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -164,9 +164,9 @@ help:
|
||||
@echo " PR=7 SUFFIX='my_additional_suffix' make <target>"
|
||||
@echo " MR=6 COPR_CONFIG='path/to/the/config/copr/file' make <target>"
|
||||
@echo " ACTOR=<actor> TEST_LIBS=y make test"
|
||||
- @echo " BUILD_CONTAINER=el7 make build_container"
|
||||
+ @echo " BUILD_CONTAINER=rhel8 make build_container"
|
||||
@echo " TEST_CONTAINER=f34 make test_container"
|
||||
- @echo " CONTAINER_TOOL=docker TEST_CONTAINER=rhel7 make test_container_no_lint"
|
||||
+ @echo " CONTAINER_TOOL=docker TEST_CONTAINER=rhel8 make test_container_no_lint"
|
||||
@echo ""
|
||||
|
||||
clean:
|
||||
@@ -459,30 +459,33 @@ test_container:
|
||||
$(_CONTAINER_TOOL) ps -q -f name=$$_CONT_NAME && { $(_CONTAINER_TOOL) kill $$_CONT_NAME; $(_CONTAINER_TOOL) rm $$_CONT_NAME; }; \
|
||||
$(_CONTAINER_TOOL) run -di --name $$_CONT_NAME -v "$$PWD":/repo:Z -e PYTHON_VENV=$$_VENV $$TEST_IMAGE && \
|
||||
$(_CONTAINER_TOOL) exec $$_CONT_NAME rsync -aur --delete --exclude "tut*" /repo/ /repocopy && \
|
||||
+ export res=0; \
|
||||
case $$_VENV in \
|
||||
python2.7) \
|
||||
- TEST_CONT_IPU=el7toel8 $(MAKE) _test_container_ipu; \
|
||||
+ TEST_CONT_IPU=el7toel8 $(MAKE) _test_container_ipu || res=1; \
|
||||
;;\
|
||||
python3.6) \
|
||||
- TEST_CONT_IPU=el7toel8 $(MAKE) _test_container_ipu; \
|
||||
- TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu; \
|
||||
+ echo "INFO: Skipping testing of el7toel8 repository. Obsoleted"; \
|
||||
+ TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu || res=1; \
|
||||
;; \
|
||||
python3.9) \
|
||||
- TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu; \
|
||||
- TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu; \
|
||||
+ TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu || res=1; \
|
||||
+ TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu || res=1; \
|
||||
;; \
|
||||
python3.12) \
|
||||
- TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu; \
|
||||
+ TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu || res=1; \
|
||||
;; \
|
||||
*) \
|
||||
- TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu; \
|
||||
- ;;\
|
||||
+ TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu || res=1; \
|
||||
+ ;; \
|
||||
esac; \
|
||||
$(_CONTAINER_TOOL) kill $$_CONT_NAME; \
|
||||
- $(_CONTAINER_TOOL) rm $$_CONT_NAME
|
||||
+ $(_CONTAINER_TOOL) rm $$_CONT_NAME; \
|
||||
+ [ $$res -ne 0 ] && echo "TIP: If you do not see an error in the end of logs, scroll up. Multiple tests could be executed." ; \
|
||||
+ exit $$res
|
||||
|
||||
test_container_all:
|
||||
- @for container in "f34" "rhel7" "rhel8"; do \
|
||||
+ @for container in "f34" "rhel7" "rhel8" "rhel9"; do \
|
||||
TEST_CONTAINER=$$container $(MAKE) test_container || exit 1; \
|
||||
done
|
||||
|
||||
@@ -490,7 +493,7 @@ test_container_no_lint:
|
||||
@_TEST_CONT_TARGET="test_no_lint" $(MAKE) test_container
|
||||
|
||||
test_container_all_no_lint:
|
||||
- @for container in "f34" "rhel7" "rhel8"; do \
|
||||
+ @for container in "f34" "rhel7" "rhel8" "rhel9"; do \
|
||||
TEST_CONTAINER=$$container $(MAKE) test_container_no_lint || exit 1; \
|
||||
done
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 4e87908b2e17d87b69bcec29ba1e9b777439a0fe Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 30 May 2025 15:02:53 +0200
|
||||
Subject: [PATCH 39/43] CI: Unit-tests: Rename tasks & tests executions
|
||||
|
||||
Previous name have been very long, repeating, and it has been
|
||||
problem to read the whole informatino about what tests are performed
|
||||
as the description has been shortened in WebUI, e.g.:
|
||||
|
||||
Unit Tests / Run unit tests in containers (Run python linters for el8toel9 and common repositories on p...
|
||||
|
||||
Let's change the name so it's shortened and easier read what test
|
||||
has been actually performed. Also, no need to mention that tests are
|
||||
running in container anymore, as we are not running unit-tests outside
|
||||
of the container in upstream. Example of new style names:
|
||||
|
||||
Unit Tests / Run: Linters (python:3.9; repos:el9toel10,common) (pull_request)
|
||||
Unit Tests / Run: Unit Tests (python:3.9; repos:el9toel10,common) (pull_request)
|
||||
---
|
||||
.github/workflows/unit-tests.yml | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
|
||||
index 37748396..ed82e0e5 100644
|
||||
--- a/.github/workflows/unit-tests.yml
|
||||
+++ b/.github/workflows/unit-tests.yml
|
||||
@@ -9,43 +9,43 @@ on:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
- name: Run unit tests in containers
|
||||
+ name: 'Run: ${{ matrix.scenarios.name }}'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
scenarios:
|
||||
# 9to10
|
||||
- - name: Run unit tests for el9toel10 and common repositories on python 3.12
|
||||
+ - name: 'Unit tests (python:3.12; repos:el9toel10,common)'
|
||||
python: python3.12
|
||||
repos: 'el9toel10,common'
|
||||
container: ubi9
|
||||
- - name: Run python linters for el9toel10 and common repositories on python 3.12
|
||||
+ - name: 'Linters (python:3.12; repos:el9toel10,common)'
|
||||
python: python3.12
|
||||
repos: 'el9toel10,common'
|
||||
container: ubi9-lint
|
||||
- - name: Run unit tests for el9toel10 and common repositories on python 3.9
|
||||
+ - name: 'Unit tests (python:3.9; repos:el9toel10,common)'
|
||||
python: python3.9
|
||||
repos: 'el9toel10,common'
|
||||
container: ubi9
|
||||
- - name: Run python linters for el9toel10 and common repositories on python 3.9
|
||||
+ - name: 'Linters (python:3.9; repos:el9toel10,common)'
|
||||
python: python3.9
|
||||
repos: 'el9toel10,common'
|
||||
container: ubi9-lint
|
||||
# 8to9
|
||||
- - name: Run unit tests for el8toel9 and common repositories on python 3.9
|
||||
+ - name: 'Unit tests (python:3.9; repos:el8toel9,common)'
|
||||
python: python3.9
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi9
|
||||
- - name: Run python linters for el8toel9 and common repositories on python 3.9
|
||||
+ - name: 'Linters (python:3.9; repos:el8toel9,common)'
|
||||
python: python3.9
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi9-lint
|
||||
- - name: Run unit tests for el8toel9 and common repositories on python 3.6
|
||||
+ - name: 'Unit tests (python:3.6; repos:el8toel9,common)'
|
||||
python: python3.6
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi8
|
||||
- - name: Run python linters for el8toel9 and common repositories on python 3.6
|
||||
+ - name: 'Linters (python:3.6; repos:el8toel9,common)'
|
||||
python: python3.6
|
||||
repos: 'el8toel9,common'
|
||||
container: ubi8-lint
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,166 +0,0 @@
|
||||
From 2646484407bef15688fb4838c2f61d06f2098f81 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Wed, 30 Apr 2025 12:54:22 +0200
|
||||
Subject: [PATCH 40/43] Fix parsing of the kernel cmdline
|
||||
|
||||
Original parsing has been splitting string tokens by "=" without a
|
||||
limit, means that e.g.
|
||||
root=UUID=some-id
|
||||
has been split to
|
||||
(root, UUID, some-id)
|
||||
and and stored just "root" and "UUID" strings in the parsed msg,
|
||||
instead of "root" and "UUID=some-id".
|
||||
|
||||
So split the key=value just based on the first occurence of "="
|
||||
instead.
|
||||
|
||||
JIRA: RHELMISC-12490
|
||||
|
||||
Co-Authored-By: Karolina Kula <kkula@redhat.com>
|
||||
---
|
||||
.../common/actors/scankernelcmdline/actor.py | 16 ++---
|
||||
.../libraries/scankernelcmdline.py | 23 +++++++
|
||||
.../tests/test_scankernelcmdline.py | 67 +++++++++++++++++++
|
||||
3 files changed, 94 insertions(+), 12 deletions(-)
|
||||
create mode 100644 repos/system_upgrade/common/actors/scankernelcmdline/libraries/scankernelcmdline.py
|
||||
create mode 100644 repos/system_upgrade/common/actors/scankernelcmdline/tests/test_scankernelcmdline.py
|
||||
|
||||
diff --git a/repos/system_upgrade/common/actors/scankernelcmdline/actor.py b/repos/system_upgrade/common/actors/scankernelcmdline/actor.py
|
||||
index 9f8fef30..2f1a5ae2 100644
|
||||
--- a/repos/system_upgrade/common/actors/scankernelcmdline/actor.py
|
||||
+++ b/repos/system_upgrade/common/actors/scankernelcmdline/actor.py
|
||||
@@ -1,12 +1,12 @@
|
||||
from leapp.actors import Actor
|
||||
-from leapp.libraries.stdlib import run
|
||||
-from leapp.models import KernelCmdline, KernelCmdlineArg
|
||||
+from leapp.libraries.actor import scankernelcmdline
|
||||
+from leapp.models import KernelCmdline
|
||||
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||||
|
||||
|
||||
class ScanKernelCmdline(Actor):
|
||||
"""
|
||||
- No documentation has been provided for the scan_kernel_cmdline actor.
|
||||
+ Scan the kernel command line of the booted system.
|
||||
"""
|
||||
|
||||
name = 'scan_kernel_cmdline'
|
||||
@@ -15,12 +15,4 @@ class ScanKernelCmdline(Actor):
|
||||
tags = (FactsPhaseTag, IPUWorkflowTag)
|
||||
|
||||
def process(self):
|
||||
- cmdline = run(['cat', '/proc/cmdline'])['stdout'].strip()
|
||||
- parameters = []
|
||||
- for parameter in cmdline.split(' '):
|
||||
- if '=' in parameter:
|
||||
- kv = parameter.split('=')
|
||||
- parameters.append(KernelCmdlineArg(key=kv[0], value=kv[1]))
|
||||
- else:
|
||||
- parameters.append(KernelCmdlineArg(key=parameter))
|
||||
- self.produce(KernelCmdline(parameters=parameters))
|
||||
+ scankernelcmdline.parse_cmdline_input()
|
||||
diff --git a/repos/system_upgrade/common/actors/scankernelcmdline/libraries/scankernelcmdline.py b/repos/system_upgrade/common/actors/scankernelcmdline/libraries/scankernelcmdline.py
|
||||
new file mode 100644
|
||||
index 00000000..9cffa70e
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scankernelcmdline/libraries/scankernelcmdline.py
|
||||
@@ -0,0 +1,23 @@
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||||
+from leapp.models import KernelCmdline, KernelCmdlineArg
|
||||
+
|
||||
+
|
||||
+def get_cmdline_input():
|
||||
+ try:
|
||||
+ cmdline_input = run(['cat', '/proc/cmdline'])['stdout'].strip()
|
||||
+ return cmdline_input
|
||||
+ except (OSError, CalledProcessError):
|
||||
+ api.current_logger().debug('Executing `cat /proc/cmdline` failed', exc_info=True)
|
||||
+ return ''
|
||||
+
|
||||
+
|
||||
+def parse_cmdline_input():
|
||||
+ cmdline = get_cmdline_input()
|
||||
+ parameters = []
|
||||
+ for parameter in cmdline.split(' '):
|
||||
+ if '=' in parameter:
|
||||
+ kv = parameter.split('=', 1)
|
||||
+ parameters.append(KernelCmdlineArg(key=kv[0], value=kv[1]))
|
||||
+ else:
|
||||
+ parameters.append(KernelCmdlineArg(key=parameter))
|
||||
+ api.produce(KernelCmdline(parameters=parameters))
|
||||
diff --git a/repos/system_upgrade/common/actors/scankernelcmdline/tests/test_scankernelcmdline.py b/repos/system_upgrade/common/actors/scankernelcmdline/tests/test_scankernelcmdline.py
|
||||
new file mode 100644
|
||||
index 00000000..ff79054f
|
||||
--- /dev/null
|
||||
+++ b/repos/system_upgrade/common/actors/scankernelcmdline/tests/test_scankernelcmdline.py
|
||||
@@ -0,0 +1,67 @@
|
||||
+import pytest
|
||||
+
|
||||
+from leapp.libraries.actor import scankernelcmdline
|
||||
+from leapp.libraries.common.testutils import CurrentActorMocked, produce_mocked
|
||||
+from leapp.libraries.stdlib import api, CalledProcessError
|
||||
+from leapp.models import KernelCmdline, KernelCmdlineArg
|
||||
+
|
||||
+
|
||||
+def mock_cmd_output():
|
||||
+ expected_cmd_output = (
|
||||
+ 'BOOT_IMAGE=(hd0,msdos1)/vmlinuz-xxx root=UUID=some_uid ro console=tty0'
|
||||
+ ' console=ttyS0,115200 rd_NO_PLYMOUTH biosdevname=0 net.ifnames=0 crashkernel=auto'
|
||||
+ )
|
||||
+ return expected_cmd_output
|
||||
+
|
||||
+
|
||||
+def test_cmdline_output(monkeypatch):
|
||||
+
|
||||
+ monkeypatch.setattr(scankernelcmdline, 'get_cmdline_input', mock_cmd_output)
|
||||
+ current_actor = CurrentActorMocked(src_ver='8.10', dst_ver='9.6')
|
||||
+ monkeypatch.setattr(api, 'current_actor', current_actor)
|
||||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||||
+
|
||||
+ scankernelcmdline.parse_cmdline_input()
|
||||
+
|
||||
+ expected_params = [KernelCmdlineArg(key=k, value=v) for k, v in [
|
||||
+ ('BOOT_IMAGE', '(hd0,msdos1)/vmlinuz-xxx'),
|
||||
+ ('root', 'UUID=some_uid'),
|
||||
+ ('ro', None),
|
||||
+ ('console', 'tty0'),
|
||||
+ ('console', 'ttyS0,115200'),
|
||||
+ ('rd_NO_PLYMOUTH', None),
|
||||
+ ('biosdevname', '0'),
|
||||
+ ('net.ifnames', '0'),
|
||||
+ ('crashkernel', 'auto')]]
|
||||
+
|
||||
+ expected_output_msg = KernelCmdline(parameters=expected_params)
|
||||
+ assert api.produce.model_instances
|
||||
+ assert expected_output_msg == api.produce.model_instances[0]
|
||||
+
|
||||
+
|
||||
+def test_cmdline_content(monkeypatch):
|
||||
+
|
||||
+ def run_mocked(cmd, **kwargs):
|
||||
+ assert cmd == ['cat', '/proc/cmdline']
|
||||
+ output = mock_cmd_output()
|
||||
+ return {'stdout': output}
|
||||
+
|
||||
+ monkeypatch.setattr(scankernelcmdline, 'run', run_mocked)
|
||||
+ cmd_output = scankernelcmdline.get_cmdline_input()
|
||||
+ expected_cmd_output = mock_cmd_output()
|
||||
+
|
||||
+ assert cmd_output == expected_cmd_output
|
||||
+
|
||||
+
|
||||
+@pytest.mark.parametrize('is_os_error', [True, False])
|
||||
+def test_cmdline_run_failed(monkeypatch, is_os_error):
|
||||
+
|
||||
+ def run_mocked_error(cmd, **kwargs):
|
||||
+ assert cmd == ['cat', '/proc/cmdline']
|
||||
+ if is_os_error:
|
||||
+ raise OSError('OSError raised')
|
||||
+ raise CalledProcessError("CalledProcessError raised", cmd, "result")
|
||||
+
|
||||
+ monkeypatch.setattr(scankernelcmdline, 'run', run_mocked_error)
|
||||
+ cmd_output = scankernelcmdline.get_cmdline_input()
|
||||
+ assert cmd_output == ''
|
||||
--
|
||||
2.49.0
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,28 +0,0 @@
|
||||
From 6c205281850c28068edc7fc5ab453c65398b7054 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Stodulka <pstodulk@redhat.com>
|
||||
Date: Fri, 30 May 2025 18:28:25 +0200
|
||||
Subject: [PATCH 43/43] unit-tests: suppress deprecation warning for
|
||||
is_rhel_alt()
|
||||
|
||||
The deprecation warning is not wanted in unit-tests. Supress it.
|
||||
|
||||
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
||||
---
|
||||
.../system_upgrade/common/libraries/config/tests/test_version.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/config/tests/test_version.py b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
index 420571c0..d51f8098 100644
|
||||
--- a/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
+++ b/repos/system_upgrade/common/libraries/config/tests/test_version.py
|
||||
@@ -108,6 +108,7 @@ def test_matches_target_version(monkeypatch, result, version_list):
|
||||
(False, '4.14.0-100.8.2.el8.x86_64', 'rhel', '8.1'),
|
||||
(False, '4.14.0-100.8.2.el9.x86_64', 'rhel', '9.1'),
|
||||
])
|
||||
+@suppress_deprecation(version.is_rhel_alt)
|
||||
def test_is_rhel_alt(monkeypatch, result, kernel, release_id, src_ver):
|
||||
monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(src_ver=src_ver, kernel=kernel,
|
||||
release_id=release_id))
|
||||
--
|
||||
2.49.0
|
||||
|
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
|
@ -7,19 +7,9 @@
|
||||
%if 0%{?rhel} == 7
|
||||
%define leapp_python_sitelib %{python2_sitelib}
|
||||
%define lpr_name leapp-upgrade-el7toel8
|
||||
%define repo_shortname el7toel8
|
||||
%define next_major_ver 8
|
||||
%else
|
||||
%define leapp_python_sitelib %{python3_sitelib}
|
||||
%if 0%{?rhel} == 8
|
||||
%define lpr_name leapp-upgrade-el8toel9
|
||||
%define repo_shortname el8toel9
|
||||
%define next_major_ver 9
|
||||
%else
|
||||
%define lpr_name leapp-upgrade-el9toel10
|
||||
%define repo_shortname el9toel10
|
||||
%define next_major_ver 10
|
||||
%endif
|
||||
%define lpr_name leapp-upgrade-el8toel9
|
||||
|
||||
# This drops autogenerated deps on
|
||||
# - /usr/libexec/platform-python (rhel-8 buildroot)
|
||||
@ -51,14 +41,14 @@ py2_byte_compile "%1" "%2"}
|
||||
# RHEL 8+ packages to be consistent with other leapp projects in future.
|
||||
|
||||
Name: leapp-repository
|
||||
Version: 0.22.0
|
||||
Version: 0.20.0
|
||||
Release: 4%{?dist}
|
||||
Summary: Repositories for leapp
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://oamg.github.io/leapp/
|
||||
Source0: https://github.com/oamg/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source1: deps-pkgs-13.tar.gz
|
||||
Source1: deps-pkgs-10.tar.gz
|
||||
|
||||
# NOTE: Our packages must be noarch. Do no drop this in any way.
|
||||
BuildArch: noarch
|
||||
@ -66,51 +56,56 @@ BuildArch: noarch
|
||||
### PATCHES HERE
|
||||
# Patch0001: filename.patch
|
||||
|
||||
Patch0001: 0001-Use-leapp.libraries.common.rpms.get_leapp_packages-w.patch
|
||||
Patch0002: 0002-fix-spell-AllowZoneDrifting-correctly.patch
|
||||
Patch0003: 0003-cli-upgrade-allow-users-to-enable-entire-experimenta.patch
|
||||
Patch0004: 0004-feat-livemode-exclude-DNF-cache-from-the-created-squ.patch
|
||||
Patch0005: 0005-livemode-cfg-add-declaration-of-livemode-config-fiel.patch
|
||||
Patch0006: 0006-livemode-cfg-use-framework-s-configurability-instead.patch
|
||||
Patch0007: 0007-fix-livemode-do-not-stop-if-dbus-already-appears-to-.patch
|
||||
Patch0008: 0008-feat-livemode-remove-the-use-of-LEAPP_DEVEL_ENABLE_L.patch
|
||||
Patch0009: 0009-spec-require-leapp-framework-6.1-for-default-CLI-val.patch
|
||||
Patch0010: 0010-docs-configuring-ipu-add-experimental-features-secti.patch
|
||||
Patch0011: 0011-docs-livemode-add-LiveMode-documentation.patch
|
||||
Patch0012: 0012-DOC-rename-configuring-ipu.md-to-envars.md.patch
|
||||
Patch0013: 0013-fix-userspacegen-add-exeception-handling-to-swapping.patch
|
||||
Patch0014: 0014-selinux-do-not-run-semodule-when-no-modules-are-sele.patch
|
||||
Patch0015: 0015-feat-ipuconfig-provide-info-about-supported-upgrade-.patch
|
||||
Patch0016: 0016-feat-upgrade_paths-include-information-about-distro-.patch
|
||||
Patch0017: 0017-cleanup-ipupaths-remove-IPUPaths-message.patch
|
||||
Patch0018: 0018-libs-version-use-supported_upgrade_paths.patch
|
||||
Patch0019: 0019-Remove-7to8-CI-tests.patch
|
||||
Patch0020: 0020-Fix-lint-in-Makefile-for-docs.patch
|
||||
Patch0021: 0021-Improve-report-of-removed-kernel-drivers.patch
|
||||
Patch0022: 0022-Improve-report-of-unsupported-network-configuration.patch
|
||||
Patch0023: 0023-DOCS-add-missing-envar-LEAPP_OVL_IMG_FS_EXT4.patch
|
||||
Patch0024: 0024-data-update-data-files-stream-3.3-1358.patch
|
||||
Patch0025: 0025-Add-RHEL-10.1-and-9.7-product-certificates.patch
|
||||
Patch0026: 0026-Add-handling-of-shorten-PCI-ID-and-lowercases.patch
|
||||
Patch0027: 0027-Prevent-device-list-from-containing-incorrent-conten.patch
|
||||
Patch0028: 0028-feat-command_utils-allow-missing-minor-major-version.patch
|
||||
Patch0029: 0029-refactor-versions-config-rename-_simple_versions.patch
|
||||
Patch0030: 0030-fix-lib-version-broken-_validate_version-on-RHEL-10.patch
|
||||
Patch0031: 0031-upgrade_paths-add-information-about-centos-virtual-v.patch
|
||||
Patch0032: 0032-models-ipuconfig-extend-Version-class-to-contain-vir.patch
|
||||
Patch0033: 0033-libs-common-version-autocorrect-centos-versions-into.patch
|
||||
Patch0034: 0034-Introduce-distro-based-rpm-gpg-trusted-directory.patch
|
||||
Patch0035: 0035-Add-official-Centos-Stream-9-and-10-RPM-GPG-keys.patch
|
||||
Patch0036: 0036-Deprecate-is_rhel_alt-from-share-libraries.patch
|
||||
Patch0037: 0037-data-update-data-files-stream-3.3-1380.patch
|
||||
Patch0001: 0001-rhui-do-not-bootstrap-target-client-on-aws.patch
|
||||
Patch0002: 0002-Packit-Drop-tests-for-obsoleted-upgrade-paths-restru.patch
|
||||
Patch0003: 0003-silence-use-yield-from-from-pylint-3.1.patch
|
||||
Patch0004: 0004-rocescanner-Actually-call-process-in-test_roce_notib.patch
|
||||
Patch0005: 0005-Fix-incorrect-parsing-of-lscpu-output.patch
|
||||
Patch0006: 0006-Add-unit-tests-for-actor-udevamdinfo.patch
|
||||
Patch0007: 0007-Add-unit-tests-for-scansourcefiles-actor-1190.patch
|
||||
Patch0008: 0008-pes_events_scanner-overwrite-repositories-when-apply.patch
|
||||
Patch0009: 0009-Modify-upgrade-not-terminate-after-lockfile-detected.patch
|
||||
Patch0010: 0010-Make-the-reboot-required-text-more-visible-in-the-co.patch
|
||||
Patch0011: 0011-check_grub_legacy-inhibit-when-GRUB-legacy-is-presen.patch
|
||||
Patch0012: 0012-Default-channel-to-GA-is-not-specified-otherwise-120.patch
|
||||
Patch0013: 0013-Enhance-grub2-install-failure-message.patch
|
||||
Patch0014: 0014-boot-check-first-partition-offset-on-GRUB-devices.patch
|
||||
Patch0015: 0015-boot-Skip-checks-of-first-partition-offset-for-for-g.patch
|
||||
Patch0016: 0016-repomapping-Add-RHEL7-ELS-repos.patch
|
||||
Patch0017: 0017-bump-required-repomap-version.patch
|
||||
Patch0018: 0018-fixup-bump-required-repomap-version.patch
|
||||
Patch0019: 0019-Fix-incorrect-command-formulation.patch
|
||||
Patch0020: 0020-mention-Report-in-produces-of-transitionsystemdservi.patch
|
||||
Patch0021: 0021-Update-packit-config-after-tier-redefinition.patch
|
||||
Patch0022: 0022-Update-reboot-msg-Note-the-console-access.patch
|
||||
Patch0023: 0023-Fix-kernel-cmdline-args-we-add-not-being-propogated-.patch
|
||||
Patch0024: 0024-kernelcmdlineconfig-add-newline-in-etc-kernel-cmdlin.patch
|
||||
Patch0025: 0025-Data-Update-DDDD.json-fixed-incorrect-data-add-craft.patch
|
||||
Patch0026: 0026-Data-Update-PES-data-to-cover-up-to-date-changes.patch
|
||||
Patch0027: 0027-Move-common-Satellite-Upgrade-code-to-common.patch
|
||||
Patch0028: 0028-Add-el8toel9-upgrade-facts-for-Satellite.patch
|
||||
Patch0029: 0029-Refresh-collation-version-if-pulp-ansible-is-present.patch
|
||||
Patch0030: 0030-Refactor-satellite_upgrade_services-to-use-SystemdSe.patch
|
||||
Patch0031: 0031-mount-usr-Implement-try-sleep-loop-add-time-for-stor.patch
|
||||
Patch0032: 0032-Add-additional-KB-resources.patch
|
||||
Patch0033: 0033-storage-initialisation-apply-sleep-always.patch
|
||||
Patch0034: 0034-Add-renovate-to-track-github-actions-deps.patch
|
||||
Patch0035: 0035-chore-deps-update-redhat-plumbers-in-action-differen.patch
|
||||
Patch0036: 0036-chore-deps-update-actions-checkout-action-to-v4.patch
|
||||
Patch0037: 0037-chore-deps-update-dependency-ubuntu-to-v22.patch
|
||||
Patch0038: 0038-Fix-E0606-errors-reported-by-pylint.patch
|
||||
Patch0039: 0039-Fix-W0135-reported-by-pylint.patch
|
||||
Patch0040: 0040-chore-deps-update-peter-evans-create-or-update-comme.patch
|
||||
Patch0041: 0041-properly-indent-the-list-of-supported-OSes.patch
|
||||
Patch0042: 0042-report-which-OS-release-was-detected-as-unsupported.patch
|
||||
Patch0043: 0043-Fix-typo-in-.packit.yaml.patch
|
||||
Patch0044: 0044-drop-unused-packager-field-from-distro-metadata.patch
|
||||
Patch0045: 0045-Add-environment-information-to-leappdb.patch
|
||||
Patch0046: 0046-chore-deps-update-actions-github-script-action-to-v7.patch
|
||||
Patch0047: 0047-fix-some-typos-spotted-by-codespell.patch
|
||||
Patch0048: 0048-BZ-2283067-don-t-remove-Tomcat-during-Satellite-7to8.patch
|
||||
Patch0049: 0049-Add-product-certs-and-target-for-9.5.patch
|
||||
|
||||
# CTC1 Candidate2
|
||||
Patch0038: 0038-Makefile-Non-zero-exit-code-on-failed-tests-in-conta.patch
|
||||
Patch0039: 0039-CI-Unit-tests-Rename-tasks-tests-executions.patch
|
||||
Patch0040: 0040-Fix-parsing-of-the-kernel-cmdline.patch
|
||||
Patch0041: 0041-repomap-Process-repositories-based-on-distro.patch
|
||||
Patch0042: 0042-Update-the-upgrade-data-files-stream-4.0.patch
|
||||
Patch0043: 0043-unit-tests-suppress-deprecation-warning-for-is_rhel_.patch
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
@ -139,24 +134,14 @@ Obsoletes: leapp-repository-sos-plugin <= 0.10.0
|
||||
Conflicts: leapp-upgrade-el8toel9
|
||||
|
||||
%else
|
||||
######### RHEL 8+ (and newer) ############
|
||||
######### RHEL 8 ############
|
||||
BuildRequires: python3-devel
|
||||
Requires: python3-leapp
|
||||
|
||||
# NOTE(pstodulk): else if / elif has been implemented quite late. as we still
|
||||
# want to build on RHEL 7 too, go in the old way. Ref:
|
||||
# https://github.com/rpm-software-management/rpm/issues/311
|
||||
%if 0%{?rhel} == 8
|
||||
######### RHEL 8 ############
|
||||
|
||||
# Same as the conflict above - we want to be sure our packages are untouched
|
||||
# during the whole IPU process
|
||||
Conflicts: leapp-upgrade-el7toel8
|
||||
Conflicts: leapp-upgrade-el9toel10
|
||||
%else
|
||||
######### RHEL 9 ############
|
||||
Conflicts: leapp-upgrade-el8toel9
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
# IMPORTANT: every time the requirements are changed, increment number by one
|
||||
@ -165,7 +150,7 @@ Requires: leapp-repository-dependencies = %{leapp_repo_deps}
|
||||
|
||||
# IMPORTANT: this is capability provided by the leapp framework rpm.
|
||||
# Check that 'version' instead of the real framework rpm version.
|
||||
Requires: leapp-framework >= 6.1
|
||||
Requires: leapp-framework >= 5.0
|
||||
|
||||
# Since we provide sub-commands for the leapp utility, we expect the leapp
|
||||
# tool to be installed as well.
|
||||
@ -256,12 +241,6 @@ Requires: dracut
|
||||
Requires: NetworkManager-libnm
|
||||
Requires: python3-gobject-base
|
||||
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} == 9
|
||||
############# RHEL 9 dependencies (when the source system is RHEL 9) ##########
|
||||
# Required to convert pam_userdb database from BerkeleyDB to GDBM
|
||||
Requires: libdb-utils
|
||||
%endif
|
||||
##################################################
|
||||
# end requirement
|
||||
@ -277,54 +256,64 @@ Requires: libdb-utils
|
||||
%setup -q -n %{name}-%{version} -D -T -a 1
|
||||
|
||||
# APPLY PATCHES HERE
|
||||
# %%patch -P 0001 -p1
|
||||
%patch -P 0001 -p1
|
||||
%patch -P 0002 -p1
|
||||
%patch -P 0003 -p1
|
||||
%patch -P 0004 -p1
|
||||
%patch -P 0005 -p1
|
||||
%patch -P 0006 -p1
|
||||
%patch -P 0007 -p1
|
||||
%patch -P 0008 -p1
|
||||
%patch -P 0009 -p1
|
||||
%patch -P 0010 -p1
|
||||
%patch -P 0011 -p1
|
||||
%patch -P 0012 -p1
|
||||
%patch -P 0013 -p1
|
||||
%patch -P 0014 -p1
|
||||
%patch -P 0015 -p1
|
||||
%patch -P 0016 -p1
|
||||
%patch -P 0017 -p1
|
||||
%patch -P 0018 -p1
|
||||
%patch -P 0019 -p1
|
||||
%patch -P 0020 -p1
|
||||
%patch -P 0021 -p1
|
||||
%patch -P 0022 -p1
|
||||
%patch -P 0023 -p1
|
||||
%patch -P 0024 -p1
|
||||
%patch -P 0025 -p1
|
||||
%patch -P 0026 -p1
|
||||
%patch -P 0027 -p1
|
||||
%patch -P 0028 -p1
|
||||
%patch -P 0029 -p1
|
||||
%patch -P 0030 -p1
|
||||
%patch -P 0031 -p1
|
||||
%patch -P 0032 -p1
|
||||
%patch -P 0033 -p1
|
||||
%patch -P 0034 -p1
|
||||
%patch -P 0035 -p1
|
||||
%patch -P 0036 -p1
|
||||
%patch -P 0037 -p1
|
||||
%patch -P 0038 -p1
|
||||
%patch -P 0039 -p1
|
||||
%patch -P 0040 -p1
|
||||
%patch -P 0041 -p1
|
||||
%patch -P 0042 -p1
|
||||
%patch -P 0043 -p1
|
||||
# %%patch0001 -p1
|
||||
%patch0001 -p1
|
||||
%patch0002 -p1
|
||||
%patch0003 -p1
|
||||
%patch0004 -p1
|
||||
%patch0005 -p1
|
||||
%patch0006 -p1
|
||||
%patch0007 -p1
|
||||
%patch0008 -p1
|
||||
%patch0009 -p1
|
||||
%patch0010 -p1
|
||||
%patch0011 -p1
|
||||
%patch0012 -p1
|
||||
%patch0013 -p1
|
||||
%patch0014 -p1
|
||||
%patch0015 -p1
|
||||
%patch0016 -p1
|
||||
%patch0017 -p1
|
||||
%patch0018 -p1
|
||||
%patch0019 -p1
|
||||
%patch0020 -p1
|
||||
%patch0021 -p1
|
||||
%patch0022 -p1
|
||||
%patch0023 -p1
|
||||
%patch0024 -p1
|
||||
%patch0025 -p1
|
||||
%patch0026 -p1
|
||||
%patch0027 -p1
|
||||
%patch0028 -p1
|
||||
%patch0029 -p1
|
||||
%patch0030 -p1
|
||||
%patch0031 -p1
|
||||
%patch0032 -p1
|
||||
%patch0033 -p1
|
||||
%patch0034 -p1
|
||||
%patch0035 -p1
|
||||
%patch0036 -p1
|
||||
%patch0037 -p1
|
||||
%patch0038 -p1
|
||||
%patch0039 -p1
|
||||
%patch0040 -p1
|
||||
%patch0041 -p1
|
||||
%patch0042 -p1
|
||||
%patch0043 -p1
|
||||
%patch0044 -p1
|
||||
%patch0045 -p1
|
||||
%patch0046 -p1
|
||||
%patch0047 -p1
|
||||
%patch0048 -p1
|
||||
%patch0049 -p1
|
||||
|
||||
|
||||
%build
|
||||
cp -a leapp*deps*el%{next_major_ver}.noarch.rpm repos/system_upgrade/%{repo_shortname}/files/bundled-rpms/
|
||||
%if 0%{?rhel} == 7
|
||||
cp -a leapp*deps*el8.noarch.rpm repos/system_upgrade/el7toel8/files/bundled-rpms/
|
||||
%else
|
||||
cp -a leapp*deps*el9.noarch.rpm repos/system_upgrade/el8toel9/files/bundled-rpms/
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
@ -332,15 +321,11 @@ install -m 0755 -d %{buildroot}%{custom_repositorydir}
|
||||
install -m 0755 -d %{buildroot}%{repositorydir}
|
||||
cp -r repos/* %{buildroot}%{repositorydir}/
|
||||
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/repos.d/
|
||||
# NOTE(pstodulk): drop transaction dir and its content if replaced by config files before RHEL 10
|
||||
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/transaction/
|
||||
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/files/
|
||||
install -m 0644 etc/leapp/transaction/* %{buildroot}%{_sysconfdir}/leapp/transaction
|
||||
install -m 0644 etc/leapp/files/* %{buildroot}%{_sysconfdir}/leapp/files
|
||||
|
||||
# uncomment to install existing configs if any exists
|
||||
#install -m 0644 etc/leapp/actor_conf.d/* %%{buildroot}%%{_sysconfdir}/leapp/actor_conf.d
|
||||
|
||||
# install CLI commands for the leapp utility on the expected path
|
||||
install -m 0755 -d %{buildroot}%{leapp_python_sitelib}/leapp/cli/
|
||||
cp -r commands %{buildroot}%{leapp_python_sitelib}/leapp/cli/
|
||||
@ -348,10 +333,11 @@ rm -rf %{buildroot}%{leapp_python_sitelib}/leapp/cli/commands/tests
|
||||
|
||||
# Remove irrelevant repositories - We don't want to ship them for the particular
|
||||
# RHEL version
|
||||
for i in el7toel8 el8toel9 el9toel10;
|
||||
do
|
||||
[ "$i" != "%{repo_shortname}" ] && rm -rf %{buildroot}%{repositorydir}/system_upgrade/$i
|
||||
done
|
||||
%if 0%{?rhel} == 7
|
||||
rm -rf %{buildroot}%{repositorydir}/system_upgrade/el8toel9
|
||||
%else
|
||||
rm -rf %{buildroot}%{repositorydir}/system_upgrade/el7toel8
|
||||
%endif
|
||||
|
||||
# remove component/unit tests, Makefiles, ... stuff that related to testing only
|
||||
rm -rf %{buildroot}%{repositorydir}/common/actors/testactor
|
||||
@ -359,9 +345,6 @@ find %{buildroot}%{repositorydir}/common -name "test.py" -delete
|
||||
rm -rf `find %{buildroot}%{repositorydir} -name "tests" -type d`
|
||||
find %{buildroot}%{repositorydir} -name "Makefile" -delete
|
||||
find %{buildroot} -name "*.py.orig" -delete
|
||||
# .gitkeep file is used to have a directory in the repo. but we do not want these
|
||||
# files in the resulting RPM
|
||||
find %{buildroot} -name .gitkeep -delete
|
||||
|
||||
for DIRECTORY in $(find %{buildroot}%{repositorydir}/ -mindepth 1 -maxdepth 1 -type d);
|
||||
do
|
||||
@ -390,8 +373,6 @@ done;
|
||||
%dir %{custom_repositorydir}
|
||||
%dir %{leapp_python_sitelib}/leapp/cli/commands
|
||||
%config %{_sysconfdir}/leapp/files/*
|
||||
# uncomment to package installed configs
|
||||
#%%config %%{_sysconfdir}/leapp/actor_conf.d/*
|
||||
%{_sysconfdir}/leapp/repos.d/*
|
||||
%{_sysconfdir}/leapp/transaction/*
|
||||
%{repositorydir}/*
|
||||
@ -402,93 +383,6 @@ done;
|
||||
# no files here
|
||||
|
||||
%changelog
|
||||
* Thu Jun 05 2025 Karolina Kula <kkula@redhat.com> - 0.22.0-4
|
||||
- Fix parsing of the kernel cmdline
|
||||
- Require leapp data with provided_data_streams 4.0+
|
||||
- Resolves: RHEL-67627
|
||||
|
||||
|
||||
* Wed May 14 2025 Petr Stodulka <pstodulk@redhat.com> - 0.22.0-3
|
||||
- Rebuild
|
||||
|
||||
* Tue May 13 2025 Petr Stodulka <pstodulk@redhat.com> - 0.22.0-2
|
||||
- Require leapp-framework >= 6.1
|
||||
- Simplified use of the LiveMode experimental feature with additional enhancements
|
||||
- Fix the check of deprecated PCI devices and drivers
|
||||
- Add RHEL 9.7 product certificates
|
||||
- Gracefully handle CentOS OS versioning style
|
||||
- Introduced the --enable-experimental-feature to simplify use of experimental features
|
||||
- Manage RPM GPG keys during the upgrade respecting used linux distributions
|
||||
- Minor fixes in reports
|
||||
- Prevent a crach during post-upgrade phases when no custom SELinux modules needs to be migrated
|
||||
- Update leapp upgrade data files
|
||||
- Resolves: RHEL-53801, RHEL-77945, RHEL-84978
|
||||
|
||||
* Fri Feb 14 2025 Petr Stodulka <pstodulk@redhat.com> - 0.22.0-1
|
||||
- Rebase to new upstream 0.22.0
|
||||
- Minor updates in generated reports
|
||||
- Resolves: RHEL-67621, RHEL-67719, RHEL-16881
|
||||
|
||||
* Wed Jan 29 2025 Petr Stodulka <pstodulk@redhat.com> - 0.21.0-6
|
||||
- Raise an inhibitor if unsupported target version supplied instead of error
|
||||
- Prevent a possible crash with LiveMode when adding the upgrade boot entry on systems with LVM
|
||||
- Fix the bootloader workaround for upgrades on ARM machines - covering also differences on AWS
|
||||
- Resolves: RHEL-67621, RHEL-51072, RHEL-41193
|
||||
|
||||
* Fri Jan 17 2025 Petr Stodulka <pstodulk@redhat.com> - 0.21.0-5
|
||||
- Fix pes events scanner crashing when there are duplicate packages in the received instructions
|
||||
- Fix pes events scanner not respecting user’s transaction configuration
|
||||
- Fix storage scanner crashing when command outputs contain colon character
|
||||
- Activate LVM VGs with `--sysinit` option to correct the use in the upgrade initramfs
|
||||
- Minor improvements in preupgrade reports
|
||||
- Resolves: RHEL-67621, RHEL-34570, RHEL-44596, RHEL-50076
|
||||
|
||||
* Tue Nov 19 2024 Matej Matuska <mmatuska@redhat.com> - 0.21.0-4
|
||||
- Use net.naming-scheme by default
|
||||
- Resolves: RHEL-23473
|
||||
|
||||
* Mon Nov 18 2024 Petr Stodulka <pstodulk@redhat.com> - 0.21.0-3
|
||||
- Introduce upgrade path 8.10 -> 9.6
|
||||
- Require leapp-framework 6.0+
|
||||
- Update leapp-deps package to satisfy leapp-framework-dependencies 6
|
||||
- Add possibility to use net.naming-scheme during the upgrade
|
||||
- Cap max size of the sparse files to 1TiB for storage with large amount of free space
|
||||
- Enable upgrade for systems with LUKS bound to Clevis with TPM 2.0 token
|
||||
- Adjust resource limitations for leapp to be able to perform the upgrade
|
||||
- Fix problems with the bootloader when upgrading to RHEL 9.6 on ARM
|
||||
- Fix the report when handling broken parsing of kernel cmdline
|
||||
- Generate proper error message instead of ModelViolationError when parsing invalid repository definition
|
||||
- Handle default kernel cmdline when multiple boot entries for the default kernel are defined
|
||||
- Introduce a possibility to configure leapp actors covering RHUI on clouds
|
||||
- Skip checking of (PKI) `directory-hash` dir to speedup the upgrade process and clean logs
|
||||
- Update leapp upgrade data files
|
||||
- Resolves: RHEL-67621, RHEL-57064, RHEL-56251, RHEL-50686, RHEL-41193
|
||||
- Resolves: RHEL-34570, RHEL-26459, RHEL-23473, RHEL-16881, RHEL-3294
|
||||
|
||||
* Mon Aug 19 2024 Petr Stodulka <pstodulk@redhat.com> - 0.21.0-2
|
||||
- Updated SPEC file to drop leapp repositories unrelated to IPU 8 -> 9
|
||||
- Resolves: RHEL-27847
|
||||
|
||||
* Fri Aug 16 2024 Toshio Kuratomi <toshio@fedoraproject.org> - 0.21.0-1
|
||||
- Rebase to new upstream 0.21.0
|
||||
- Updated leapp data files.
|
||||
- Inhibit the upgrade to RHEL 9.5 on ARM architecture due to
|
||||
incompatibility between the RHEL 8 bootloader and RHEL 9.5 kernel.
|
||||
- Introduce experimental upgrades in 'live' mode for the testing.
|
||||
- Resolves: RHEL-27847, RHEL-52993, RHEL-45280, RHEL-49748, RHEL-52186
|
||||
|
||||
* Wed Jul 24 2024 Toshio Kuratomi <toshio@fedoraproject.org> - 0.20.0-5
|
||||
- Improve set_systemd_services_states logging
|
||||
- [IPU 7 -> 8] Fix detection of bootable device on RAID
|
||||
- Fix detection of valid sshd config with internal-sftp subsystem in Leapp
|
||||
- Handle a false positive GPG check error when TargetUserSpaceInfo is missing
|
||||
- Fix failing "update-ca-trust" command caused by missing util-linux package
|
||||
- Improve report when a system is unsupported
|
||||
- Fix handling of versions in RHUI configuration for ELS and SAP upgrades
|
||||
- Add missing RHUI GCP config info for RHEL for SAP
|
||||
- Fix upgrade on aarch64 via RHUI on AWS
|
||||
- Resolves: RHEL-33902, RHEL-38909, RHEL-30573, RHEL-43978, RHEL-39046, RHEL-39047, RHEL-39049
|
||||
|
||||
* Thu May 30 2024 Petr Stodulka <pstodulk@redhat.com> - 0.20.0-4
|
||||
- Enable new upgrade path RHEL 8.10 -> 9.5
|
||||
- Minor updates in reports
|
4
plans/tier0.fmf
Normal file
4
plans/tier0.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
summary: Foo
|
||||
execute:
|
||||
script: leapp --help
|
||||
|
2
sources
Normal file
2
sources
Normal file
@ -0,0 +1,2 @@
|
||||
SHA512 (deps-pkgs-10.tar.gz) = e63f77e439456e0a8b0fc338b370ee7e2d7824b1d62c75f2209b283905c8c0641d504bfe910021317884fa1662429d952fd4c9b9ee457c48b34182e6f975aa0e
|
||||
SHA512 (leapp-repository-0.20.0.tar.gz) = 8f1732cda85a597e2401a67b69f347398e0270fb2a411079fb9de5261213809bb3323053c0663c0c1f731eb085be6083acabd0a46aaa24d5d3f6b024bd5f0e55
|
Loading…
Reference in New Issue
Block a user