From 9607298bd9d6c83d71bf72e117e1ea21071d57c2 Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Tue, 16 Jun 2026 10:00:59 -0700 Subject: [PATCH 1/6] X-Smart-Branch-Parent: master From ec0b7cd1f948eee01bf699b5a698fe9697d72dbd Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Wed, 25 Mar 2026 12:06:27 -0700 Subject: [PATCH 2/6] Add RHCOS 10 integration tests for OCP 4.22+ OCP 4.22+ splits RHCOS boot images into separate files by RHEL version (coreos-rhel-9.json and coreos-rhel-10.json) instead of the single rhcos.json used by earlier releases. Update fetch_ocp_rhcos_bootimage.sh to accept an optional rhel-variant argument that selects the correct JSON file, while remaining backward compatible for older OCP versions. Consolidate the RHCOS image list to one image per RHEL minor version, keeping the newest OCP release for each track: - RHEL 10.2 (OCP 4.22), RHEL 9.6 (OCP 4.22), RHEL 9.4 (OCP 4.18), RHEL 9.2 (OCP 4.14), RHEL 8.6 (OCP 4.12) Co-Authored-By: Claude Opus 4.6 (1M context) --- ansible/group_vars/all.yml | 8 ++++---- ansible/scripts/fetch_ocp_rhcos_bootimage.sh | 12 ++++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 72237f4373..fdab540e84 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -72,9 +72,9 @@ virtual_machines: rhcos: project: rhcos-cloud images: - - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.19') }}" + - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-10') }}" + - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-9') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18') }}" - - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.14') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.12') }}" username: core @@ -93,9 +93,9 @@ virtual_machines: arch: arm64 machine_type: t2a-standard-2 images: - - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.19 aarch64.images.gcp.name') }}" + - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-10') }}" + - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-9') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18 aarch64.images.gcp.name') }}" - - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16 aarch64.images.gcp.name') }}" username: core ignition: ignition: diff --git a/ansible/scripts/fetch_ocp_rhcos_bootimage.sh b/ansible/scripts/fetch_ocp_rhcos_bootimage.sh index d90f57e016..e8034a4fb6 100755 --- a/ansible/scripts/fetch_ocp_rhcos_bootimage.sh +++ b/ansible/scripts/fetch_ocp_rhcos_bootimage.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ -z "$1" ]; then - echo "Usage: $0 []" + echo "Usage: $0 [] []" exit 1 fi @@ -10,7 +10,15 @@ OCP_VERSION=$1 # Json path with architecture and image name, e.g., x86_64.images.gcp.name or s390x.artifacts.ibmcloud.release JSONPATH=${2:-"x86_64.images.gcp.name"} -URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/rhcos.json" +# Optional RHEL variant (e.g., rhel-9, rhel-10) for OCP 4.22+ which splits +# RHCOS images into separate coreos-rhel-9.json and coreos-rhel-10.json files. +RHEL_VARIANT=${3:-""} + +if [ -n "$RHEL_VARIANT" ]; then + URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/coreos-${RHEL_VARIANT}.json" +else + URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/rhcos.json" +fi json_data=$(curl --retry 5 --retry-delay 2 -sS "$URL") if [ -z "$json_data" ]; then From cac6cb978f455a7b2b3289c44849e478563fbf3e Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Wed, 25 Mar 2026 12:29:51 -0700 Subject: [PATCH 3/6] Add OCP version to RHCOS VM names for 4.22+ images For OCP 4.22+ where images are fetched via the split coreos-rhel-*.json format, embed the OCP version into the VM display name so VMs are easily distinguishable (e.g., ci-rhcos-422-10-2-2- instead of ci-rhcos-10-2-20260-). The script now outputs display_name|gcp_image when a variant is specified, and by-image.yml splits on '|' to use the display name for VM naming while using the actual GCP image name for the image lookup. For old-style entries without '|', behavior is unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) --- ansible/roles/create-all-vms/tasks/by-image.yml | 12 ++++++++---- ansible/scripts/fetch_ocp_rhcos_bootimage.sh | 13 ++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ansible/roles/create-all-vms/tasks/by-image.yml b/ansible/roles/create-all-vms/tasks/by-image.yml index 6584ba2ed9..1799f1331e 100644 --- a/ansible/roles/create-all-vms/tasks/by-image.yml +++ b/ansible/roles/create-all-vms/tasks/by-image.yml @@ -3,10 +3,14 @@ - include_vars: s390x.yml - set_fact: - vm_hashable_name: "{{ item.1 }}-{{ job_id }}" - vm_image_short: "{{ item.1 | truncate(16, True, '') }}" + vm_display_name: "{{ item.1.split('|')[0] }}" + vm_gcp_image: "{{ item.1.split('|')[-1] }}" arch: "{{ item.0.value.arch | default('amd64') }}" +- set_fact: + vm_hashable_name: "{{ vm_display_name }}-{{ job_id }}" + vm_image_short: "{{ vm_display_name | truncate(16, True, '') }}" + - set_fact: vm_hashed_name: "{{ vm_hashable_name | hash('md5') | truncate(8, True, '') }}" @@ -37,9 +41,9 @@ # still populate the family, since it is used as a label to differentiate # VMs vm_family: "{{ item.0.key }}" - vm_image: "{{ item.1 | truncate(63, True, '') }}" + vm_image: "{{ vm_gcp_image | truncate(63, True, '') }}" vm_platform: "{{ item.0.key }}" - vm_config: "{{ item.1 }}" + vm_config: "{{ vm_display_name }}" vm_collection_method: "{{ collection_method | default('any') | replace('-', '_') }}" vm_available_zones: "{{ gcp_available_zones }}" vm_ignition: "{{ item.0.value.ignition | default({}) }}" diff --git a/ansible/scripts/fetch_ocp_rhcos_bootimage.sh b/ansible/scripts/fetch_ocp_rhcos_bootimage.sh index e8034a4fb6..86206a3f89 100755 --- a/ansible/scripts/fetch_ocp_rhcos_bootimage.sh +++ b/ansible/scripts/fetch_ocp_rhcos_bootimage.sh @@ -31,4 +31,15 @@ if [ "$image_name" == "null" ]; then echo "Failed to parse JSON data or path does not exist" exit 1 fi -echo "$image_name" + +# When using the split format (rhel-variant specified), output both a display +# name (with OCP version embedded) and the actual GCP image name, separated +# by '|'. This allows VMs to be easily distinguishable by OCP version. +# e.g., rhcos-422-10-2-20260217-0-gcp-x86-64|rhcos-10-2-20260217-0-gcp-x86-64 +if [ -n "$RHEL_VARIANT" ]; then + ocp_short="${OCP_VERSION//./}" + display_name="${image_name/rhcos-/rhcos-${ocp_short}-}" + echo "${display_name}|${image_name}" +else + echo "$image_name" +fi From 365215dae48bd9739f5232b80b2cb889b7151eb3 Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Wed, 25 Mar 2026 12:33:48 -0700 Subject: [PATCH 4/6] Revert "Add OCP version to RHCOS VM names for 4.22+ images" This reverts commit c23caaa1cc41089d1727b1ff5bd1ca0138d30190. --- ansible/roles/create-all-vms/tasks/by-image.yml | 12 ++++-------- ansible/scripts/fetch_ocp_rhcos_bootimage.sh | 13 +------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/ansible/roles/create-all-vms/tasks/by-image.yml b/ansible/roles/create-all-vms/tasks/by-image.yml index 1799f1331e..6584ba2ed9 100644 --- a/ansible/roles/create-all-vms/tasks/by-image.yml +++ b/ansible/roles/create-all-vms/tasks/by-image.yml @@ -3,14 +3,10 @@ - include_vars: s390x.yml - set_fact: - vm_display_name: "{{ item.1.split('|')[0] }}" - vm_gcp_image: "{{ item.1.split('|')[-1] }}" + vm_hashable_name: "{{ item.1 }}-{{ job_id }}" + vm_image_short: "{{ item.1 | truncate(16, True, '') }}" arch: "{{ item.0.value.arch | default('amd64') }}" -- set_fact: - vm_hashable_name: "{{ vm_display_name }}-{{ job_id }}" - vm_image_short: "{{ vm_display_name | truncate(16, True, '') }}" - - set_fact: vm_hashed_name: "{{ vm_hashable_name | hash('md5') | truncate(8, True, '') }}" @@ -41,9 +37,9 @@ # still populate the family, since it is used as a label to differentiate # VMs vm_family: "{{ item.0.key }}" - vm_image: "{{ vm_gcp_image | truncate(63, True, '') }}" + vm_image: "{{ item.1 | truncate(63, True, '') }}" vm_platform: "{{ item.0.key }}" - vm_config: "{{ vm_display_name }}" + vm_config: "{{ item.1 }}" vm_collection_method: "{{ collection_method | default('any') | replace('-', '_') }}" vm_available_zones: "{{ gcp_available_zones }}" vm_ignition: "{{ item.0.value.ignition | default({}) }}" diff --git a/ansible/scripts/fetch_ocp_rhcos_bootimage.sh b/ansible/scripts/fetch_ocp_rhcos_bootimage.sh index 86206a3f89..e8034a4fb6 100755 --- a/ansible/scripts/fetch_ocp_rhcos_bootimage.sh +++ b/ansible/scripts/fetch_ocp_rhcos_bootimage.sh @@ -31,15 +31,4 @@ if [ "$image_name" == "null" ]; then echo "Failed to parse JSON data or path does not exist" exit 1 fi - -# When using the split format (rhel-variant specified), output both a display -# name (with OCP version embedded) and the actual GCP image name, separated -# by '|'. This allows VMs to be easily distinguishable by OCP version. -# e.g., rhcos-422-10-2-20260217-0-gcp-x86-64|rhcos-10-2-20260217-0-gcp-x86-64 -if [ -n "$RHEL_VARIANT" ]; then - ocp_short="${OCP_VERSION//./}" - display_name="${image_name/rhcos-/rhcos-${ocp_short}-}" - echo "${display_name}|${image_name}" -else - echo "$image_name" -fi +echo "$image_name" From 5f886b3b15ba4d7a7d8a37b55bd7cc038df1f95b Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Tue, 16 Jun 2026 09:45:41 -0700 Subject: [PATCH 5/6] Add back OCP 4.16 and add 4.20 to RHCOS test matrix 4.16 still has extended support and should not have been removed. 4.20 is a current release that should be covered as well. --- ansible/group_vars/all.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index fdab540e84..e5141b3249 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -74,7 +74,9 @@ virtual_machines: images: - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-10') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-9') }}" + - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.20') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18') }}" + - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.14') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.12') }}" username: core @@ -95,7 +97,9 @@ virtual_machines: images: - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-10') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-9') }}" + - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.20 aarch64.images.gcp.name') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18 aarch64.images.gcp.name') }}" + - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16 aarch64.images.gcp.name') }}" username: core ignition: ignition: From 6feb165c34c9e12fb28e4241ed3d53b0215fb175 Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Tue, 16 Jun 2026 11:38:01 -0700 Subject: [PATCH 6/6] Add OCP version, RHEL version, and EUS dates to RHCOS image comments --- ansible/group_vars/all.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index e5141b3249..8c43c3098e 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -69,15 +69,22 @@ virtual_machines: - rhel-9-4-sap-ha container_engine: podman + # RHCOS lifecycle dates: https://access.redhat.com/support/policy/updates/openshift#dates rhcos: project: rhcos-cloud images: + # OCP 4.22 (RHEL 10.2 + 9.8), EUS until June 2029 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-10') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-9') }}" + # OCP 4.20 (RHEL 9.6), EUS until October 2028 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.20') }}" + # OCP 4.18 (RHEL 9.4), EUS until February 2028 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18') }}" + # OCP 4.16 (RHEL 9.4), EUS until June 2027 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16') }}" + # OCP 4.14 (RHEL 9.2), EUS until October 2026 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.14') }}" + # OCP 4.12 (RHEL 8.6), EUS until January 2027 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.12') }}" username: core ignition: @@ -95,10 +102,14 @@ virtual_machines: arch: arm64 machine_type: t2a-standard-2 images: + # OCP 4.22 (RHEL 10.2 + 9.8), EUS until June 2029 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-10') }}" - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-9') }}" + # OCP 4.20 (RHEL 9.6), EUS until October 2028 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.20 aarch64.images.gcp.name') }}" + # OCP 4.18 (RHEL 9.4), EUS until February 2028 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18 aarch64.images.gcp.name') }}" + # OCP 4.16 (RHEL 9.4), EUS until June 2027 - "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16 aarch64.images.gcp.name') }}" username: core ignition: