From fccc6293d2f0fc8462fec9769317977db7d44e8e Mon Sep 17 00:00:00 2001 From: Gregory Giguashvili Date: Sat, 12 Apr 2025 07:56:37 +0300 Subject: [PATCH 1/4] Temporarily use centos base image for rhel-9.6 bootc ISO creation --- .../layer1-base/group2/rhel96-bootc.image-bootc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/image-blueprints-bootc/layer1-base/group2/rhel96-bootc.image-bootc b/test/image-blueprints-bootc/layer1-base/group2/rhel96-bootc.image-bootc index 2251f5a13a..51606a89d1 100644 --- a/test/image-blueprints-bootc/layer1-base/group2/rhel96-bootc.image-bootc +++ b/test/image-blueprints-bootc/layer1-base/group2/rhel96-bootc.image-bootc @@ -1 +1,6 @@ -registry.stage.redhat.io/rhel9-eus/rhel-9.6-bootc:9.6 \ No newline at end of file +# Note: +# This is a workaround for the problem described in https://issues.redhat.com/browse/USHIFT-5584. +# Revert to the rhel-9.6 base image when it is in GA. +# +# registry.stage.redhat.io/rhel9-eus/rhel-9.6-bootc:9.6 +quay.io/centos-bootc/centos-bootc:stream9 From 5fe02197bb25a4bc71ef2003853583e6ea0c89f9 Mon Sep 17 00:00:00 2001 From: Gregory Giguashvili Date: Sat, 12 Apr 2025 07:56:54 +0300 Subject: [PATCH 2/4] Allow comments in .image-bootc input files --- test/bin/pyutils/build_bootc_images.py | 5 ++--- test/bin/pyutils/common.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/test/bin/pyutils/build_bootc_images.py b/test/bin/pyutils/build_bootc_images.py index cee7435cdd..1b334277fb 100644 --- a/test/bin/pyutils/build_bootc_images.py +++ b/test/bin/pyutils/build_bootc_images.py @@ -32,7 +32,7 @@ PULL_SECRET = common.get_env_var('PULL_SECRET', f"{HOME_DIR}/.pull-secret.json") # Switch to quay.io/centos-bootc/bootc-image-builder:latest if any new upstream # features are required -BIB_IMAGE = "registry.redhat.io/rhel9/bootc-image-builder:latest" +BIB_IMAGE = "registry.stage.redhat.io/rhel9-eus/rhel-9.6-bootc-image-builder:9.6" GOMPLATE = common.get_env_var('GOMPLATE') MIRROR_REGISTRY = common.get_env_var('MIRROR_REGISTRY_URL') FORCE_REBUILD = False @@ -362,7 +362,7 @@ def should_skip(file): common.record_junit(bf_path, "pull-bootc-bib", "OK", start) # Read the image reference - bf_imgref = common.read_file(bf_outfile).strip() + bf_imgref = common.read_file_valid_lines(bf_outfile).strip() # If not already local, download the image to be used by bootc image builder if not bf_imgref.startswith('localhost/'): @@ -388,7 +388,6 @@ def should_skip(file): build_args += [ BIB_IMAGE, "--type", "anaconda-iso", - "--local", bf_imgref ] start = time.time() diff --git a/test/bin/pyutils/common.py b/test/bin/pyutils/common.py index e87d625bd5..68b6421f35 100644 --- a/test/bin/pyutils/common.py +++ b/test/bin/pyutils/common.py @@ -183,6 +183,17 @@ def read_file(file_path: str): return content +def read_file_valid_lines(file_path: str): + """Read the file contents skipping empty and commented lines and return them to the caller""" + content = [] + with open(file_path, 'r') as file: + for line in file: + sline = line.strip() + if sline and not sline.startswith('#'): + content.append(line) + return ''.join(content) + + def append_file(file_path: str, content: str): """Append the specified content to a file""" with open(file_path, 'a') as file: From 1a02554cf02ad3bf1f758be5bfb51d516fdabe02 Mon Sep 17 00:00:00 2001 From: Gregory Giguashvili Date: Sat, 12 Apr 2025 18:30:02 +0300 Subject: [PATCH 3/4] Work around rhel-9.6 offline ISO build problem --- .../layer1-base/group1/rhel96-test-agent.containerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/image-blueprints-bootc/layer1-base/group1/rhel96-test-agent.containerfile b/test/image-blueprints-bootc/layer1-base/group1/rhel96-test-agent.containerfile index 58add11486..d78a25e20f 100644 --- a/test/image-blueprints-bootc/layer1-base/group1/rhel96-test-agent.containerfile +++ b/test/image-blueprints-bootc/layer1-base/group1/rhel96-test-agent.containerfile @@ -1,4 +1,9 @@ -FROM registry.stage.redhat.io/rhel9-eus/rhel-9.6-bootc:9.6 +# Note: +# This is a workaround for the problem described in https://issues.redhat.com/browse/USHIFT-5584. +# Revert to the rhel-9.6 base image when it is in GA. +# +# FROM registry.stage.redhat.io/rhel9-eus/rhel-9.6-bootc:9.6 +FROM quay.io/centos-bootc/centos-bootc:stream9 # Build arguments ARG USHIFT_RPM_REPO_NAME=microshift-local From 5aee1acc0f37d34b5fd36e0fe6093cec74dc5d00 Mon Sep 17 00:00:00 2001 From: Gregory Giguashvili Date: Mon, 14 Apr 2025 08:29:23 +0300 Subject: [PATCH 4/4] Work around OS version check in standard suite --- test/scenarios-bootc/periodics/el96-crel@brew-standard1.sh | 7 ++++++- .../scenarios-bootc/presubmits/el96-src@standard-suite1.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/scenarios-bootc/periodics/el96-crel@brew-standard1.sh b/test/scenarios-bootc/periodics/el96-crel@brew-standard1.sh index 96eb3ca22c..55c040c7fb 100644 --- a/test/scenarios-bootc/periodics/el96-crel@brew-standard1.sh +++ b/test/scenarios-bootc/periodics/el96-crel@brew-standard1.sh @@ -11,8 +11,13 @@ scenario_remove_vms() { remove_vm host1 } +# Note: +# This is a workaround for the problem described in https://issues.redhat.com/browse/USHIFT-5584. +# Revert to the rhel-9.6 base image when it is in GA. +# +# --variable "EXPECTED_OS_VERSION:9.6" \ scenario_run_tests() { run_tests host1 \ - --variable "EXPECTED_OS_VERSION:9.6" \ + --variable "EXPECTED_OS_VERSION:9" \ suites/standard1/ suites/selinux/validate-selinux-policy.robot } diff --git a/test/scenarios-bootc/presubmits/el96-src@standard-suite1.sh b/test/scenarios-bootc/presubmits/el96-src@standard-suite1.sh index d30951a6ce..253bac3200 100644 --- a/test/scenarios-bootc/presubmits/el96-src@standard-suite1.sh +++ b/test/scenarios-bootc/presubmits/el96-src@standard-suite1.sh @@ -11,8 +11,13 @@ scenario_remove_vms() { remove_vm host1 } +# Note: +# This is a workaround for the problem described in https://issues.redhat.com/browse/USHIFT-5584. +# Revert to the rhel-9.6 base image when it is in GA. +# +# --variable "EXPECTED_OS_VERSION:9.6" \ scenario_run_tests() { run_tests host1 \ - --variable "EXPECTED_OS_VERSION:9.6" \ + --variable "EXPECTED_OS_VERSION:9" \ suites/standard1/ suites/selinux/validate-selinux-policy.robot }