Skip to content

MGMT-24419: Don't try to get the DataImage after ICI's installation completes#80991

Draft
giladravid16 wants to merge 1 commit into
openshift:mainfrom
giladravid16:MGMT-24419
Draft

MGMT-24419: Don't try to get the DataImage after ICI's installation completes#80991
giladravid16 wants to merge 1 commit into
openshift:mainfrom
giladravid16:MGMT-24419

Conversation

@giladravid16

@giladravid16 giladravid16 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

This PR updates the image-based install operator CI gather behavior in OpenShift CI.

Practically, it changes the post-install artifact collection to stop trying to retrieve the DataImage after installation completes. Instead, the gather step now captures baremetalhost.yaml from the openshift-machine-api namespace, while also trimming unnecessary host-side collection work such as mounting /dev/sr0 and archiving /mnt/config-iso.

It also adds a best-effort fetch of the imageclusterinstall resource for ibi-cluster into imageclusterinstall.yaml, so that resource is still surfaced even if cleanup of the install object fails.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 24, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@giladravid16: This pull request references MGMT-24419 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target either version "5.0." or "openshift-5.0.", but it targets "ACM 5.0" instead.

Details

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@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 Jun 24, 2026
@openshift-ci

openshift-ci Bot commented Jun 24, 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

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Two CI gather scripts for the image-based install operator are updated: the gather script swaps dataimage.yaml collection for baremetalhost.yaml and removes the remote /dev/sr0 mount step that produced config-iso.tar.gz; the post-gather script adds a fault-tolerant capture of the imageclusterinstall manifest.

Changes

Image-Based Install Operator Gather Script Updates

Layer / File(s) Summary
Gather script: swap baremetalhost for dataimage, drop config-iso
ci-operator/step-registry/image-based-install-operator/gather/image-based-install-operator-gather-commands.sh
Replaces oc get dataimage export with oc get baremetalhost writing to baremetalhost.yaml; removes the remote SSH mount and tar step that previously collected config-iso.tar.gz from the IBI host.
Post-gather script: add imageclusterinstall capture
ci-operator/step-registry/image-based-install-operator/post/gather/image-based-install-operator-post-gather-commands.sh
Adds oc get imageclusterinstall ibi-cluster writing to ${HUB_DIR}/imageclusterinstall.yaml, with || true to allow failure without aborting the script.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 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 matches the main change: stopping DataImage retrieval after ICI installation completes.
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 only changes shell gather scripts; no Ginkgo specs or test titles are added or edited, so the stability check is not applicable.
Test Structure And Quality ✅ Passed PR changes only shell gather scripts; no Ginkgo test code is added or modified, so this check is not applicable.
Microshift Test Compatibility ✅ Passed PR only changes shell gather scripts; no new It/Describe/Context/When Ginkgo tests were added, so MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only changes two gather shell scripts, so the SNO test check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only gather/post-gather shell scripts changed; no manifests, controllers, replicas, affinity, or node selectors were introduced.
Ote Binary Stdout Contract ✅ Passed PR only changes ci-operator shell gather/post-gather scripts; no OTE binary/main/TestMain setup or stdout-printing Go code is introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR only edits shell-based gather scripts; it adds no new Ginkgo tests or IPv4/external-network assumptions.
No-Weak-Crypto ✅ Passed The touched scripts only collect cluster artifacts/logs; no weak crypto, custom crypto, or secret/token comparisons appear in the PR.
Container-Privileges ✅ Passed PR only edits shell gather scripts; no K8s/container manifests or privileged/host* security settings were added in the changed subtree.
No-Sensitive-Data-In-Logs ✅ Passed The touched scripts only collect cluster YAML/log artifacts to files; they do not add password/token/PII logging or print sensitive values to stdout.

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

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

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

@giladravid16

Copy link
Copy Markdown
Contributor Author

/testwith openshift/image-based-install-operator/main/e2e-ibio openshift/image-based-install-operator#844

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

🤖 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/image-based-install-operator/post/gather/image-based-install-operator-post-gather-commands.sh`:
- Around line 29-30: The post-gather script writes imageclusterinstall.yaml to
HUB_DIR, which can miss export and may land in the wrong place if HUB_DIR is
unset. Update the image-based-install-operator post/gather command in
image-based-install-operator-post-gather-commands.sh to write the
imageclusterinstall.yaml artifact into ARTIFACT_DIR instead, using the same
artifact-handling pattern as the other collected files so it is included in the
archived results.
🪄 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: Enterprise

Run ID: 02a46a1e-f8f5-4919-94dd-7bfcfa209d29

📥 Commits

Reviewing files that changed from the base of the PR and between 204f792 and c3c01c7.

📒 Files selected for processing (2)
  • ci-operator/step-registry/image-based-install-operator/gather/image-based-install-operator-gather-commands.sh
  • ci-operator/step-registry/image-based-install-operator/post/gather/image-based-install-operator-post-gather-commands.sh
💤 Files with no reviewable changes (1)
  • ci-operator/step-registry/image-based-install-operator/gather/image-based-install-operator-gather-commands.sh

Comment on lines +29 to +30
# in case of an error in deleting the imageclusterinstall, we want to see it
oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${HUB_DIR}/imageclusterinstall.yaml || true

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 | 🟠 Major | ⚡ Quick win

Write imageclusterinstall.yaml to ${ARTIFACT_DIR} so it is exported.

On Line 30, output goes to ${HUB_DIR}, but Line 36 only tars /ibio-post-gather. This can drop the new artifact from collected results (and if HUB_DIR is unset in this shell, it may write to /imageclusterinstall.yaml).

Suggested fix
-oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${HUB_DIR}/imageclusterinstall.yaml || true
+oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${ARTIFACT_DIR}/imageclusterinstall.yaml || true
📝 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
# in case of an error in deleting the imageclusterinstall, we want to see it
oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${HUB_DIR}/imageclusterinstall.yaml || true
oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${ARTIFACT_DIR}/imageclusterinstall.yaml || true
🤖 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/image-based-install-operator/post/gather/image-based-install-operator-post-gather-commands.sh`
around lines 29 - 30, The post-gather script writes imageclusterinstall.yaml to
HUB_DIR, which can miss export and may land in the wrong place if HUB_DIR is
unset. Update the image-based-install-operator post/gather command in
image-based-install-operator-post-gather-commands.sh to write the
imageclusterinstall.yaml artifact into ARTIFACT_DIR instead, using the same
artifact-handling pattern as the other collected files so it is included in the
archived results.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@giladravid16: 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-rh-ecosystem-edge-ib-orchestrate-vm-master-e2e-ibio rh-ecosystem-edge/ib-orchestrate-vm presubmit Registry content changed
pull-ci-rh-ecosystem-edge-ib-orchestrate-vm-master-e2e-ibio-v4v6 rh-ecosystem-edge/ib-orchestrate-vm presubmit Registry content changed
pull-ci-rh-ecosystem-edge-ib-orchestrate-vm-master-e2e-ibio-v6v4 rh-ecosystem-edge/ib-orchestrate-vm presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-main-e2e-ibio openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-main-e2e-ibio-v4v6 openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-main-e2e-ibio-v6v4 openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.17-e2e-ibio openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.10-e2e-ibio openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.11-e2e-ibio openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.7-e2e-ibio openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.9-e2e-ibio openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.8-e2e-ibio openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-5.0-e2e-ibio openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-5.0-e2e-ibio-v4v6 openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-5.0-e2e-ibio-v6v4 openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-main-ibio-reinstall openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-main-ibio-reinstall-v4v6 openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-main-ibio-reinstall-v6v4 openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.17-ibio-reinstall openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.10-ibio-reinstall openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.11-ibio-reinstall openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.9-ibio-reinstall openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-2.8-ibio-reinstall openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-5.0-ibio-reinstall openshift/image-based-install-operator presubmit Registry content changed
pull-ci-openshift-image-based-install-operator-backplane-5.0-ibio-reinstall-v4v6 openshift/image-based-install-operator presubmit Registry content changed

A total of 52 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
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 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@giladravid16

Copy link
Copy Markdown
Contributor Author

/testwith openshift/image-based-install-operator/main/e2e-ibio openshift/image-based-install-operator#844 #80991

@giladravid16

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-image-based-install-operator-main-e2e-ibio

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@giladravid16: all tests passed!

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/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants