Skip to content

WIP Hypershift CI Serial job - #83038

Open
asood-rh wants to merge 2 commits into
openshift:mainfrom
asood-rh:hypershift-ci-serial
Open

WIP Hypershift CI Serial job #83038
asood-rh wants to merge 2 commits into
openshift:mainfrom
asood-rh:hypershift-ci-serial

Conversation

@asood-rh

@asood-rh asood-rh commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Hypershift on AWS with ipecho server

Summary by CodeRabbit

  • Adds a work-in-progress, optional, non-periodic Hypershift AWS OVN conformance serial job for OpenShift CI.
  • Adds an ipecho bastion workflow that provisions AWS resources, exposes a client-IP endpoint, supports debugging, and performs cleanup.
  • Adds CI Operator step definitions, workflow metadata, and ownership files for the new provisioning and deprovisioning steps.

@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 Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Adds an optional HyperShift AWS OVN serial conformance job. The change introduces ipecho bastion provisioning and cleanup steps, registers the workflow, and configures a 20-hour job timeout.

Changes

HyperShift AWS OVN conformance

Layer / File(s) Summary
Provision the AWS ipecho bastion
ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/*
The provisioning step discovers AWS resources, creates a security group, launches a t3.micro instance with a systemd-managed ipecho service, polls the endpoint, and writes outputs to SHARED_DIR.
Deprovision the AWS ipecho bastion
ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/*
The cleanup step terminates the recorded instance and retries security-group deletion while tolerating cleanup failures.
Wire the conformance workflow and CI job
ci-operator/step-registry/hypershift/aws/ovn/conformance/*, ci-operator/config/openshift/ovn-kubernetes/openshift-ovn-kubernetes-main.yaml
The workflow creates and destroys the HyperShift AWS cluster, provisions and removes the ipecho bastion, waits for debugging, collects state, and runs through an optional serial job with a 20-hour timeout.

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

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant CIJob
  participant ConformanceWorkflow
  participant HyperShift
  participant IpechoProvision
  participant AWS
  participant IpechoDeprovision

  CIJob->>ConformanceWorkflow: Start serial conformance job
  ConformanceWorkflow->>HyperShift: Create management and AWS clusters
  ConformanceWorkflow->>IpechoProvision: Provision ipecho bastion
  IpechoProvision->>AWS: Create security group and EC2 instance
  AWS-->>IpechoProvision: Return instance and endpoint details
  ConformanceWorkflow->>ConformanceWorkflow: Wait and collect cluster state
  ConformanceWorkflow->>HyperShift: Destroy cluster
  ConformanceWorkflow->>IpechoDeprovision: Clean up bastion
  IpechoDeprovision->>AWS: Terminate instance and delete security group
Loading
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: a work-in-progress HyperShift CI serial job.
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 and shell steps only; the effective diff contains no Ginkgo It/Describe/Context titles or dynamic test-name construction.
Test Structure And Quality ✅ Passed The PR adds CI YAML, metadata, OWNERS, and AWS shell steps, but no Ginkgo test code or It/Eventually/Expect calls; this check is not applicable.
Microshift Test Compatibility ✅ Passed The complete PR range adds only CI YAML, JSON, shell, and OWNERS files; it adds no Ginkgo tests or It/Describe/Context/When constructs to assess.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds CI YAML, metadata, OWNERS files, and shell scripts only; it adds no Ginkgo tests or test declarations requiring SNO compatibility review.
Topology-Aware Scheduling Compatibility ✅ Passed The changes add CI workflow/step definitions and AWS scripts only; inspected files contain no affinity, topology spread, replica, node selector, toleration, or PDB scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR changes only YAML, JSON, OWNERS, and shell files; no Go, Ginkgo, OTE binary, or process-level stdout code was added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR adds CI YAML, workflow metadata, and AWS shell steps only; it adds no Ginkgo test source or new It/Describe/Context/When blocks to assess.
No-Weak-Crypto ✅ Passed The PR adds AWS provisioning, cleanup, and workflow configuration only; review of both introducing commits found no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed No privileged container settings found. Searched all 12 added files for privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, securityContext, and root user configurations.
No-Sensitive-Data-In-Logs ✅ Passed The new scripts log only ephemeral AWS resource metadata and the public ipecho endpoint; they do not print credential contents, tokens, passwords, PII, internal hostnames, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: asood-rh
Once this PR has been reviewed and has the lgtm label, please assign jparrill, knobunc 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

@openshift-ci
openshift-ci Bot requested review from enxebre and kyrtapz August 6, 2026 13:32
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@asood-rh: 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-openshift-ovn-kubernetes-main-e2e-aws-ovn-hypershift-serial openshift/ovn-kubernetes presubmit Presubmit changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

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 added the do-not-merge/invalid-owners-file Indicates that a PR should not merge because it has an invalid OWNERS file in it. label Aug 6, 2026
@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The OWNERS file contains untrusted users, which makes it INVALID. The following users are mentioned in OWNERS file(s) but are untrusted for the following reasons. One way to make the user trusted is to add them as members of the openshift org. You can then trigger verification by writing /verify-owners in a comment.

  • astoycos
    • User is not a member of the org. User is not a collaborator. Satisfy at least one of these conditions to make the user trusted.
    • ci-operator/step-registry/hypershift/aws/ovn/conformance/OWNERS
    • ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/OWNERS
    • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/OWNERS

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

🤖 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/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh`:
- Around line 49-52: Remove the TCP port 22 ingress authorization from the
provisioning commands, leaving only the ipecho port rule in the security group
setup. Do not add a replacement SSH rule; preserve the existing public ipecho
HTTP endpoint configuration.
- Around line 105-113: Remove the instance-side sed replacement near the
generated systemd unit and replace IPECHO_PORT_PLACEHOLDER exactly once before
launching the instance, preserving the configured IPECHO_PORT consistently for
the service, security group, and probe. Update the ipecho provisioning command
flow around the service heredoc and launch logic without changing unrelated
defaults.
- Around line 41-46: Make cleanup durable across partial provisioning failures:
in
ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh
lines 41-46, persist the security-group identifier and region immediately after
create-security-group; in the same file lines 126-135, persist the instance
identifier immediately after run-instances. In
ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/hypershift-aws-ovn-ipecho-deprovision-commands.sh
lines 9-18, delete each resource whenever its own identifier is recorded,
allowing security-group cleanup without requiring ipecho_instance_id.
- Line 122: Update the user-data handling in the run-instances command to remove
USER_DATA_B64 and pass the raw USER_DATA value directly to --user-data, ensuring
cloud-init receives the ipecho script rather than pre-encoded content.
🪄 Autofix

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: Enterprise

Run ID: 0bbd855e-e1c5-43bb-9dd9-a9e01379fa97

📥 Commits

Reviewing files that changed from the base of the PR and between d3c6320 and fb3da92.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/openshift/ovn-kubernetes/openshift-ovn-kubernetes-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (12)
  • ci-operator/config/openshift/ovn-kubernetes/openshift-ovn-kubernetes-main.yaml
  • ci-operator/step-registry/hypershift/aws/ovn/conformance/OWNERS
  • ci-operator/step-registry/hypershift/aws/ovn/conformance/hypershift-aws-ovn-conformance-workflow.metadata.json
  • ci-operator/step-registry/hypershift/aws/ovn/conformance/hypershift-aws-ovn-conformance-workflow.yaml
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/OWNERS
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/hypershift-aws-ovn-ipecho-deprovision-commands.sh
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/hypershift-aws-ovn-ipecho-deprovision-ref.metadata.json
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/hypershift-aws-ovn-ipecho-deprovision-ref.yaml
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/OWNERS
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-ref.metadata.json
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-ref.yaml

Comment on lines +41 to +46
SG_ID=$(aws ec2 create-security-group \
--group-name "ipecho-bastion-${NAMESPACE}-${UNIQUE_HASH}" \
--description "ipecho bastion for CI job ${JOB_NAME}" \
--vpc-id "${VPC_ID}" \
--tag-specifications "ResourceType=security-group,Tags=[{Key=Name,Value=ipecho-bastion-${NAMESPACE}},{Key=expirationDate,Value=${EXPIRATION_DATE}}]" \
--query "GroupId" --output text)

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

Make the ipecho cleanup protocol durable across partial provisioning failures.

Provisioning delays resource-marker writes. Deprovisioning requires an instance marker. A failed AWS call can therefore leave a security group or instance without cleanup.

  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh#L41-L46: Write the security-group identifier and region immediately after create-security-group.
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh#L126-L135: Write the instance identifier immediately after run-instances.
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/hypershift-aws-ovn-ipecho-deprovision-commands.sh#L9-L18: Clean up each resource when its own identifier exists. Do not require ipecho_instance_id before deleting a recorded security group.
📍 Affects 2 files
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh#L41-L46 (this comment)
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh#L126-L135
  • ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/hypershift-aws-ovn-ipecho-deprovision-commands.sh#L9-L18
🤖 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/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh`
around lines 41 - 46, Make cleanup durable across partial provisioning failures:
in
ci-operator/step-registry/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh
lines 41-46, persist the security-group identifier and region immediately after
create-security-group; in the same file lines 126-135, persist the instance
identifier immediately after run-instances. In
ci-operator/step-registry/hypershift/aws/ovn/ipecho/deprovision/hypershift-aws-ovn-ipecho-deprovision-commands.sh
lines 9-18, delete each resource whenever its own identifier is recorded,
allowing security-group cleanup without requiring ipecho_instance_id.

Comment on lines +49 to +52
aws ec2 authorize-security-group-ingress --group-id "${SG_ID}" \
--protocol tcp --port "${IPECHO_PORT}" --cidr "0.0.0.0/0" >/dev/null
aws ec2 authorize-security-group-ingress --group-id "${SG_ID}" \
--protocol tcp --port 22 --cidr "0.0.0.0/0" >/dev/null

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 the Internet-wide SSH rule.

The supplied workflow only requires the public ipecho HTTP endpoint. TCP/22 is not used by the supplied step contract. This rule exposes SSH on a public instance to every Internet address.

Remove the TCP/22 ingress rule. If SSH is required later, restrict its CIDR to an authenticated diagnostic source.

🤖 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/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh`
around lines 49 - 52, Remove the TCP port 22 ingress authorization from the
provisioning commands, leaving only the ipecho port rule in the security group
setup. Do not add a replacement SSH rule; preserve the existing public ipecho
HTTP endpoint configuration.

Comment on lines +105 to +113
ExecStart=/usr/bin/python3 /usr/local/bin/ipecho.py IPECHO_PORT_PLACEHOLDER
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target
SVCEOF

sed -i "s/IPECHO_PORT_PLACEHOLDER/${IPECHO_PORT:-9095}/" /etc/systemd/system/ipecho.service

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve the configured IPECHO_PORT.

The replacement at line 120 changes both IPECHO_PORT_PLACEHOLDER occurrences. If IPECHO_PORT is 8080, the generated sed command replaces 8080 with its instance-side default of 9095. The service then listens on 9095, while the security group and probe use 8080.

Remove the instance-side sed command. Replace the placeholder once before launch.

Proposed fix
- sed -i "s/IPECHO_PORT_PLACEHOLDER/${IPECHO_PORT:-9095}/" /etc/systemd/system/ipecho.service
  systemctl daemon-reload
  systemctl enable --now ipecho.service

Also applies to: 119-120

🤖 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/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh`
around lines 105 - 113, Remove the instance-side sed replacement near the
generated systemd unit and replace IPECHO_PORT_PLACEHOLDER exactly once before
launching the instance, preserving the configured IPECHO_PORT consistently for
the service, security group, and probe. Update the ipecho provisioning command
flow around the service heredoc and launch logic without changing unrelated
defaults.

# Replace the placeholder with the actual port in user-data
USER_DATA="${USER_DATA//IPECHO_PORT_PLACEHOLDER/${IPECHO_PORT}}"

USER_DATA_B64=$(echo "${USER_DATA}" | base64 -w0)

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
aws ec2 run-instances help | sed -n '/--user-data/,/^  --/p'

Repository: openshift/release

Length of output: 196


🏁 Script executed:

#!/bin/bash
set -euo pipefail
file=$(fd -t f 'hypershift-aws-ovn-ipecho-provision-commands\.sh$' . | head -n1)
test -n "$file"
printf '%s\n' "FILE=$file"
sed -n '90,145p' "$file"
printf '%s\n' '--- related user-data and run-instances references ---'
rg -n -C 3 'USER_DATA(_B64)?|run-instances|--user-data|ipecho' "$file" ci-operator/step-registry/hypershift/aws/ovn/ipecho || true

Repository: openshift/release

Length of output: 47796


🌐 Web query:

AWS CLI ec2 run-instances --user-data base64 encoding AWS documentation

💡 Result:

When using the AWS CLI to launch EC2 instances with the run-instances command, you do not need to manually base64-encode your user data [1][2][3]. The AWS CLI automatically performs the required base64 encoding for you before sending the data to the Amazon EC2 API [1][3]. You can provide the user data in a few ways: 1. As a plain text string directly on the command line: aws ec2 run-instances --image-id --user-data "echo Hello World" 2. As the contents of a local file by using the file:// prefix, which instructs the AWS CLI to load the text from a file: aws ec2 run-instances --image-id --user-data file://path/to/your/script.txt It is important to note that the AWS CLI expects the input to be plain text, not pre-encoded base64 data [4]. If you provide already encoded base64 data, the CLI will treat that encoded string as the raw content and encode it again, resulting in the instance receiving the base64-encoded string rather than your original script [4][5]. While the underlying Amazon EC2 API requires base64-encoded user data [6][3], the AWS CLI abstracts this requirement away from the user for convenience [1][2].

Citations:


Pass raw user data to aws ec2 run-instances.

The AWS CLI base64-encodes --user-data input. Remove USER_DATA_B64 and pass --user-data "${USER_DATA}"; otherwise cloud-init receives encoded data instead of the ipecho script.

🤖 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/hypershift/aws/ovn/ipecho/provision/hypershift-aws-ovn-ipecho-provision-commands.sh`
at line 122, Update the user-data handling in the run-instances command to
remove USER_DATA_B64 and pass the raw USER_DATA value directly to --user-data,
ensuring cloud-init receives the ipecho script rather than pre-encoded content.

@asood-rh

asood-rh commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-ovn-kubernetes-main-e2e-aws-ovn-hypershift-serial

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@asood-rh

asood-rh commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-ovn-kubernetes-main-e2e-aws-ovn-hypershift-serial

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@asood-rh: 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/rehearse/openshift/ovn-kubernetes/main/e2e-aws-ovn-hypershift-serial fb3da92 link unknown /pj-rehearse pull-ci-openshift-ovn-kubernetes-main-e2e-aws-ovn-hypershift-serial
ci/prow/owners fb3da92 link true /test owners
ci/prow/step-registry-metadata fb3da92 link true /test step-registry-metadata

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/invalid-owners-file Indicates that a PR should not merge because it has an invalid OWNERS file in it. 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.

1 participant