Repository navigation
multiarch: IPv6 disconnected libvirt VPN workflow and UPI mirror prep - #77655
isumitsolanki wants to merge 4 commits into
Conversation
- 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
|
Skipping CI for Draft Pull Request. |
|
@isumitsolanki, Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/ok-to-test |
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.
Ipv6 registry naming fix
|
/test step-registry-metadata |
|
/test ci-operator-registry |
|
/test owners |
|
/test generated-config |
|
/test ci-operator-config |
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes 🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: isumitsolanki The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/pj-rehearse periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x |
|
@ibm-adarsh: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
There was a problem hiding this comment.
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 forMIRROR_INSECURE.Defaulting
MIRROR_INSECUREto"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
📒 Files selected for processing (13)
ci-operator/config/openshift/multiarch/openshift-multiarch-main__nightly-4.22.yamlci-operator/jobs/openshift/multiarch/openshift-multiarch-main-periodics.yamlci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/OWNERSci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/openshift-e2e-libvirt-vpn-ipv6-disconnected-workflow.metadata.jsonci-operator/step-registry/openshift/e2e/libvirt/vpn/ipv6-disconnected/openshift-e2e-libvirt-vpn-ipv6-disconnected-workflow.yamlci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-commands.shci-operator/step-registry/upi/conf/libvirt/network/upi-conf-libvirt-network-ref.yamlci-operator/step-registry/upi/conf/libvirt/upi-conf-libvirt-commands.shci-operator/step-registry/upi/conf/libvirt/upi-conf-libvirt-ref.yamlci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/OWNERSci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-commands.shci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-ref.metadata.jsonci-operator/step-registry/upi/libvirt/s390x/ipv6-disconnected/upi-libvirt-s390x-ipv6-disconnected-ref.yaml
| - mountPath: /secrets/gcs | ||
| name: gcs-credentials |
There was a problem hiding this comment.
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-pusherAlso 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.
| 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> |
There was a problem hiding this comment.
🧩 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:
- 1: https://mikefarah.gitbook.io/yq/v/v4.x/commands/evaluate
- 2: how to set yq exit status mikefarah/yq#992
- 3: length does not error when evaluating a non-existing element mikefarah/yq#683
🏁 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).
| 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). |
There was a problem hiding this comment.
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.
| 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" |
There was a problem hiding this comment.
🧩 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:
- 1: https://mikefarah.gitbook.io/yq/v/v4.x/commands/evaluate
- 2: length does not error when evaluating a non-existing element mikefarah/yq#683
- 3: https://mikefarah.gitbook.io/yq/commands/evaluate
- 4: silent fail when iterating null mikefarah/yq#2431
- 5: https://mikefarah.gitbook.io/yq/operators/traverse-read
- 6: how to set yq exit status mikefarah/yq#992
- 7: Reading non-existing property mikefarah/yq#539
🏁 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.
| 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 |
There was a problem hiding this comment.
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.
|
/pj-rehearse periodic-ci-openshift-multiarch-main-nightly-4.22-ocp-e2e-ovn-upi-remote-libvirt-ipv6-disconnected-s390x |
|
@isumitsolanki: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
[REHEARSALNOTIFIER]
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-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@isumitsolanki: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary by CodeRabbit
New Features