Skip to content

multiarch: IPv6 disconnected libvirt VPN workflow and UPI mirror prep - #77655

Closed
isumitsolanki wants to merge 4 commits into
openshift:mainfrom
isumitsolanki:ipv6-rhsl
Closed

isumitsolanki wants to merge 4 commits into
openshift:mainfrom
isumitsolanki:ipv6-rhsl

Conversation

@isumitsolanki

@isumitsolanki isumitsolanki commented Apr 10, 2026 •

Copy link
Copy Markdown
  • Add openshift-e2e-libvirt-upi-ipv6-disconnected (VPN path) mirroring VPN install/test/post plus optional oc adm release mirror from CI.
  • Add upi-libvirt-s390x-ipv6-disconnected-release-mirror ref and s390x dir.
  • Add IPV6_SINGLESTACK support in upi-conf-libvirt and network steps for IPv6-only lease-driven install-config and network.xml.
  • Wire ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x periodic in openshift-multiarch-main__nightly-4.22 with image-ecosystem and USE_EXTERNAL_DNS.

Summary by CodeRabbit

New Features

  • Added scheduled testing for s390x architecture with IPv6 single-stack networking in disconnected environments
  • Enabled release image mirroring capability for disconnected registry scenarios
  • Introduced IPv6-only libvirt network configuration support for end-to-end testing

- Add openshift-e2e-libvirt-upi-ipv6-disconnected (VPN path) mirroring VPN
  install/test/post plus optional oc adm release mirror from CI.
- Add upi-libvirt-s390x-ipv6-disconnected-release-mirror ref and s390x dir.
- Add IPV6_SINGLESTACK support in upi-conf-libvirt and network steps for
  IPv6-only lease-driven install-config and network.xml.
- Wire ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x periodic in
  openshift-multiarch-main__nightly-4.22 with image-ecosystem and USE_EXTERNAL_DNS.

Made-with: Cursor
@openshift-ci

openshift-ci Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 10, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@isumitsolanki, pj-rehearse: unable to determine affected jobs. This could be due to a branch that needs to be rebased. ERROR:

could not determine changed registry steps: could not load step registry: file /var/tmp/gitrepo3424901003/ci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/openshift-e2e-libvirt-upi-ipv6-disconnected-workflow.metadata.json has incorrect prefix. Prefix should be openshift-e2e-libvirt-vpn-ipv6-disconnected
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@v78singh

Copy link
Copy Markdown

/ok-to-test

@openshift-ci openshift-ci Bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 10, 2026
ibm-adarsh and others added 2 commits April 10, 2026 20:04
Align workflow and ref names with ci-operator path-derived prefixes:
- Rename openshift-e2e-libvirt-upi-ipv6-disconnected to
  openshift-e2e-libvirt-vpn-ipv6-disconnected under vpn/ipv6-disconnected.
- Rename upi-libvirt-s390x-ipv6-disconnected-release-mirror ref and
  use upi-libvirt-s390x-ipv6-disconnected-commands.sh per registry rules.

Update multiarch nightly config and regenerate periodic jobs.
@ibm-adarsh

Copy link
Copy Markdown
Member

/test step-registry-metadata

@ibm-adarsh

Copy link
Copy Markdown
Member

/test ci-operator-registry

@ibm-adarsh

Copy link
Copy Markdown
Member

/test owners

@ibm-adarsh

Copy link
Copy Markdown
Member

/test generated-config

@ibm-adarsh

Copy link
Copy Markdown
Member

/test ci-operator-config

@coderabbitai

coderabbitai Bot commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@isumitsolanki has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 31 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 40 minutes and 31 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 37e4a538-2ac6-490f-beb5-06ab2b7c76af

📥 Commits

Reviewing files that changed from the base of the PR and between b4c92bc and 048d437.

📒 Files selected for processing (1)
  • ci-operator/config/openshift/multiarch/openshift-multiarch-main__nightly-4.22.yaml

Walkthrough

This pull request adds CI infrastructure for testing OpenShift on s390x architecture using IPv6 single-stack disconnected networks with libvirt. It includes a new periodic test job, workflow definition, and supporting configuration steps for IPv6 network setup and release image mirroring.

Changes

Cohort / File(s) Summary
Test Configuration
ci-operator/config/openshift/multiarch/openshift-multiarch-main__nightly-4.22.yaml, ci-operator/jobs/openshift/multiarch/openshift-multiarch-main-periodics.yaml
Added new scheduled test entry ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x with libvirt-s390x-vpn cluster profile, IPv6/slow etcd configuration, and corresponding periodic job scheduled for Saturdays at 6 AM UTC.
Workflow Definition
ci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/...
Added new openshift-e2e-libvirt-vpn-ipv6-disconnected workflow with pre/test/post phases including IBM Z-specific IPv6 setup, libvirt configuration, etcd-on-ramfs, and post-phase log gathering. Includes metadata and ownership configuration.
IPv6 Single-Stack Network Support
ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.sh, ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-ref.yaml
Extended libvirt network configuration to conditionally generate IPv6-only network XML when IPV6_SINGLESTACK=true, including IPv6 gateway, DHCP range, and dnsmasq configuration. Added validation to reject IPv6 single-stack with agent installer type.
IPv6 Install-Config Support
ci-operator/step-registry/upi/conf/libvirt/upi-conf-libvirt-commands.sh, ci-operator/step-registry/upi/conf/libvirt/upi-conf-libvirt-ref.yaml
Added IPv6 single-stack install-config networking override that replaces machineNetwork, clusterNetwork, and serviceNetwork with IPv6 CIDR values from the lease file when IPV6_SINGLESTACK=true.
s390x Release Mirroring Step
ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/...
Added new step reference for s390x IPv6-disconnected testing with release image mirroring logic. Includes command script that conditionally mirrors OpenShift release images to a disconnected registry via oc adm release mirror, generates install-config and cluster upgrade fragments, and includes metadata and ownership configuration.
Ownership Configuration
ci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/OWNERS, ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/OWNERS
Added OWNERS files designating multiarch-approvers and multiarch-reviewers for new workflow and step directories.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

🚥 Pre-merge checks | ✅ 9 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Test Structure And Quality ❓ Inconclusive PR contains only infrastructure-as-code and CI/CD configuration files with no Ginkgo test code to review. Custom check is not applicable to this PR as it contains no Go test files or Ginkgo test blocks.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding an IPv6 disconnected libvirt VPN workflow and UPI release mirror preparation for multiarch, which aligns with the substantial additions across workflow definitions, step references, and periodic job configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed This PR contains only YAML configuration files, shell scripts, JSON metadata, and OWNERS files with no Ginkgo test files or Go test code.
Microshift Test Compatibility ✅ Passed This PR does not add any new Ginkgo e2e tests. All changes are CI infrastructure modifications consisting of YAML configuration files, shell scripts, workflow definitions, and supporting files. No Go test files with Ginkgo test patterns are present.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add any new Ginkgo e2e tests. Changes consist of CI configuration files, bash scripts, OWNERS metadata, and JSON workflow metadata. No Ginkgo test patterns or Go source files are present.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only CI/test infrastructure files in ci-operator/ directories with no production deployment manifests, operator code, or scheduling constraints affected.
Ote Binary Stdout Contract ✅ Passed This pull request does not violate the OTE Binary Stdout Contract because it only adds CI infrastructure configuration files and helper shell scripts that run as separate CI steps, not modifying the main openshift-tests binary.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR does not add any new Ginkgo e2e tests; all modifications are CI/CD infrastructure configurations and scripts without new Go test code.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci

openshift-ci Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: isumitsolanki
Once this PR has been reviewed and has the lgtm label, please assign mjturek for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ibm-adarsh

Copy link
Copy Markdown
Member

/pj-rehearse periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@ibm-adarsh: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (1)
ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-ref.yaml (1)

18-20: Prefer secure-by-default for MIRROR_INSECURE.

Defaulting MIRROR_INSECURE to "true" weakens baseline posture. Consider defaulting to "false" and enabling it explicitly per lab job when needed.

Suggested diff
   - name: MIRROR_INSECURE
-    default: "true"
+    default: "false"
     documentation: Use --insecure=true for the mirror registry (typical for lab registries with self-signed TLS).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-ref.yaml`
around lines 18 - 20, The MIRROR_INSECURE parameter currently defaults to
"true", which is insecure-by-default; change the default value of the
MIRROR_INSECURE variable to "false" (and update its documentation text if
needed) so registries are treated as secure by default, and ensure any
lab/job-specific configs explicitly set MIRROR_INSECURE="true" when they require
insecure (self-signed) mirrors; locate the MIRROR_INSECURE entry in the YAML
(variable name MIRROR_INSECURE) and flip its default to "false".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@ci-operator/config/openshift/multiarch/openshift-multiarch-main__nightly-4.22.yaml`:
- Around line 500-508: Add IPV6_SINGLESTACK: "true" to the job's env block so
the openshift-e2e-libvirt-vpn-ipv6-disconnected workflow runs in IPv6
single‑stack mode; locate the env section containing ARCH, BRANCH,
ENABLE_RELEASE_MIRROR, ETCD_DISK_SPEED, NODE_TUNING, TEST_TYPE, and
USE_EXTERNAL_DNS and insert IPV6_SINGLESTACK: "true" alongside them to ensure
the upi-conf-libvirt steps use IPv6 instead of defaulting to IPv4.

In
`@ci-operator/jobs/openshift/multiarch/openshift-multiarch-main-periodics.yaml`:
- Around line 50563-50564: The pod spec mounts a volume named "gcs-credentials"
(mountPath: /secrets/gcs) but there is no corresponding entry in spec.volumes,
causing the pod to be invalid; add a volume entry named "gcs-credentials" under
the pod template's spec.volumes for the affected job(s) (the same block that
contains the container with the mount) and point it to the appropriate Secret
(e.g., secretName: <your-gcs-secret>) or other backing source so the mount
resolves; update every occurrence mentioned (including the other ranges) to
ensure each periodic defines the "gcs-credentials" volume.

In
`@ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.sh`:
- Around line 98-140: The IPV6 branch writes network.xml using values from
leaseLookup but leaseLookup only checks for empty strings and not the literal
"null" that yq returns for missing paths, which allows "null" to be inserted
into attributes; update the leaseLookup function to treat "null" as missing
(e.g., after calling yq-v4, fail if the result is empty OR equals the string
"null") so it exits with an error before generating network.xml (this affects
all callers in the IPV6_SINGLESTACK block that reference gateway, ipv6.prefix,
ipv6.dhcp_start/end, bootstrap[0].ipv6, control-plane[*].ipv6/.mac,
compute[*].ipv6/.mac, and the dnsmasq option).

In
`@ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-ref.yaml`:
- Around line 13-15: Update the documentation text so it reflects that setting
the IPv6-only flag to "true" will cause a hard failure for INSTALLER_TYPE=agent
rather than being ignored; specifically, modify the description for the
IPv6-only flag (the documentation block currently saying "Ignored for
INSTALLER_TYPE=agent") to state it will cause the script
upi-conf-libvirt-network-commands.sh to exit with failure (exit 1) when
INSTALLER_TYPE=agent and the flag is true, so job authors know this will fail
instead of no-op.

In `@ci-operator/step-registry/upi/conf/libvirt/upi-conf-libvirt-commands.sh`:
- Around line 90-95: The leaseLookup function currently treats only empty output
as missing, but yq-v4 returns the string "null" for absent keys so IPv6 lease
values can be inserted as "null" into install-config.yaml; update the
leaseLookup function to run yq-v4 with a raw/plain output flag (as used
elsewhere) and fail if the result is empty or exactly "null" (e.g., if [[ -z
"$lookup" || "$lookup" == "null" ]]; then echo "Couldn't find $1 in lease
config"; exit 1; fi), keeping the same callers (leaseLookup
'ipv6.machine_network_cidr', 'ipv6.cluster_network_cidr',
'ipv6.service_network_cidr') unchanged.

In
`@ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-commands.sh`:
- Around line 62-73: The current block handles the case where the sentinel line
is missing but not when sed extracts empty fragments; after running sed for
"${install_patch}" and "${SHARED_DIR}/cluster-mirror-upgrade-fragment.txt",
check whether those files exist and are non-empty (use the variables
install_patch and "${SHARED_DIR}/cluster-mirror-upgrade-fragment.txt"); if
either is missing or zero-length, echo a warning and copy the full mirror_log to
"${SHARED_DIR}/release-mirror-full.log" (using mirror_log and SHARED_DIR) so
diagnostics are preserved; keep the existing branch that handles missing
sentinel but add this emptiness-fallback inside the branch that found line_num
(using line_num, install_end_line_num, upgrade_start_line_num) so
partial-extraction failures are covered.

---

Nitpick comments:
In
`@ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-ref.yaml`:
- Around line 18-20: The MIRROR_INSECURE parameter currently defaults to "true",
which is insecure-by-default; change the default value of the MIRROR_INSECURE
variable to "false" (and update its documentation text if needed) so registries
are treated as secure by default, and ensure any lab/job-specific configs
explicitly set MIRROR_INSECURE="true" when they require insecure (self-signed)
mirrors; locate the MIRROR_INSECURE entry in the YAML (variable name
MIRROR_INSECURE) and flip its default to "false".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6827ca91-ca01-413a-b796-07262f4e9459

📥 Commits

Reviewing files that changed from the base of the PR and between f57c7ab and b4c92bc.

📒 Files selected for processing (13)
  • ci-operator/config/openshift/multiarch/openshift-multiarch-main__nightly-4.22.yaml
  • ci-operator/jobs/openshift/multiarch/openshift-multiarch-main-periodics.yaml
  • ci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/OWNERS
  • ci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/openshift-e2e-libvirt-vpn-ipv6-disconnected-workflow.metadata.json
  • ci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/openshift-e2e-libvirt-vpn-ipv6-disconnected-workflow.yaml
  • ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.sh
  • ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-ref.yaml
  • ci-operator/step-registry/upi/conf/libvirt/upi-conf-libvirt-commands.sh
  • ci-operator/step-registry/upi/conf/libvirt/upi-conf-libvirt-ref.yaml
  • ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/OWNERS
  • ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-commands.sh
  • ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-ref.metadata.json
  • ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-ref.yaml

Comment on lines +50563 to +50564
- mountPath: /secrets/gcs
name: gcs-credentials

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Add the missing gcs-credentials volume.

This container mounts gcs-credentials, but spec.volumes never defines it. The pod spec will be rejected, so this periodic will never start.

🩹 Proposed fix
     - name: ci-pull-credentials
       secret:
         secretName: ci-pull-credentials
+    - name: gcs-credentials
+      secret:
+        secretName: gcs-credentials
     - name: manifest-tool-local-pusher
       secret:
         secretName: manifest-tool-local-pusher

Also applies to: 50576-50594

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci-operator/jobs/openshift/multiarch/openshift-multiarch-main-periodics.yaml`
around lines 50563 - 50564, The pod spec mounts a volume named "gcs-credentials"
(mountPath: /secrets/gcs) but there is no corresponding entry in spec.volumes,
causing the pod to be invalid; add a volume entry named "gcs-credentials" under
the pod template's spec.volumes for the affected job(s) (the same block that
contains the container with the mount) and point it to the appropriate Secret
(e.g., secretName: <your-gcs-secret>) or other backing source so the mount
resolves; update every occurrence mentioned (including the other ranges) to
ensure each periodic defines the "gcs-credentials" volume.

Comment on lines +98 to +140
if [ "${IPV6_SINGLESTACK:-false}" == "true" ]; then
cat >> "${SHARED_DIR}/network.xml" << EOF
<network xmlns:dnsmasq='http://libvirt.org/schemas/network/dnsmasq/1.0'>
<name>${CLUSTER_NAME}</name>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='ocp$(leaseLookup "subnet")' stp='on' delay='0'/>
<domain name='${BASE_URL}' localOnly='yes'/>
<dns enable='yes'>
<host ip='$(leaseLookup '"bootstrap"[0].ipv6')'>
<hostname>api.${BASE_URL}</hostname>
<hostname>api-int.${BASE_URL}</hostname>
</host>
<host ip='$(leaseLookup '"control-plane"[0].ipv6')'>
<hostname>api.${BASE_URL}</hostname>
<hostname>api-int.${BASE_URL}</hostname>
</host>
<host ip='$(leaseLookup '"control-plane"[1].ipv6')'>
<hostname>api.${BASE_URL}</hostname>
<hostname>api-int.${BASE_URL}</hostname>
</host>
<host ip='$(leaseLookup '"control-plane"[2].ipv6')'>
<hostname>api.${BASE_URL}</hostname>
<hostname>api-int.${BASE_URL}</hostname>
</host>
</dns>
<ip family='ipv6' address='$(leaseLookup 'ipv6.gateway')' prefix='$(leaseLookup 'ipv6.prefix')'>
<dhcp>
<range start='$(leaseLookup 'ipv6.dhcp_start')' end='$(leaseLookup 'ipv6.dhcp_end')'/>
<host mac='$(leaseLookup 'bootstrap[0].mac')' name='bootstrap.${BASE_URL}' ip='$(leaseLookup 'bootstrap[0].ipv6')'/>
<host mac='$(leaseLookup '"control-plane"[0].mac')' name='control-0.${BASE_URL}' ip='$(leaseLookup '"control-plane"[0].ipv6')'/>
<host mac='$(leaseLookup '"control-plane"[1].mac')' name='control-1.${BASE_URL}' ip='$(leaseLookup '"control-plane"[1].ipv6')'/>
<host mac='$(leaseLookup '"control-plane"[2].mac')' name='control-2.${BASE_URL}' ip='$(leaseLookup '"control-plane"[2].ipv6')'/>
<host mac='$(leaseLookup 'compute[0].mac')' name='compute-0.${BASE_URL}' ip='$(leaseLookup 'compute[0].ipv6')'/>
<host mac='$(leaseLookup 'compute[1].mac')' name='compute-1.${BASE_URL}' ip='$(leaseLookup 'compute[1].ipv6')'/>
</dhcp>
</ip>
<dnsmasq:options>
<dnsmasq:option value='address=/.apps.${BASE_URL}/$(leaseLookup 'ipv6.gateway')'/>
</dnsmasq:options>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

For mikefarah/yq v4, what does yq eval '.missing.path' file.yaml output, and what exit status does it return when the path does not exist?

💡 Result:

For mikefarah/yq v4, when running yq eval '.missing.path' file.yaml where the path does not exist in file.yaml, it outputs the YAML null value: null and returns exit status 0.

Citations:


🏁 Script executed:

cat -n ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.sh | sed -n '32,40p'

Repository: openshift/release

Length of output: 346


🏁 Script executed:

cat -n ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.sh | sed -n '98,110p'

Repository: openshift/release

Length of output: 637


🏁 Script executed:

cat -n ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.sh | sed -n '98,145p'

Repository: openshift/release

Length of output: 2728


Reject null lease values before emitting network.xml.

This IPv6 branch depends on leaseLookup, but that helper only checks for empty strings. When yq eval encounters a missing path, it returns the literal string null with exit status 0, and the current check [[ -z "${lookup}" ]] will not catch it. This results in invalid XML with attributes like ip='null' or address='null' instead of failing fast.

The code makes 15+ leaseLookup calls across critical fields (gateway, DHCP ranges, node MACs and addresses), all vulnerable to silent null injection.

Example hardening
function leaseLookup () {
  local lookup
  lookup=$(yq-v4 -oy ".\"${LEASED_RESOURCE}\".${1}" "${LEASE_CONF}")
  if [[ -z "${lookup}" || "${lookup}" == "null" ]]; then
    echo "Couldn't find ${1} in lease config"
    exit 1
  fi
  echo "${lookup}"
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.sh`
around lines 98 - 140, The IPV6 branch writes network.xml using values from
leaseLookup but leaseLookup only checks for empty strings and not the literal
"null" that yq returns for missing paths, which allows "null" to be inserted
into attributes; update the leaseLookup function to treat "null" as missing
(e.g., after calling yq-v4, fail if the result is empty OR equals the string
"null") so it exits with an error before generating network.xml (this affects
all callers in the IPV6_SINGLESTACK block that reference gateway, ipv6.prefix,
ipv6.dhcp_start/end, bootstrap[0].ipv6, control-plane[*].ipv6/.mac,
compute[*].ipv6/.mac, and the dnsmasq option).

Comment on lines +13 to +15
documentation: |-
When "true", emit IPv6-only libvirt network.xml (DHCP/DNS for IPv6). Requires ipv6.* and
node IPv6 addresses in the lease file. Ignored for INSTALLER_TYPE=agent (unsupported).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Document the agent case as a hard failure.

This says the flag is "ignored" for INSTALLER_TYPE=agent, but ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.sh now exits 1 for that combination. Please align the wording so job authors know this will fail, not no-op.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@ci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-ref.yaml`
around lines 13 - 15, Update the documentation text so it reflects that setting
the IPv6-only flag to "true" will cause a hard failure for INSTALLER_TYPE=agent
rather than being ignored; specifically, modify the description for the
IPv6-only flag (the documentation block currently saying "Ignored for
INSTALLER_TYPE=agent") to state it will cause the script
upi-conf-libvirt-network-commands.sh to exit with failure (exit 1) when
INSTALLER_TYPE=agent and the flag is true, so job authors know this will fail
instead of no-op.

Comment on lines +90 to +95
if [ "${IPV6_SINGLESTACK:-false}" == "true" ]; then
echo "Applying IPv6 single-stack networking to install-config.yaml..."
IPV6_CLUSTER_HP="$(yq-v4 -r ".\"${LEASED_RESOURCE}\".ipv6.cluster_host_prefix // 64" "${CLUSTER_PROFILE_DIR}/leases")"
yq-v4 eval -i ".networking.machineNetwork = [{\"cidr\": \"$(leaseLookup 'ipv6.machine_network_cidr')\"}]" "${SHARED_DIR}/install-config.yaml"
yq-v4 eval -i ".networking.clusterNetwork = [{\"cidr\": \"$(leaseLookup 'ipv6.cluster_network_cidr')\", \"hostPrefix\": ${IPV6_CLUSTER_HP}}]" "${SHARED_DIR}/install-config.yaml"
yq-v4 eval -i ".networking.serviceNetwork = [\"$(leaseLookup 'ipv6.service_network_cidr')\"]" "${SHARED_DIR}/install-config.yaml"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

For mikefarah/yq v4, what does yq eval '.missing.path' file.yaml output, and what exit status does it return when the path does not exist?

💡 Result:

For mikefarah/yq v4, the command yq eval '.missing.path' file.yaml outputs the string "null" when the path does not exist. It returns exit status 0 (success). To make it return a non-zero exit status (1) when the path is missing or evaluates to null/false/no matches, use the --exit-status (or -e) flag: yq eval -e '.missing.path' file.yaml. This behavior aligns with jq (which yq emulates), where missing paths evaluate to null without error, printing "null" unless suppressed. The --exit-status flag changes the exit code based on matches/null/false results, as documented in official eval command flags and confirmed in multiple GitHub issues/discussions where missing paths produce null output with exit 0 by default.

Citations:


🏁 Script executed:

# First, locate the file and check its content around the specified lines
fd -type f -name "upi-conf-libvirt-commands.sh" | head -1 | xargs -I {} sh -c 'echo "File: {}"; wc -l {}'

Repository: openshift/release

Length of output: 231


🏁 Script executed:

# Read the file to see the leaseLookup function definition and the IPv6 block
fd -type f -name "upi-conf-libvirt-commands.sh" | head -1 | xargs -I {} cat -n {} | sed -n '15,100p'

Repository: openshift/release

Length of output: 231


🏁 Script executed:

# Locate the file using git ls-files
git ls-files | grep "upi-conf-libvirt-commands.sh"

Repository: openshift/release

Length of output: 132


🏁 Script executed:

# Once found, read the relevant sections
fd "upi-conf-libvirt-commands.sh" 2>/dev/null | head -1 | xargs cat -n | sed -n '15,100p'

Repository: openshift/release

Length of output: 3261


Fail fast on missing IPv6 lease keys.

The leaseLookup function (line 19–27) only checks for empty strings with [[ -z "${lookup}" ]]. When yq-v4 encounters a missing path, it returns the literal string "null" with exit status 0, so this check bypasses the error. If any IPv6 lease key is missing (lines 93–95), the script will insert "null" into install-config.yaml instead of failing fast, creating an invalid configuration.

Harden leaseLookup to reject both empty and "null" outputs:

Example fix
function leaseLookup () {
  local lookup
  lookup=$(yq-v4 -oy ".\"${LEASED_RESOURCE}\".${1}" "${CLUSTER_PROFILE_DIR}/leases")
  if [[ -z "${lookup}" || "${lookup}" == "null" ]]; then
    echo "Couldn't find ${1} in lease config"
    exit 1
  fi
  echo "${lookup}"
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci-operator/step-registry/upi/conf/libvirt/upi-conf-libvirt-commands.sh`
around lines 90 - 95, The leaseLookup function currently treats only empty
output as missing, but yq-v4 returns the string "null" for absent keys so IPv6
lease values can be inserted as "null" into install-config.yaml; update the
leaseLookup function to run yq-v4 with a raw/plain output flag (as used
elsewhere) and fail if the result is empty or exactly "null" (e.g., if [[ -z
"$lookup" || "$lookup" == "null" ]]; then echo "Couldn't find $1 in lease
config"; exit 1; fi), keeping the same callers (leaseLookup
'ipv6.machine_network_cidr', 'ipv6.cluster_network_cidr',
'ipv6.service_network_cidr') unchanged.

Comment on lines +62 to +73
line_num=$(grep -n "To use the new mirrored repository for upgrades" "${mirror_log}" | head -1 | cut -d: -f1 || true)
if [[ -n "${line_num}" ]] && [[ "${line_num}" =~ ^[0-9]+$ ]]; then
install_end_line_num=$((line_num - 3))
upgrade_start_line_num=$((line_num + 2))
if [[ ${install_end_line_num} -gt 0 ]]; then
sed -n "/^${regex_keyword}/,${install_end_line_num}p" "${mirror_log}" > "${install_patch}" || true
fi
sed -n "${upgrade_start_line_num},\$p" "${mirror_log}" > "${SHARED_DIR}/cluster-mirror-upgrade-fragment.txt" || true
else
echo "Could not parse mirror log for install-config fragment; see ${mirror_log}"
cp "${mirror_log}" "${SHARED_DIR}/release-mirror-full.log"
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Handle partial extraction failures, not just missing sentinel line.

If Line 62 finds the sentinel but sed yields empty fragments (CLI output drift), the script silently proceeds without writing fallback diagnostics. Add an emptiness check and copy the full log in that path too.

Suggested diff
 install_patch="${SHARED_DIR}/install-config-mirror-fragment.yaml"
+upgrade_fragment="${SHARED_DIR}/cluster-mirror-upgrade-fragment.txt"
 line_num=$(grep -n "To use the new mirrored repository for upgrades" "${mirror_log}" | head -1 | cut -d: -f1 || true)
 if [[ -n "${line_num}" ]] && [[ "${line_num}" =~ ^[0-9]+$ ]]; then
   install_end_line_num=$((line_num - 3))
   upgrade_start_line_num=$((line_num + 2))
   if [[ ${install_end_line_num} -gt 0 ]]; then
     sed -n "/^${regex_keyword}/,${install_end_line_num}p" "${mirror_log}" > "${install_patch}" || true
   fi
-  sed -n "${upgrade_start_line_num},\$p" "${mirror_log}" > "${SHARED_DIR}/cluster-mirror-upgrade-fragment.txt" || true
+  sed -n "${upgrade_start_line_num},\$p" "${mirror_log}" > "${upgrade_fragment}" || true
+  if [[ ! -s "${install_patch}" || ! -s "${upgrade_fragment}" ]]; then
+    echo "Parsed mirror fragments are empty; copying full mirror log."
+    cp "${mirror_log}" "${SHARED_DIR}/release-mirror-full.log"
+  fi
 else
   echo "Could not parse mirror log for install-config fragment; see ${mirror_log}"
   cp "${mirror_log}" "${SHARED_DIR}/release-mirror-full.log"
 fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@ci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-commands.sh`
around lines 62 - 73, The current block handles the case where the sentinel line
is missing but not when sed extracts empty fragments; after running sed for
"${install_patch}" and "${SHARED_DIR}/cluster-mirror-upgrade-fragment.txt",
check whether those files exist and are non-empty (use the variables
install_patch and "${SHARED_DIR}/cluster-mirror-upgrade-fragment.txt"); if
either is missing or zero-length, echo a warning and copy the full mirror_log to
"${SHARED_DIR}/release-mirror-full.log" (using mirror_log and SHARED_DIR) so
diagnostics are preserved; keep the existing branch that handles missing
sentinel but add this emptiness-fallback inside the branch that found line_num
(using line_num, install_end_line_num, upgrade_start_line_num) so
partial-extraction failures are covered.

@isumitsolanki

Copy link
Copy Markdown
Author

/pj-rehearse periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@isumitsolanki: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@isumitsolanki: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-rhcos10-techpreview-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.17-ocp-heavy-build-ovn-remote-libvirt-multi-z-z N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.17-ocp-e2e-serial-ovn-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-5.0-ocp-e2e-ovn-agent-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.20-ocp-e2e-ovn-agent-remote-libvirt-multi-z-z N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.17-ocp-e2e-ovn-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.23-ocp-image-ecosystem-ovn-remote-libvirt-multi-z-z N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.17-ocp-e2e-ovn-agent-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-serial-ovn-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.19-ocp-image-ecosystem-ovn-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.19-ocp-fips-ovn-remote-libvirt-multi-z-z N/A periodic Registry content changed
periodic-ci-openshift-operator-framework-olm-release-4.21-periodics-e2e-compact-ovn-remote-libvirt-s390x-extended-f2 N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x N/A periodic Periodic changed
periodic-ci-openshift-multiarch-main-nightly-4.17-ocp-e2e-ovn-remote-libvirt-s390x N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.16-ocp-e2e-serial-ovn-remote-libvirt-s390x N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.20-ocp-image-ecosystem-ovn-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-agent-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-operator-framework-operator-controller-release-4.22-periodics-e2e-ovn-remote-libvirt-ppc64le-extended-f2 N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.20-ocp-e2e-ovn-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.19-ocp-heavy-build-ovn-remote-libvirt-multi-s390x N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.16-ocp-image-ecosystem-ovn-remote-s2s-libvirt-ppc64le N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.17-ocp-image-ecosystem-ovn-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.23-ocp-fips-ovn-remote-s2s-libvirt-multi-p-p N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-5.0-upgrade-from-nightly-4.22-ocp-ovn-remote-libvirt-multi-z-z N/A periodic Registry content changed
periodic-ci-openshift-multiarch-main-nightly-4.23-ocp-fips-ovn-remote-libvirt-multi-z-z N/A periodic Registry content changed

A total of 165 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci

openshift-ci Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

@isumitsolanki: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/step-registry-metadata 6001451 link true /test step-registry-metadata
ci/prow/ci-operator-config 6001451 link true /test ci-operator-config
ci/rehearse/periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x 048d437 link unknown /pj-rehearse periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x
ci/prow/owners 6001451 link true /test owners
ci/prow/generated-config 6001451 link true /test generated-config
ci/prow/ci-operator-registry 6001451 link true /test ci-operator-registry

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@isumitsolanki isumitsolanki closed this by deleting the head repository Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants