Skip to content

Add draft s390x VPN connectivity test - #82562

Draft
Davo911 wants to merge 2 commits into
openshift:mainfrom
Davo911:ssp-s390x-vpn-connectivity-test
Draft

Add draft s390x VPN connectivity test#82562
Davo911 wants to merge 2 commits into
openshift:mainfrom
Davo911:ssp-s390x-vpn-connectivity-test

Conversation

@Davo911

@Davo911 Davo911 commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

Blocked by

Summary by CodeRabbit

Adds draft s390x VPN connectivity coverage to the ssp-operator repository’s periodic CI jobs.

The workflow tests VPN access to libvirt hosts by checking port 7001 and running a remote libvirt query with retries. The configuration adds the required libvirt-installer image, s390x settings, ownership metadata, DNS servers, and a daily e2e-s390x-vpn-connectivity job.

Rehearsal depends on Boskos lease and secret bootstrap prerequisites.

Introduce kubevirt-libvirt-vpn workflow/ref (pattern from openshift#72780)
and a periodic connectivity job for libvirt-s390x-vpn-virt
Signed-off-by: Thomas-David Griedel griedel911@gmail.com
@openshift-ci

openshift-ci Bot commented Jul 28, 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 Jul 28, 2026
@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Davo911
Once this PR has been reviewed and has the lgtm label, please assign ksimon1, qinqon 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

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: d12ff531-9bc3-404c-9e71-461225f8ea7c

📥 Commits

Reviewing files that changed from the base of the PR and between 2068cf2 and c425720.

📒 Files selected for processing (7)
  • ci-operator/config/kubevirt/ssp-operator/kubevirt-ssp-operator-main.yaml
  • ci-operator/step-registry/kubevirt/libvirt/vpn/OWNERS
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-commands.sh
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-ref.metadata.json
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-ref.yaml
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-workflow.metadata.json
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-workflow.yaml
🚧 Files skipped from review as they are similar to previous changes (7)
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-ref.metadata.json
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-ref.yaml
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-workflow.yaml
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-workflow.metadata.json
  • ci-operator/step-registry/kubevirt/libvirt/vpn/OWNERS
  • ci-operator/config/kubevirt/ssp-operator/kubevirt-ssp-operator-main.yaml
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-commands.sh

Walkthrough

Adds a scheduled s390x CI workflow that uses the libvirt-installer image to validate VPN reachability, port 7001 access, and remote libvirt connectivity against leased hosts.

Changes

s390x VPN connectivity CI

Layer / File(s) Summary
VPN validation step and workflow
ci-operator/step-registry/kubevirt/libvirt/vpn/*
Defines the kubevirt-libvirt-vpn step and workflow, including metadata, ownership, dependencies, environment variables, DNS nameservers, and documentation.
Lease resolution and connectivity checks
ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-commands.sh
Loads lease and cluster-profile values, builds the remote libvirt URI, retries port 7001 and virsh checks, and reports success or failure.
Scheduled CI job wiring
ci-operator/config/kubevirt/ssp-operator/kubevirt-ssp-operator-main.yaml
Pins the libvirt-installer image and registers the scheduled s390x VPN connectivity job with its cluster profile, workflow, dependency, and environment.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ScheduledCI
  participant VPNWorkflow
  participant VPNStep
  participant LeaseConfig
  participant LibvirtHost

  ScheduledCI->>VPNWorkflow: start e2e-s390x-vpn-connectivity
  VPNWorkflow->>VPNStep: run kubevirt-libvirt-vpn
  VPNStep->>LeaseConfig: resolve hostname and external_ip
  VPNStep->>LibvirtHost: check port 7001 and run virsh list
  LibvirtHost-->>VPNStep: return connectivity result
  VPNStep-->>ScheduledCI: report success or failure
Loading

Suggested labels: do-not-merge/work-in-progress


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error The new VPN script logs EXTERNAL_IP, HOSTNAME, and REMOTE_LIBVIRT_URI verbatim at lines 34-37; HOSTNAME is an internal libvirt endpoint. Remove these value-bearing echo statements, or log only redacted/non-identifying status while retaining connectivity results.
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning The new VPN E2E step hardcodes IPv4 DNS servers (10.0.0.1, 9.9.9.9), uses unbracketed dynamic hosts, and requires external VPN/libvirt connectivity. Run /payload-job periodic-ci-openshift-release-master-nightly-4.22-e2e-metal-ipi-ovn-ipv6; use IPv6-safe host formatting or mark the test [Skipped:Disconnected].
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the draft s390x VPN connectivity test added by the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR adds CI YAML, metadata, OWNERS, and a shell command only; targeted searches found no Ginkgo It, Describe, Context, or When test titles.
Test Structure And Quality ✅ Passed The PR adds Bash connectivity commands and YAML/JSON metadata only; the added subtree has no Go files or Ginkgo constructs to review against these requirements.
Microshift Test Compatibility ✅ Passed The pull request adds only CI YAML, metadata, and a shell connectivity step; no Ginkgo It/Describe/Context/When tests or MicroShift API references are present.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request adds only CI YAML, metadata, and a shell script; no Go files or Ginkgo It/Describe/Context/When tests were added, so this SNO check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The PR adds only CI operator/step-registry configuration and a connectivity script; it adds no deployment manifests, controllers, replicas, affinity, selectors, spread constraints, or PDBs.
Ote Binary Stdout Contract ✅ Passed The PR adds only step-registry YAML, JSON, OWNERS, and a Bash script; it contains no OTE binary, suite setup, or process-level logging code covered by this check.
No-Weak-Crypto ✅ Passed Token-aware scan of all 158 PR-added lines found no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, crypto API, or secret/token comparison usage.
Container-Privileges ✅ Passed The added ref, workflow, script, and job config contain no privileged:true, hostPID/hostNetwork/hostIPC, SYS_ADMIN, or allowPrivilegeEscalation:true; capabilities: intranet is a CI scheduler field.
✨ 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.

@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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-commands.sh`:
- Around line 34-37: Remove the four diagnostic echo statements for
LEASED_RESOURCE, EXTERNAL_IP, HOSTNAME, and REMOTE_LIBVIRT_URI from the command
script. Do not print these sensitive lease or connectivity values; retain only
non-sensitive status logging if needed.
- Around line 46-52: Bound each network probe in the retry condition within the
attempt loop: configure both curl calls and the mock-nss.sh virsh invocation
using the repository’s established timeout options or variables, with limits
covering connection and operation time. Preserve the existing success condition
and retry behavior while ensuring a black-holed endpoint cannot block an
iteration indefinitely.

In
`@ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-workflow.yaml`:
- Around line 3-7: Update the workflow definition containing
allow_best_effort_post_steps and the kubevirt-libvirt-vpn test reference to
declare all required workflow phases, not only test. Follow the established
step-registry phase structure, then run make validate-step-registry and resolve
any missing-phase or registry-reference validation errors.
🪄 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 YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ae1a7fd-6c0e-420e-9f9b-8789d6f7534d

📥 Commits

Reviewing files that changed from the base of the PR and between ce0fbdb and a8b93de.

📒 Files selected for processing (7)
  • ci-operator/config/kubevirt/ssp-operator/kubevirt-ssp-operator-main.yaml
  • ci-operator/step-registry/kubevirt/libvirt/vpn/OWNERS
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-commands.sh
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-ref.metadata.json
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-ref.yaml
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-workflow.metadata.json
  • ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-workflow.yaml

Comment on lines +34 to +37
echo "LEASED_RESOURCE=${LEASED_RESOURCE}"
echo "EXTERNAL_IP=${EXTERNAL_IP}"
echo "HOSTNAME=${HOSTNAME}"
echo "REMOTE_LIBVIRT_URI=${REMOTE_LIBVIRT_URI}"

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.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Remove private connectivity targets from CI logs.

REMOTE_LIBVIRT_URI, EXTERNAL_IP, and HOSTNAME expose internal cluster endpoints in CI logs. Log only non-sensitive status, and avoid printing the lease identifier as well.

As per coding guidelines, “Step registry command scripts must avoid leaking sensitive information into CI logs: do not echo passwords, tokens, API keys, cluster URLs, or kubeconfig contents.”

Proposed fix
-echo "LEASED_RESOURCE=${LEASED_RESOURCE}"
-echo "EXTERNAL_IP=${EXTERNAL_IP}"
-echo "HOSTNAME=${HOSTNAME}"
-echo "REMOTE_LIBVIRT_URI=${REMOTE_LIBVIRT_URI}"
+echo "Lease and connectivity targets loaded"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo "LEASED_RESOURCE=${LEASED_RESOURCE}"
echo "EXTERNAL_IP=${EXTERNAL_IP}"
echo "HOSTNAME=${HOSTNAME}"
echo "REMOTE_LIBVIRT_URI=${REMOTE_LIBVIRT_URI}"
echo "Lease and connectivity targets loaded"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-commands.sh`
around lines 34 - 37, Remove the four diagnostic echo statements for
LEASED_RESOURCE, EXTERNAL_IP, HOSTNAME, and REMOTE_LIBVIRT_URI from the command
script. Do not print these sensitive lease or connectivity values; retain only
non-sensitive status logging if needed.

Source: Coding guidelines

Comment on lines +46 to +52
for ((i=1; i<=attempts; i++)); do
echo "$(date +%H:%M:%S) attempt ${i}/${attempts}"
# #CHECK: Port 7001 is from #72780
# Confirm we expose the same
if curl -s "${EXTERNAL_IP}:7001" >/dev/null \
&& curl -s "${HOSTNAME}:7001" >/dev/null \
&& mock-nss.sh virsh -c "${REMOTE_LIBVIRT_URI}" list >/dev/null; then

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Bound every network probe.

curl and virsh have no connect or operation timeout. A black-holed VPN/DNS path can block the first iteration forever, so the retry loop does not cap job duration.

Proposed fix
-  if curl -s "${EXTERNAL_IP}:7001" >/dev/null \
-    && curl -s "${HOSTNAME}:7001" >/dev/null \
-    && mock-nss.sh virsh -c "${REMOTE_LIBVIRT_URI}" list >/dev/null; then
+  if curl -s --connect-timeout 10 --max-time 20 "${EXTERNAL_IP}:7001" >/dev/null \
+    && curl -s --connect-timeout 10 --max-time 20 "${HOSTNAME}:7001" >/dev/null \
+    && timeout 30s mock-nss.sh virsh -c "${REMOTE_LIBVIRT_URI}" list >/dev/null; then
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
for ((i=1; i<=attempts; i++)); do
echo "$(date +%H:%M:%S) attempt ${i}/${attempts}"
# #CHECK: Port 7001 is from #72780
# Confirm we expose the same
if curl -s "${EXTERNAL_IP}:7001" >/dev/null \
&& curl -s "${HOSTNAME}:7001" >/dev/null \
&& mock-nss.sh virsh -c "${REMOTE_LIBVIRT_URI}" list >/dev/null; then
for ((i=1; i<=attempts; i++)); do
echo "$(date +%H:%M:%S) attempt ${i}/${attempts}"
# `#CHECK`: Port 7001 is from `#72780`
# Confirm we expose the same
if curl -s --connect-timeout 10 --max-time 20 "${EXTERNAL_IP}:7001" >/dev/null \
&& curl -s --connect-timeout 10 --max-time 20 "${HOSTNAME}:7001" >/dev/null \
&& timeout 30s mock-nss.sh virsh -c "${REMOTE_LIBVIRT_URI}" list >/dev/null; then
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/kubevirt/libvirt/vpn/kubevirt-libvirt-vpn-commands.sh`
around lines 46 - 52, Bound each network probe in the retry condition within the
attempt loop: configure both curl calls and the mock-nss.sh virsh invocation
using the repository’s established timeout options or variables, with limits
covering connection and operation time. Preserve the existing success condition
and retry behavior while ensuring a black-holed endpoint cannot block an
iteration indefinitely.

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.

obsolete, please remove

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.

Not sure if this variable is defined.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@Davo911: 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
pull-ci-kubevirt-ssp-operator-main-e2e-functests kubevirt/ssp-operator presubmit Ci-operator config changed
pull-ci-kubevirt-ssp-operator-main-e2e-single-node-functests kubevirt/ssp-operator presubmit Ci-operator config changed
pull-ci-kubevirt-ssp-operator-main-e2e-upgrade-functests kubevirt/ssp-operator presubmit Ci-operator config changed
pull-ci-kubevirt-ssp-operator-main-images kubevirt/ssp-operator presubmit Ci-operator config changed
pull-ci-kubevirt-ssp-operator-main-unittests kubevirt/ssp-operator presubmit Ci-operator config changed
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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants