Skip to content

Gather agent log bundle#80950

Open
zaneb wants to merge 2 commits into
openshift:mainfrom
zaneb:agent-gather-installation-logs
Open

Gather agent log bundle#80950
zaneb wants to merge 2 commits into
openshift:mainfrom
zaneb:agent-gather-installation-logs

Conversation

@zaneb

@zaneb zaneb commented Jun 24, 2026

Copy link
Copy Markdown
Member

In GUI agent-based installs, include the log bundle downloaded from the GUI in the CI artifacts to ease debugging.

This replaces the change that was reverted in openshift-metal3/dev-scripts#1899. Because of OCPBUGS-91975 and OCPBUGS-91982, the log bundle is currently being redacted. Including this in the screenshot archive meant that the screenshots were effectively redacted also, but copying it as a separate artifact means that they will be treated independently.

Summary by CodeRabbit

This changes the OpenShift CI “agent gather” step so GUI/agent-based installs now publish the downloaded installation log bundle as part of the CI artifacts. Concretely, the step’s scp now copies both agent-gather*.tar.xz and /root/dev-scripts/ocp/*/installation-logs.tar from the target host into ${ARTIFACT_DIR}, and only reports success when the copy succeeds—otherwise it skips publishing the log bundle.

By keeping the installation logs bundled separately from the screenshot archive, it avoids the earlier redaction side effects where packaging them together caused screenshots to be redacted.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2026
@openshift-ci openshift-ci Bot requested review from smg247 and stbenjam June 24, 2026 05:54
@zaneb zaneb marked this pull request as draft June 24, 2026 05:56
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The agent gather script now copies remote installation-logs.tar files into ${ARTIFACT_DIR} alongside the existing gather archives, and only prints the publish message when that combined copy succeeds.

Changes

Agent Gather Artifact Publishing

Layer / File(s) Summary
Expanded artifact copy step
ci-operator/step-registry/agent/gather/agent-gather-commands.sh
The existing scp command now transfers /root/dev-scripts/ocp/*/installation-logs.tar along with agent-gather*.tar.xz, and the success message remains tied to the combined copy.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 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 clearly matches the main change: gathering and publishing the agent log bundle as a CI artifact.
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 PR changes only a shell script; no Ginkgo test titles were added or edited, so the check is not applicable.
Test Structure And Quality ✅ Passed No Ginkgo test code was touched; this PR only changes a shell artifact-copy step, so the test-structure checklist is not applicable.
Microshift Test Compatibility ✅ Passed PR only changes a shell artifact-copy step; no new Ginkgo tests or MicroShift-unsupported APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: PR only changes an agent-gather shell script; no new Ginkgo e2e tests or SNO-relevant assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only a shell artifact-copy script changed; no deployment manifests, operator code, or controllers were modified, so no topology-aware scheduling risk applies.
Ote Binary Stdout Contract ✅ Passed PR only edits a ci-operator shell step for artifact copying; no OTE binary process-level code (main/TestMain/RunSpecs/etc.) is touched, so the stdout contract isn't implicated.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The only changed file is a shell artifact-gather script; no new Ginkgo tests or IPv4/external-connectivity logic were added.
No-Weak-Crypto ✅ Passed The modified script only copies artifacts via ssh/scp; no weak crypto, custom crypto, or secret-comparison code appears in the diff or file.
Container-Privileges ✅ Passed The PR only edits a shell script to copy artifacts; it adds no container/K8s manifest fields like privileged, hostNetwork, hostPID, runAsUser:0, or allowPrivilegeEscalation.
No-Sensitive-Data-In-Logs ✅ Passed The change only adds a silent SCP copy and a generic status echo; it does not log bundle contents or sensitive fields.

✏️ 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.

@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
zaneb added 2 commits June 24, 2026 20:29
In GUI agent-based installs, include the log bundle downloaded from the
GUI in the CI artifacts to ease debugging.
The screenshot archive is retrieved by the scp from the dev-scripts
host, by virtue of the filename agent-gather-console-screenshots.tar.xz
matching the glob agent-gather*.tar.xz. It is not present in the
CI container where the agent-gather-commands.sh script is running, and
logs show that the code removed here was not actually running (the log
"gathered agent-gather-console-screenshots.tar.xz" does not appear,
despite the screenshot archive appearing in the artifacts).
@zaneb zaneb force-pushed the agent-gather-installation-logs branch from 821279a to 495732e Compare June 24, 2026 08:43
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@zaneb: 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-assisted-installer-agent-master-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-5.1-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-5.0-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.23-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.22-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.21-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.20-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.19-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.18-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.17-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.16-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.15-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.14-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.13-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.12-e2e-agent-compact-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-master-e2e-agent-ha-dualstack openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-master-e2e-agent-4control-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-master-e2e-agent-5control-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-5.1-e2e-agent-ha-dualstack openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-5.1-e2e-agent-4control-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-5.1-e2e-agent-5control-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-5.0-e2e-agent-ha-dualstack openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-5.0-e2e-agent-4control-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-5.0-e2e-agent-5control-ipv4 openshift/assisted-installer-agent presubmit Registry content changed
pull-ci-openshift-assisted-installer-agent-release-4.23-e2e-agent-ha-dualstack openshift/assisted-installer-agent presubmit Registry content changed

A total of 573 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.

@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/agent/gather/agent-gather-commands.sh`:
- Around line 18-20: The combined scp in agent_gather_commands.sh currently ties
the required agent-gather archive transfer to the optional installation-logs
bundle, so a missing bundle can fail the whole publish step. Split the copy
logic in the agent log publishing block into two separate scp operations: keep
the agent-gather*.tar.xz copy as required, and make the installation-logs.tar
copy in the ocp/* path best-effort so it does not block artifact publication.
Preserve the existing success message behavior around the gather archive copy in
the same script.
🪄 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: bebc822d-a898-4c60-a0f6-b4ddfa30cc76

📥 Commits

Reviewing files that changed from the base of the PR and between 821279a and 495732e.

📒 Files selected for processing (1)
  • ci-operator/step-registry/agent/gather/agent-gather-commands.sh

Comment thread ci-operator/step-registry/agent/gather/agent-gather-commands.sh
@zaneb zaneb marked this pull request as ready for review June 24, 2026 08:55
@openshift-ci openshift-ci Bot removed 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 requested review from sosiouxme and xueqzhan June 24, 2026 08:55
@zaneb

zaneb commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-assisted-installer-agent-master-e2e-agent-compact-ipv4 pull-ci-openshift-assisted-installer-agent-master-e2e-agent-compact-ipv4-iso-noregistry

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@zaneb: job(s): pull-ci-openshift-assisted-installer-agent-master-e2e-agent-compact-ipv4-iso-noregistry either don't exist or were not found to be affected, and cannot be rehearsed

@zaneb

zaneb commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-installer-master-e2e-agent-compact-ipv4-iso-noregistry

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@zaneb: job(s): pull-ci-openshift-installer-master-e2e-agent-compact-ipv4-iso-noregistry either don't exist or were not found to be affected, and cannot be rehearsed

@zaneb

zaneb commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-installer-main-e2e-agent-compact-ipv4-iso-no-registry

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@andfasano

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano, zaneb

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

The pull request process is described 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

@zaneb

zaneb commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-installer-main-e2e-agent-compact-ipv4

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@zaneb: 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/installer/main/e2e-agent-compact-ipv4 495732e link unknown /pj-rehearse pull-ci-openshift-installer-main-e2e-agent-compact-ipv4
ci/rehearse/openshift/installer/main/e2e-agent-compact-ipv4-iso-no-registry 495732e link unknown /pj-rehearse pull-ci-openshift-installer-main-e2e-agent-compact-ipv4-iso-no-registry
ci/rehearse/openshift/assisted-installer-agent/master/e2e-agent-compact-ipv4 495732e link unknown /pj-rehearse pull-ci-openshift-assisted-installer-agent-master-e2e-agent-compact-ipv4

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants