From 0c5dd98e21b8d7b0f88db18753ab9dd45bbaa6dc Mon Sep 17 00:00:00 2001 From: Irina Gulina Date: Tue, 3 Feb 2026 13:57:18 +0100 Subject: [PATCH 01/23] Revert "add STS_ENDPOINT to civ container and aws tofu builder" This reverts commit d430921e1d48c1c57f684b120f9d7d66e78a72fb. --- ci/aws.sh | 1 - cloud/opentofu/aws_config_builder.py | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/ci/aws.sh b/ci/aws.sh index 24ed68e7..4927c389 100755 --- a/ci/aws.sh +++ b/ci/aws.sh @@ -303,7 +303,6 @@ sudo "${CONTAINER_RUNTIME}" run \ -e AWS_ACCESS_KEY_ID='\$CLOUDX_AWS_ACCESS_KEY_ID' \ -e AWS_SECRET_ACCESS_KEY='\$CLOUDX_AWS_SECRET_ACCESS_KEY' \ -e AWS_REGION='\$AWS_REGION' \ - -e AWS_ENDPOINT_URL_STS="$STS_ENDPOINT" \ -v "${TEMPDIR}":/tmp:Z \ "${CONTAINER_CLOUD_IMAGE_VAL}" \ python cloud-image-val.py \ diff --git a/cloud/opentofu/aws_config_builder.py b/cloud/opentofu/aws_config_builder.py index e7008e88..6f1d65e4 100644 --- a/cloud/opentofu/aws_config_builder.py +++ b/cloud/opentofu/aws_config_builder.py @@ -19,24 +19,12 @@ def __get_all_regions_from_resources_file(self): return list(dict.fromkeys(instances_regions)) def __new_aws_provider(self, region): - provider_config = { + return { 'region': region, 'alias': region, 'skip_region_validation': True } - # Map .eu endpoints for EUSC regions to prevent DNS "no such host" errors - if region.startswith('eusc-'): - # These are the primary services used by this builder - services = ['ec2', 'sts', 'iam'] - provider_config['endpoints'] = [] - for service in services: - provider_config['endpoints'].append({ - service: f'https://{service}.{region}.amazonaws.eu' - }) - - return provider_config - def build_resources(self): self.resources_tf['resource']['aws_key_pair'] = {} self.resources_tf['data'] = {} From 8b2d45c8c1912080aeb7a941585e8d2d1e8c8c09 Mon Sep 17 00:00:00 2001 From: Irina Gulina Date: Tue, 3 Feb 2026 13:58:20 +0100 Subject: [PATCH 02/23] Revert "replace regional variable with if logic for EUSC SST endpoint" This reverts commit 478ffe1e2fce0b6a0d429008c9c197849354568a. --- ci/aws.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/ci/aws.sh b/ci/aws.sh index 4927c389..3c3dcb39 100755 --- a/ci/aws.sh +++ b/ci/aws.sh @@ -57,29 +57,23 @@ COMPOSE_START=${TEMPDIR}/compose-start-${TEST_ID}.json COMPOSE_INFO=${TEMPDIR}/compose-info-${TEST_ID}.json AMI_DATA=${TEMPDIR}/ami-data-${TEST_ID}.json -# Dynamic endpoint selection based on region. -# EUSC uses .eu, while others use .com (standard) -if [[ "$AWS_REGION" == eusc-* ]]; then - STS_ENDPOINT="https://sts.\$AWS_REGION.amazonaws.eu" -else - STS_ENDPOINT="https://sts.\$AWS_REGION.amazonaws.com" -fi - # We need awscli to talk to AWS. if ! hash aws; then echo "Using 'awscli' from a container" sudo "${CONTAINER_RUNTIME}" pull ${CONTAINER_IMAGE_CLOUD_TOOLS} - # Escape dollar signs prevent Jenkins interpolation warnings - # Add specific endpoint-url for multi-region compatibility + # Escaped dollar signs prevent Jenkins interpolation warnings + # Added AWS_STS_REGIONAL_ENDPOINTS=regional for EUSC compatibility AWS_CMD="sudo ${CONTAINER_RUNTIME} run --rm \ -e AWS_ACCESS_KEY_ID=\$V2_AWS_ACCESS_KEY_ID \ -e AWS_SECRET_ACCESS_KEY=\$V2_AWS_SECRET_ACCESS_KEY \ + -e AWS_STS_REGIONAL_ENDPOINTS=regional \ -v ${TEMPDIR}:${TEMPDIR}:Z \ - ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region \$AWS_REGION --endpoint-url $STS_ENDPOINT --output json --color on" + ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region \$AWS_REGION --output json --color on" else echo "Using pre-installed 'aws' from the system" - AWS_CMD="aws --region \$AWS_REGION --endpoint-url $STS_ENDPOINT --output json --color on" + # Prefix command with regional STS setting and escaped region variable + AWS_CMD="AWS_STS_REGIONAL_ENDPOINTS=regional aws --region \$AWS_REGION --output json --color on" fi $AWS_CMD --version @@ -110,7 +104,7 @@ get_compose_metadata () { } # Write an AWS TOML file -# Variables are escaped to prevent Groovy from baking secrets into the file +# Escaped variables ensure secrets are not baked into the file by Groovy tee "$AWS_CONFIG" > /dev/null << EOF provider = "aws" @@ -297,12 +291,14 @@ fi cp "${CIV_CONFIG_FILE}" "${TEMPDIR}/civ_config.yml" -# Escaped variables ensure security and multi-region endpoint resolution +# Added regional STS setting and escaped secret variables for CIV container sudo "${CONTAINER_RUNTIME}" run \ -a stdout -a stderr \ -e AWS_ACCESS_KEY_ID='\$CLOUDX_AWS_ACCESS_KEY_ID' \ -e AWS_SECRET_ACCESS_KEY='\$CLOUDX_AWS_SECRET_ACCESS_KEY' \ -e AWS_REGION='\$AWS_REGION' \ + -e AWS_STS_REGIONAL_ENDPOINTS='regional' \ + -e JIRA_PAT='\$JIRA_PAT' \ -v "${TEMPDIR}":/tmp:Z \ "${CONTAINER_CLOUD_IMAGE_VAL}" \ python cloud-image-val.py \ From 3d815449d48548e17eae35a444ed7990a88c430a Mon Sep 17 00:00:00 2001 From: Irina Gulina Date: Tue, 3 Feb 2026 13:58:30 +0100 Subject: [PATCH 03/23] Revert "use regional STS endpoint instead global for AWS" This reverts commit d7e3aed77c7b495497561a2c1a7fd30785634b4e. --- ci/aws.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ci/aws.sh b/ci/aws.sh index 3c3dcb39..185b2522 100755 --- a/ci/aws.sh +++ b/ci/aws.sh @@ -62,18 +62,16 @@ if ! hash aws; then echo "Using 'awscli' from a container" sudo "${CONTAINER_RUNTIME}" pull ${CONTAINER_IMAGE_CLOUD_TOOLS} - # Escaped dollar signs prevent Jenkins interpolation warnings - # Added AWS_STS_REGIONAL_ENDPOINTS=regional for EUSC compatibility + # Escaped dollar signs prevent Jenkins from leaking secrets into the command string AWS_CMD="sudo ${CONTAINER_RUNTIME} run --rm \ -e AWS_ACCESS_KEY_ID=\$V2_AWS_ACCESS_KEY_ID \ -e AWS_SECRET_ACCESS_KEY=\$V2_AWS_SECRET_ACCESS_KEY \ - -e AWS_STS_REGIONAL_ENDPOINTS=regional \ -v ${TEMPDIR}:${TEMPDIR}:Z \ ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region \$AWS_REGION --output json --color on" else echo "Using pre-installed 'aws' from the system" - # Prefix command with regional STS setting and escaped region variable - AWS_CMD="AWS_STS_REGIONAL_ENDPOINTS=regional aws --region \$AWS_REGION --output json --color on" + # Using \$ ensures the shell evaluates the variable at runtime + AWS_CMD="aws --region \$AWS_REGION --output json --color on" fi $AWS_CMD --version @@ -104,7 +102,7 @@ get_compose_metadata () { } # Write an AWS TOML file -# Escaped variables ensure secrets are not baked into the file by Groovy +# Variables are escaped to prevent Groovy from interpolating them into the file content tee "$AWS_CONFIG" > /dev/null << EOF provider = "aws" @@ -291,13 +289,12 @@ fi cp "${CIV_CONFIG_FILE}" "${TEMPDIR}/civ_config.yml" -# Added regional STS setting and escaped secret variables for CIV container +# Using single quotes for environment variable passing is the most secure method in Jenkins sudo "${CONTAINER_RUNTIME}" run \ -a stdout -a stderr \ -e AWS_ACCESS_KEY_ID='\$CLOUDX_AWS_ACCESS_KEY_ID' \ -e AWS_SECRET_ACCESS_KEY='\$CLOUDX_AWS_SECRET_ACCESS_KEY' \ -e AWS_REGION='\$AWS_REGION' \ - -e AWS_STS_REGIONAL_ENDPOINTS='regional' \ -e JIRA_PAT='\$JIRA_PAT' \ -v "${TEMPDIR}":/tmp:Z \ "${CONTAINER_CLOUD_IMAGE_VAL}" \ From 585f68c99ef2935da10e52f26f909e138d8b7821 Mon Sep 17 00:00:00 2001 From: Irina Gulina Date: Tue, 3 Feb 2026 13:58:38 +0100 Subject: [PATCH 04/23] Revert "fix Jenkins complaining about insecure Groovy String interpolation" This reverts commit 1955e7887609b23b5e6553c794d092afe883c7c9. --- ci/aws.sh | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/ci/aws.sh b/ci/aws.sh index 185b2522..647522bb 100755 --- a/ci/aws.sh +++ b/ci/aws.sh @@ -62,16 +62,14 @@ if ! hash aws; then echo "Using 'awscli' from a container" sudo "${CONTAINER_RUNTIME}" pull ${CONTAINER_IMAGE_CLOUD_TOOLS} - # Escaped dollar signs prevent Jenkins from leaking secrets into the command string AWS_CMD="sudo ${CONTAINER_RUNTIME} run --rm \ - -e AWS_ACCESS_KEY_ID=\$V2_AWS_ACCESS_KEY_ID \ - -e AWS_SECRET_ACCESS_KEY=\$V2_AWS_SECRET_ACCESS_KEY \ + -e AWS_ACCESS_KEY_ID=${V2_AWS_ACCESS_KEY_ID} \ + -e AWS_SECRET_ACCESS_KEY=${V2_AWS_SECRET_ACCESS_KEY} \ -v ${TEMPDIR}:${TEMPDIR}:Z \ - ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region \$AWS_REGION --output json --color on" + ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region $AWS_REGION --output json --color on" else echo "Using pre-installed 'aws' from the system" - # Using \$ ensures the shell evaluates the variable at runtime - AWS_CMD="aws --region \$AWS_REGION --output json --color on" + AWS_CMD="aws --region $AWS_REGION --output json --color on" fi $AWS_CMD --version @@ -102,15 +100,14 @@ get_compose_metadata () { } # Write an AWS TOML file -# Variables are escaped to prevent Groovy from interpolating them into the file content tee "$AWS_CONFIG" > /dev/null << EOF provider = "aws" [settings] -accessKeyID = "\$V2_AWS_ACCESS_KEY_ID" -secretAccessKey = "\$V2_AWS_SECRET_ACCESS_KEY" +accessKeyID = "${V2_AWS_ACCESS_KEY_ID}" +secretAccessKey = "${V2_AWS_SECRET_ACCESS_KEY}" bucket = "${AWS_BUCKET}" -region = "\$AWS_REGION" +region = "${AWS_REGION}" key = "${TEST_ID}" EOF @@ -289,13 +286,12 @@ fi cp "${CIV_CONFIG_FILE}" "${TEMPDIR}/civ_config.yml" -# Using single quotes for environment variable passing is the most secure method in Jenkins sudo "${CONTAINER_RUNTIME}" run \ -a stdout -a stderr \ - -e AWS_ACCESS_KEY_ID='\$CLOUDX_AWS_ACCESS_KEY_ID' \ - -e AWS_SECRET_ACCESS_KEY='\$CLOUDX_AWS_SECRET_ACCESS_KEY' \ - -e AWS_REGION='\$AWS_REGION' \ - -e JIRA_PAT='\$JIRA_PAT' \ + -e AWS_ACCESS_KEY_ID="${CLOUDX_AWS_ACCESS_KEY_ID}" \ + -e AWS_SECRET_ACCESS_KEY="${CLOUDX_AWS_SECRET_ACCESS_KEY}" \ + -e AWS_REGION="${AWS_REGION}" \ + -e JIRA_PAT="${JIRA_PAT}" \ -v "${TEMPDIR}":/tmp:Z \ "${CONTAINER_CLOUD_IMAGE_VAL}" \ python cloud-image-val.py \ From d2d1f721b728c14c1874f452d10a2bf5aee714f1 Mon Sep 17 00:00:00 2001 From: Irina Gulina Date: Tue, 3 Feb 2026 15:47:38 +0100 Subject: [PATCH 05/23] quote EOF to override variables expansion --- ci/aws.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/aws.sh b/ci/aws.sh index 647522bb..f28fcc78 100755 --- a/ci/aws.sh +++ b/ci/aws.sh @@ -100,7 +100,7 @@ get_compose_metadata () { } # Write an AWS TOML file -tee "$AWS_CONFIG" > /dev/null << EOF +tee "$AWS_CONFIG" > /dev/null << "EOF" provider = "aws" [settings] From 5335b76b2361ddb6fd9b03446c758069e739ce38 Mon Sep 17 00:00:00 2001 From: Irina Gulina Date: Tue, 3 Feb 2026 18:54:11 +0100 Subject: [PATCH 06/23] explicitly pass variables to the AWS container, add debugging steps --- ci/aws.sh | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/ci/aws.sh b/ci/aws.sh index f28fcc78..a18faf82 100755 --- a/ci/aws.sh +++ b/ci/aws.sh @@ -12,6 +12,10 @@ set -euo pipefail source ci/set-env-variables.sh source ci/shared_lib.sh +greenprint "🧪 Debugging: Checking Shell Variables" +echo "AWS_REGION is: ${AWS_REGION}" +echo "AWS_BUCKET is: ${AWS_BUCKET}" +echo "TEST_ID is: ${TEST_ID}" # Container image used for cloud provider CLI tools CONTAINER_IMAGE_CLOUD_TOOLS="quay.io/osbuild/cloud-tools:latest" @@ -63,10 +67,17 @@ if ! hash aws; then sudo "${CONTAINER_RUNTIME}" pull ${CONTAINER_IMAGE_CLOUD_TOOLS} AWS_CMD="sudo ${CONTAINER_RUNTIME} run --rm \ - -e AWS_ACCESS_KEY_ID=${V2_AWS_ACCESS_KEY_ID} \ - -e AWS_SECRET_ACCESS_KEY=${V2_AWS_SECRET_ACCESS_KEY} \ + -e AWS_REGION=\"${AWS_REGION}\" \ + -e AWS_ACCESS_KEY_ID=\"${V2_AWS_ACCESS_KEY_ID}\" \ + -e AWS_SECRET_ACCESS_KEY=\"${V2_AWS_SECRET_ACCESS_KEY}\" \ -v ${TEMPDIR}:${TEMPDIR}:Z \ - ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region $AWS_REGION --output json --color on" + ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region ${AWS_REGION} --output json --color on" + + # AWS_CMD="sudo ${CONTAINER_RUNTIME} run --rm \ + # -e AWS_ACCESS_KEY_ID=\"${V2_AWS_ACCESS_KEY_ID} \ + # -e AWS_SECRET_ACCESS_KEY=${V2_AWS_SECRET_ACCESS_KEY} \ + # -v ${TEMPDIR}:${TEMPDIR}:Z \ + # ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region $AWS_REGION --output json --color on" else echo "Using pre-installed 'aws' from the system" AWS_CMD="aws --region $AWS_REGION --output json --color on" @@ -100,7 +111,7 @@ get_compose_metadata () { } # Write an AWS TOML file -tee "$AWS_CONFIG" > /dev/null << "EOF" +tee "$AWS_CONFIG" > /dev/null << EOF provider = "aws" [settings] @@ -111,6 +122,22 @@ region = "${AWS_REGION}" key = "${TEST_ID}" EOF +greenprint "🧪 Debugging: Verifying AWS Config Expansion" + +# Check if the literal strings like '${AWS_REGION}' still exist in the file +if grep -q '\${' "$AWS_CONFIG"; then + echo "❌ ERROR: Late evaluation bug detected! Literal variables found in config." + # This safely shows which variables didn't expand without showing the keys + grep -o '\${[^}]*}' "$AWS_CONFIG" | sort -u +else + echo "✅ SUCCESS: All variables appear to have expanded." +fi + +# Safely verify that the keys are not empty strings +if grep -E 'accessKeyID = ""|secretAccessKey = ""' "$AWS_CONFIG"; then + echo "⚠️ WARNING: Keys are present but appear to be empty strings." +fi + # Write a basic blueprint for our image. tee "$BLUEPRINT_FILE" > /dev/null << EOF name = "bash" @@ -186,6 +213,9 @@ if [[ $COMPOSE_STATUS != FINISHED ]]; then exit 1 fi +greenprint "🧪 Debugging: Testing Container Variable Injection" +$AWS_CMD configure get region || echo "ERROR: Container cannot see the region!" + # Find the image that we made in AWS. greenprint "🔍 Search for created AMI" $AWS_CMD ec2 describe-images \ From 5857a5518229a358319802deb044a656c82a8358 Mon Sep 17 00:00:00 2001 From: Irina Gulina Date: Tue, 3 Feb 2026 19:59:26 +0100 Subject: [PATCH 07/23] remove backslashes for the env vars being passed to the container --- ci/aws.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/aws.sh b/ci/aws.sh index a18faf82..f5401471 100755 --- a/ci/aws.sh +++ b/ci/aws.sh @@ -67,9 +67,9 @@ if ! hash aws; then sudo "${CONTAINER_RUNTIME}" pull ${CONTAINER_IMAGE_CLOUD_TOOLS} AWS_CMD="sudo ${CONTAINER_RUNTIME} run --rm \ - -e AWS_REGION=\"${AWS_REGION}\" \ - -e AWS_ACCESS_KEY_ID=\"${V2_AWS_ACCESS_KEY_ID}\" \ - -e AWS_SECRET_ACCESS_KEY=\"${V2_AWS_SECRET_ACCESS_KEY}\" \ + -e AWS_REGION=${AWS_REGION} \ + -e AWS_ACCESS_KEY_ID=${V2_AWS_ACCESS_KEY_ID} \ + -e AWS_SECRET_ACCESS_KEY=${V2_AWS_SECRET_ACCESS_KEY} \ -v ${TEMPDIR}:${TEMPDIR}:Z \ ${CONTAINER_IMAGE_CLOUD_TOOLS} aws --region ${AWS_REGION} --output json --color on" From 7445ee3667abc04af95d42a5ec5f7a8d8f1f8afd Mon Sep 17 00:00:00 2001 From: Irina Gulina Date: Tue, 3 Feb 2026 21:25:23 +0100 Subject: [PATCH 08/23] reduce verbosity to 10 commits --- ci/aws.sh | 1 - schutzbot/deploy.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/aws.sh b/ci/aws.sh index f5401471..594af89c 100755 --- a/ci/aws.sh +++ b/ci/aws.sh @@ -15,7 +15,6 @@ source ci/shared_lib.sh greenprint "🧪 Debugging: Checking Shell Variables" echo "AWS_REGION is: ${AWS_REGION}" echo "AWS_BUCKET is: ${AWS_BUCKET}" -echo "TEST_ID is: ${TEST_ID}" # Container image used for cloud provider CLI tools CONTAINER_IMAGE_CLOUD_TOOLS="quay.io/osbuild/cloud-tools:latest" diff --git a/schutzbot/deploy.sh b/schutzbot/deploy.sh index dfc1b7cc..aeb7a529 100755 --- a/schutzbot/deploy.sh +++ b/schutzbot/deploy.sh @@ -119,7 +119,7 @@ function get_last_passed_commit { else # Capture response and HTTP code to handle GitHub API failures (e.g. 401, 403) - response=$(curl -u "${API_USER}:${API_PAT}" -s -w "%{http_code}" "https://api.github.com/repos/osbuild/osbuild-composer/commits?per_page=100") + response=$(curl -u "${API_USER}:${API_PAT}" -s -w "%{http_code}" "https://api.github.com/repos/osbuild/osbuild-composer/commits?per_page=10") http_code="${response: -3}" body="${response::-3}" From 74af8ef7991733270b0bbbc6bf7086d86ed14ab2 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 08:44:43 +0200 Subject: [PATCH 09/23] Fix cut test for new upgrade release 9.8 -> 10.2 --- test_suite/rhel_devel/cut/test_cut.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index c689fc7b..486386ab 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -7,7 +7,7 @@ """ CUT (Components Upgrade Testing) refers to the RHEL testing phase were we test if our components are upgradable across major versions. -Example: After upgrading from RHEL-9.6 to RHEL-10.0, make sure components work. +Example: After upgrading from RHEL-9.8 to RHEL-10.2, make sure components work. """ @@ -36,7 +36,6 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): 'nmcli connection migrate /etc/sysconfig/network-scripts/ifcfg-eth0' ) - # MOVED REPO BLOCK HERE (Before dnf install) console_lib.print_divider('Adding RHEL-10 repos...') compose_url = "http://download.devel.redhat.com/rhel-10/nightly/RHEL-10/latest-RHEL-10.2" basearch = host.system_info.arch @@ -57,9 +56,8 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') console_lib.print_divider('Installing leapp package...') - result = test_lib.print_host_command_output(host, 'dnf install leapp -y --enablerepo=AppStream10', - capture_result=True) - assert result.succeeded, 'Failed to install leapp' + result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade -y', capture_result=True) + assert result.succeeded, 'Failed to install leapp-upgrade' console_lib.print_divider('Running leapp upgrade...') result = test_lib.print_host_command_output( From b35e43cffb019f24a8b659888d54f7bb79a8540d Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 09:31:19 +0200 Subject: [PATCH 10/23] Try to install leap from nightly Appstream --- test_suite/rhel_devel/cut/test_cut.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 486386ab..373d0543 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -4,13 +4,6 @@ from test_suite.generic.test_generic import TestsSubscriptionManager as sub_man from test_suite.rhel_devel import run_cloudx_components_testing -""" -CUT (Components Upgrade Testing) refers to the RHEL testing phase -were we test if our components are upgradable across major versions. -Example: After upgrading from RHEL-9.8 to RHEL-10.2, make sure components work. -""" - - @pytest.mark.cut class TestsComponentsUpgrade: @pytest.mark.run_on(['rhel9.8', 'rhel10.2']) @@ -56,8 +49,13 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') console_lib.print_divider('Installing leapp package...') - result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade -y', capture_result=True) - assert result.succeeded, 'Failed to install leapp-upgrade' + # Attempt to install both the tool and the data package from the nightly AppStream + result = test_lib.print_host_command_output( + host, + 'dnf install leapp leapp-upgrade-el9toel10 -y --enablerepo=AppStream10', + capture_result=True + ) + assert result.succeeded, 'Failed to install leapp and upgrade data' console_lib.print_divider('Running leapp upgrade...') result = test_lib.print_host_command_output( @@ -67,9 +65,9 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): capture_result=True) if result.failed: - reapp_report_file = '/var/log/leapp/leapp-report.txt' - if host.file(reapp_report_file).exists: - print('Leapp Report:\n', host.file(reapp_report_file).content_string) + leapp_report_file = '/var/log/leapp/leapp-report.txt' + if host.file(leapp_report_file).exists: + print('Leapp Report:\n', host.file(leapp_report_file).content_string) pytest.fail('RHEL major upgrade failed. Please check leapp-report.txt for more details.') From 606670d15c06844eb37dc37b9499a84aa0819161 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 09:45:29 +0200 Subject: [PATCH 11/23] install leap only on rhel9 --- test_suite/rhel_devel/cut/test_cut.py | 32 ++++++++------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 373d0543..d1117afa 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -4,6 +4,7 @@ from test_suite.generic.test_generic import TestsSubscriptionManager as sub_man from test_suite.rhel_devel import run_cloudx_components_testing + @pytest.mark.cut class TestsComponentsUpgrade: @pytest.mark.run_on(['rhel9.8', 'rhel10.2']) @@ -12,14 +13,6 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): assert run_cloudx_components_testing.main() console_lib.print_divider('Registering system with subscription-manager...') - sub_man_config = { - "rhsmcertd.auto_registration": 1, - "rhsm.manage_repos": 1, - } - for item, value in sub_man_config.items(): - with host.sudo(): - host.run_test(f'subscription-manager config --{item}={value}') - sub_man.test_subscription_manager_auto(self, host, instance_data) console_lib.print_divider('Migrating legacy network configuration workaround') @@ -29,6 +22,10 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): 'nmcli connection migrate /etc/sysconfig/network-scripts/ifcfg-eth0' ) + console_lib.print_divider('Installing leapp package from RHEL 9...') + result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade-el9toel10 -y', capture_result=True) + assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10 from RHEL 9' + console_lib.print_divider('Adding RHEL-10 repos...') compose_url = "http://download.devel.redhat.com/rhel-10/nightly/RHEL-10/latest-RHEL-10.2" basearch = host.system_info.arch @@ -37,26 +34,17 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): [AppStream10] name=AppStream for RHEL-10 baseurl={compose_url}/compose/AppStream/{basearch}/os/ -enabled=1 +enabled=0 gpgcheck=0 [BaseOS10] name=BaseOS for RHEL-10 baseurl={compose_url}/compose/BaseOS/{basearch}/os/ -enabled=1 +enabled=0 gpgcheck=0 """ test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') - console_lib.print_divider('Installing leapp package...') - # Attempt to install both the tool and the data package from the nightly AppStream - result = test_lib.print_host_command_output( - host, - 'dnf install leapp leapp-upgrade-el9toel10 -y --enablerepo=AppStream10', - capture_result=True - ) - assert result.succeeded, 'Failed to install leapp and upgrade data' - console_lib.print_divider('Running leapp upgrade...') result = test_lib.print_host_command_output( host, @@ -68,14 +56,12 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): leapp_report_file = '/var/log/leapp/leapp-report.txt' if host.file(leapp_report_file).exists: print('Leapp Report:\n', host.file(leapp_report_file).content_string) - - pytest.fail('RHEL major upgrade failed. Please check leapp-report.txt for more details.') + pytest.fail('RHEL major upgrade failed. Check leapp-report.txt.') console_lib.print_divider('Rebooting host...') host = test_lib.reboot_host(host, max_timeout=900) - assert version.parse(host.system_info.release).major == 10, \ - 'Failed to upgrade from RHEL-9.8 to RHEL-10.2 even after reboot.' + assert version.parse(host.system_info.release).major == 10, 'Failed to upgrade to RHEL-10.' console_lib.print_divider('Testing components AFTER major upgrade...') assert run_cloudx_components_testing.main() From 4d2d5eb97bb422fa50e949ed2deb8975e2a98b03 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 10:53:31 +0200 Subject: [PATCH 12/23] fix for cut --- test_suite/rhel_devel/cut/test_cut.py | 38 +++++++++++++++++++-------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index d1117afa..07186139 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -13,6 +13,15 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): assert run_cloudx_components_testing.main() console_lib.print_divider('Registering system with subscription-manager...') + sub_man_config = { + "rhsmcertd.auto_registration": 1, + "rhsm.manage_repos": 1, + } + for item, value in sub_man_config.items(): + with host.sudo(): + host.run_test(f'subscription-manager config --{item}={value}') + + # This line had a transient timeout hiccup; a rerun usually fixes it sub_man.test_subscription_manager_auto(self, host, instance_data) console_lib.print_divider('Migrating legacy network configuration workaround') @@ -22,10 +31,7 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): 'nmcli connection migrate /etc/sysconfig/network-scripts/ifcfg-eth0' ) - console_lib.print_divider('Installing leapp package from RHEL 9...') - result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade-el9toel10 -y', capture_result=True) - assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10 from RHEL 9' - + # FIX: Move Repo Addition BEFORE Installation console_lib.print_divider('Adding RHEL-10 repos...') compose_url = "http://download.devel.redhat.com/rhel-10/nightly/RHEL-10/latest-RHEL-10.2" basearch = host.system_info.arch @@ -34,17 +40,26 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): [AppStream10] name=AppStream for RHEL-10 baseurl={compose_url}/compose/AppStream/{basearch}/os/ -enabled=0 +enabled=1 gpgcheck=0 [BaseOS10] name=BaseOS for RHEL-10 baseurl={compose_url}/compose/BaseOS/{basearch}/os/ -enabled=0 +enabled=1 gpgcheck=0 """ test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') + console_lib.print_divider('Installing leapp package...') + # We explicitly enable AppStream10 to find the package confirmed in your screenshot + result = test_lib.print_host_command_output( + host, + 'dnf install leapp-upgrade-el9toel10 -y --enablerepo=AppStream10', + capture_result=True + ) + assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' + console_lib.print_divider('Running leapp upgrade...') result = test_lib.print_host_command_output( host, @@ -53,15 +68,16 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): capture_result=True) if result.failed: - leapp_report_file = '/var/log/leapp/leapp-report.txt' - if host.file(leapp_report_file).exists: - print('Leapp Report:\n', host.file(leapp_report_file).content_string) - pytest.fail('RHEL major upgrade failed. Check leapp-report.txt.') + reapp_report_file = '/var/log/leapp/leapp-report.txt' + if host.file(reapp_report_file).exists: + print('Leapp Report:\n', host.file(reapp_report_file).content_string) + pytest.fail('RHEL major upgrade failed. Please check leapp-report.txt for more details.') console_lib.print_divider('Rebooting host...') host = test_lib.reboot_host(host, max_timeout=900) - assert version.parse(host.system_info.release).major == 10, 'Failed to upgrade to RHEL-10.' + assert version.parse(host.system_info.release).major == 10, \ + 'Failed to upgrade from RHEL-9.8 to RHEL-10.2 even after reboot.' console_lib.print_divider('Testing components AFTER major upgrade...') assert run_cloudx_components_testing.main() From 4312db5a594506d7d196267434510c0a0198ec33 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 11:47:42 +0200 Subject: [PATCH 13/23] fix try --- test_suite/rhel_devel/cut/test_cut.py | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 07186139..3566da12 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -21,7 +21,6 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): with host.sudo(): host.run_test(f'subscription-manager config --{item}={value}') - # This line had a transient timeout hiccup; a rerun usually fixes it sub_man.test_subscription_manager_auto(self, host, instance_data) console_lib.print_divider('Migrating legacy network configuration workaround') @@ -31,35 +30,28 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): 'nmcli connection migrate /etc/sysconfig/network-scripts/ifcfg-eth0' ) - # FIX: Move Repo Addition BEFORE Installation - console_lib.print_divider('Adding RHEL-10 repos...') + console_lib.print_divider('Installing leapp package...') + result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade-el9toel10* -y', capture_result=True) + assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' compose_url = "http://download.devel.redhat.com/rhel-10/nightly/RHEL-10/latest-RHEL-10.2" basearch = host.system_info.arch + console_lib.print_divider('Adding RHEL-10 repos...') repo_file_name = '/etc/yum.repos.d/rhel10.repo' rhel_10_repo_file = f""" [AppStream10] name=AppStream for RHEL-10 baseurl={compose_url}/compose/AppStream/{basearch}/os/ -enabled=1 +enabled=0 gpgcheck=0 [BaseOS10] name=BaseOS for RHEL-10 baseurl={compose_url}/compose/BaseOS/{basearch}/os/ -enabled=1 +enabled=0 gpgcheck=0 """ test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') - console_lib.print_divider('Installing leapp package...') - # We explicitly enable AppStream10 to find the package confirmed in your screenshot - result = test_lib.print_host_command_output( - host, - 'dnf install leapp-upgrade-el9toel10 -y --enablerepo=AppStream10', - capture_result=True - ) - assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' - console_lib.print_divider('Running leapp upgrade...') result = test_lib.print_host_command_output( host, @@ -68,9 +60,10 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): capture_result=True) if result.failed: - reapp_report_file = '/var/log/leapp/leapp-report.txt' - if host.file(reapp_report_file).exists: - print('Leapp Report:\n', host.file(reapp_report_file).content_string) + leapp_report_file = '/var/log/leapp/leapp-report.txt' + if host.file(leapp_report_file).exists: + print('Leapp Report:\n', host.file(leapp_report_file).content_string) + pytest.fail('RHEL major upgrade failed. Please check leapp-report.txt for more details.') console_lib.print_divider('Rebooting host...') From d20bda4deabe2a7c31a2b71fe0eb084e66b64191 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 12:40:39 +0200 Subject: [PATCH 14/23] try enable rhel9 repos --- test_suite/rhel_devel/cut/test_cut.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 3566da12..84029328 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -23,6 +23,11 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): sub_man.test_subscription_manager_auto(self, host, instance_data) + console_lib.print_divider('Enabling RHEL 9 GA repositories...') + with host.sudo(): + host.run('subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms') + host.run('dnf clean all') + console_lib.print_divider('Migrating legacy network configuration workaround') if host.file('/etc/sysconfig/network-scripts/ifcfg-eth0').exists: test_lib.print_host_command_output( @@ -31,10 +36,22 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): ) console_lib.print_divider('Installing leapp package...') - result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade-el9toel10* -y', capture_result=True) - assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' + # Using wildcard to ensure we find the tool in the newly enabled GA repo + result = test_lib.print_host_command_output( + host, + 'dnf install leapp-upgrade-el9toel10* -y', + capture_result=True + ) + + if result.failed: + console_lib.print_divider('DEBUG: Analyzing repository availability...') + test_lib.print_host_command_output(host, 'dnf repolist') + test_lib.print_host_command_output(host, 'dnf list available "leapp*"') + assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10 from RHEL 9 GA repos' + compose_url = "http://download.devel.redhat.com/rhel-10/nightly/RHEL-10/latest-RHEL-10.2" basearch = host.system_info.arch + console_lib.print_divider('Adding RHEL-10 repos...') repo_file_name = '/etc/yum.repos.d/rhel10.repo' rhel_10_repo_file = f""" @@ -63,8 +80,7 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): leapp_report_file = '/var/log/leapp/leapp-report.txt' if host.file(leapp_report_file).exists: print('Leapp Report:\n', host.file(leapp_report_file).content_string) - - pytest.fail('RHEL major upgrade failed. Please check leapp-report.txt for more details.') + pytest.fail('RHEL major upgrade failed. Check leapp-report.txt for details.') console_lib.print_divider('Rebooting host...') host = test_lib.reboot_host(host, max_timeout=900) From 5ce6cbdd08164f584f29cba80911ef4938703e30 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 12:50:24 +0200 Subject: [PATCH 15/23] Switch to GA repos --- test_suite/rhel_devel/cut/test_cut.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 84029328..11b22f45 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -23,7 +23,7 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): sub_man.test_subscription_manager_auto(self, host, instance_data) - console_lib.print_divider('Enabling RHEL 9 GA repositories...') + console_lib.print_divider('SWITCHING FROM BETA TO GA REPOS...') with host.sudo(): host.run('subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms') host.run('dnf clean all') @@ -36,7 +36,6 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): ) console_lib.print_divider('Installing leapp package...') - # Using wildcard to ensure we find the tool in the newly enabled GA repo result = test_lib.print_host_command_output( host, 'dnf install leapp-upgrade-el9toel10* -y', @@ -47,7 +46,7 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): console_lib.print_divider('DEBUG: Analyzing repository availability...') test_lib.print_host_command_output(host, 'dnf repolist') test_lib.print_host_command_output(host, 'dnf list available "leapp*"') - assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10 from RHEL 9 GA repos' + assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' compose_url = "http://download.devel.redhat.com/rhel-10/nightly/RHEL-10/latest-RHEL-10.2" basearch = host.system_info.arch @@ -86,7 +85,7 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): host = test_lib.reboot_host(host, max_timeout=900) assert version.parse(host.system_info.release).major == 10, \ - 'Failed to upgrade from RHEL-9.8 to RHEL-10.2 even after reboot.' + 'Failed to upgrade to RHEL-10.2' console_lib.print_divider('Testing components AFTER major upgrade...') assert run_cloudx_components_testing.main() From 8ea9411c1bed33b2ade71ae374660f5f629b253a Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 13:33:38 +0200 Subject: [PATCH 16/23] Switch from Beta to GA repos --- test_suite/rhel_devel/cut/test_cut.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 11b22f45..5a3c8e53 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -25,6 +25,8 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): console_lib.print_divider('SWITCHING FROM BETA TO GA REPOS...') with host.sudo(): + host.run('subscription-manager release --unset') + host.run('subscription-manager repos --disable=rhel-9-for-x86_64-appstream-beta-rpms') host.run('subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms') host.run('dnf clean all') From ecdfc833714722afbb6e4190a9f230fb56ec54af Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 13:45:00 +0200 Subject: [PATCH 17/23] fix repos --- test_suite/rhel_devel/cut/test_cut.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 5a3c8e53..6e36d6e3 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -26,8 +26,9 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): console_lib.print_divider('SWITCHING FROM BETA TO GA REPOS...') with host.sudo(): host.run('subscription-manager release --unset') - host.run('subscription-manager repos --disable=rhel-9-for-x86_64-appstream-beta-rpms') + host.run('subscription-manager repos --disable="*-beta-rpms"') host.run('subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms') + host.run('subscription-manager repos --enable=rhel-9-for-x86_64-baseos-rpms') host.run('dnf clean all') console_lib.print_divider('Migrating legacy network configuration workaround') From 64dd3656f7cbe3bc8510d75f55c5dbbad737e827 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 14:29:54 +0200 Subject: [PATCH 18/23] use ruhi --- test_suite/rhel_devel/cut/test_cut.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 6e36d6e3..8e07027a 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -25,10 +25,9 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): console_lib.print_divider('SWITCHING FROM BETA TO GA REPOS...') with host.sudo(): - host.run('subscription-manager release --unset') - host.run('subscription-manager repos --disable="*-beta-rpms"') - host.run('subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms') - host.run('subscription-manager repos --enable=rhel-9-for-x86_64-baseos-rpms') + host.run('subscription-manager config --rhsm.manage_repos=0') + host.run('dnf config-manager --set-enabled rhel-9-appstream-rhui-rpms') + host.run('dnf config-manager --set-enabled rhel-9-baseos-rhui-rpms') host.run('dnf clean all') console_lib.print_divider('Migrating legacy network configuration workaround') From 539622dd0eceb919caabd273e144a3a1fb720b52 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 15:22:48 +0200 Subject: [PATCH 19/23] try upgrade manually --- test_suite/rhel_devel/cut/test_cut.py | 43 +++++++++++++-------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 8e07027a..db3d25cc 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -1,9 +1,16 @@ import pytest +import time from packaging import version from lib import test_lib, console_lib from test_suite.generic.test_generic import TestsSubscriptionManager as sub_man from test_suite.rhel_devel import run_cloudx_components_testing +""" +CUT (Components Upgrade Testing) refers to the RHEL testing phase +were we test if our components are upgradable across major versions. +Example: After upgrading from RHEL-9.6 to RHEL-10.0, make sure components work. +""" + @pytest.mark.cut class TestsComponentsUpgrade: @@ -23,13 +30,6 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): sub_man.test_subscription_manager_auto(self, host, instance_data) - console_lib.print_divider('SWITCHING FROM BETA TO GA REPOS...') - with host.sudo(): - host.run('subscription-manager config --rhsm.manage_repos=0') - host.run('dnf config-manager --set-enabled rhel-9-appstream-rhui-rpms') - host.run('dnf config-manager --set-enabled rhel-9-baseos-rhui-rpms') - host.run('dnf clean all') - console_lib.print_divider('Migrating legacy network configuration workaround') if host.file('/etc/sysconfig/network-scripts/ifcfg-eth0').exists: test_lib.print_host_command_output( @@ -37,20 +37,17 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): 'nmcli connection migrate /etc/sysconfig/network-scripts/ifcfg-eth0' ) + time.sleep(10800) + console_lib.print_divider('Installing leapp package...') - result = test_lib.print_host_command_output( - host, - 'dnf install leapp-upgrade-el9toel10* -y', - capture_result=True - ) + result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade-el9toel10 -y', capture_result=True) - if result.failed: - console_lib.print_divider('DEBUG: Analyzing repository availability...') - test_lib.print_host_command_output(host, 'dnf repolist') - test_lib.print_host_command_output(host, 'dnf list available "leapp*"') - assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' + assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' + # We will use the latest compose by defualt. + # This can be manually changed in a CIV pull request for debugging purposes. compose_url = "http://download.devel.redhat.com/rhel-10/nightly/RHEL-10/latest-RHEL-10.2" + basearch = host.system_info.arch console_lib.print_divider('Adding RHEL-10 repos...') @@ -78,16 +75,18 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): capture_result=True) if result.failed: - leapp_report_file = '/var/log/leapp/leapp-report.txt' - if host.file(leapp_report_file).exists: - print('Leapp Report:\n', host.file(leapp_report_file).content_string) - pytest.fail('RHEL major upgrade failed. Check leapp-report.txt for details.') + reapp_report_file = '/var/log/leapp/leapp-report.txt' + if host.file(reapp_report_file).exists: + print('Leapp Report:\n', host.file(reapp_report_file).content_string) + + pytest.fail('RHEL major upgrade failed. Please check leapp-report.txt for more details.') console_lib.print_divider('Rebooting host...') + # 15 minutes of timeout due to performing a major upgrade host = test_lib.reboot_host(host, max_timeout=900) assert version.parse(host.system_info.release).major == 10, \ - 'Failed to upgrade to RHEL-10.2' + 'Failed to upgrade from RHEL-9.8 to RHEL-10.2 even after reboot.' console_lib.print_divider('Testing components AFTER major upgrade...') assert run_cloudx_components_testing.main() From cc65c047da6221ec379d15c3b98fadd44f52fef6 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 16:25:22 +0200 Subject: [PATCH 20/23] half manual process --- test_suite/rhel_devel/cut/test_cut.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index db3d25cc..7ec76e45 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -37,12 +37,11 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): 'nmcli connection migrate /etc/sysconfig/network-scripts/ifcfg-eth0' ) - time.sleep(10800) - - console_lib.print_divider('Installing leapp package...') - result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade-el9toel10 -y', capture_result=True) + # manual install leap package + # console_lib.print_divider('Installing leapp package...') + # result = test_lib.print_host_command_output(host, 'dnf install leapp-upgrade-el9toel10 -y', capture_result=True) - assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' + # assert result.succeeded, 'Failed to install leapp-upgrade-el9toel10' # We will use the latest compose by defualt. # This can be manually changed in a CIV pull request for debugging purposes. @@ -67,6 +66,7 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): """ test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') + time.sleep(10800) console_lib.print_divider('Running leapp upgrade...') result = test_lib.print_host_command_output( host, From e0b03c3714b32cdd2dfada41dd2ad7237062a107 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 18:14:40 +0200 Subject: [PATCH 21/23] reduce time to 20 min sleep --- test_suite/rhel_devel/cut/test_cut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 7ec76e45..19aaa2a5 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -66,7 +66,7 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): """ test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') - time.sleep(10800) + time.sleep(1200) console_lib.print_divider('Running leapp upgrade...') result = test_lib.print_host_command_output( host, From 02d92dd13f3978192f00611e090cd3520624042d Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 19:39:36 +0200 Subject: [PATCH 22/23] also upgrade should be manual --- test_suite/rhel_devel/cut/test_cut.py | 45 ++++++++++++++------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 19aaa2a5..81d45267 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -66,27 +66,28 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): """ test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') - time.sleep(1200) - console_lib.print_divider('Running leapp upgrade...') - result = test_lib.print_host_command_output( - host, - 'LEAPP_UNSUPPORTED=1 LEAPP_DEVEL_SKIP_CHECK_OS_RELEASE=1 ' - 'leapp upgrade --no-rhsm --enablerepo AppStream10 --enablerepo BaseOS10', - capture_result=True) - if result.failed: - reapp_report_file = '/var/log/leapp/leapp-report.txt' - if host.file(reapp_report_file).exists: - print('Leapp Report:\n', host.file(reapp_report_file).content_string) - - pytest.fail('RHEL major upgrade failed. Please check leapp-report.txt for more details.') - - console_lib.print_divider('Rebooting host...') - # 15 minutes of timeout due to performing a major upgrade - host = test_lib.reboot_host(host, max_timeout=900) - - assert version.parse(host.system_info.release).major == 10, \ - 'Failed to upgrade from RHEL-9.8 to RHEL-10.2 even after reboot.' - - console_lib.print_divider('Testing components AFTER major upgrade...') + # console_lib.print_divider('Running leapp upgrade...') + # result = test_lib.print_host_command_output( + # host, + # 'LEAPP_UNSUPPORTED=1 LEAPP_DEVEL_SKIP_CHECK_OS_RELEASE=1 ' + # 'leapp upgrade --no-rhsm --enablerepo AppStream10 --enablerepo BaseOS10', + # capture_result=True) + # + # if result.failed: + # reapp_report_file = '/var/log/leapp/leapp-report.txt' + # if host.file(reapp_report_file).exists: + # print('Leapp Report:\n', host.file(reapp_report_file).content_string) + # + # pytest.fail('RHEL major upgrade failed. Please check leapp-report.txt for more details.') + # + # console_lib.print_divider('Rebooting host...') + # # 15 minutes of timeout due to performing a major upgrade + # host = test_lib.reboot_host(host, max_timeout=900) + time.sleep(2500) + # + # assert version.parse(host.system_info.release).major == 10, \ + # 'Failed to upgrade from RHEL-9.8 to RHEL-10.2 even after reboot.' + # + # console_lib.print_divider('Testing components AFTER major upgrade...') assert run_cloudx_components_testing.main() From 1be4fbd610a502530b5b4894b4f7c954bfbbcf03 Mon Sep 17 00:00:00 2001 From: sshmulev Date: Thu, 5 Feb 2026 19:45:40 +0200 Subject: [PATCH 23/23] Make also upgrade manual --- test_suite/rhel_devel/cut/test_cut.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test_suite/rhel_devel/cut/test_cut.py b/test_suite/rhel_devel/cut/test_cut.py index 81d45267..f0ae3ed8 100644 --- a/test_suite/rhel_devel/cut/test_cut.py +++ b/test_suite/rhel_devel/cut/test_cut.py @@ -1,6 +1,6 @@ import pytest import time -from packaging import version +# from packaging import version from lib import test_lib, console_lib from test_suite.generic.test_generic import TestsSubscriptionManager as sub_man from test_suite.rhel_devel import run_cloudx_components_testing @@ -66,7 +66,6 @@ def test_cut_rhel_90_to_rhel_100(self, host, instance_data): """ test_lib.print_host_command_output(host, f'echo "{rhel_10_repo_file}" > {repo_file_name}') - # console_lib.print_divider('Running leapp upgrade...') # result = test_lib.print_host_command_output( # host,