Skip to content

sno gather avoid draining stdin with ssh/scp commands#79577

Open
omertuc wants to merge 1 commit into
openshift:mainfrom
omertuc:drain
Open

sno gather avoid draining stdin with ssh/scp commands#79577
omertuc wants to merge 1 commit into
openshift:mainfrom
omertuc:drain

Conversation

@omertuc
Copy link
Copy Markdown
Contributor

@omertuc omertuc commented May 21, 2026

yet another attempt to fix this gather script somehow ending abruptly

Summary by CodeRabbit

This PR fixes a CI infrastructure issue affecting the baremetalds Single Node OpenShift (SNO) gather step in the CI operator step registry.

Problem: The gather script was ending abruptly due to stdin being drained during remote SSH command execution.

Solution: Modified how the remote bash command is executed on line 27 of ci-operator/step-registry/baremetalds/sno/gather/baremetalds-sno-gather-commands.sh:

  • Before: The heredoc was piped directly into bash (| bash -)
  • After: The heredoc content is first captured into a script variable (script=$(cat)) and then executed via bash -c "$script"

This approach prevents stdin from being consumed directly by bash, allowing the script to complete properly. The output redaction via sed (which masks sensitive pull secret data) remains applied to the combined stdout/stderr stream.

This fix ensures that the baremetalds SNO test infrastructure can successfully gather logs and diagnostics without the gather step terminating unexpectedly.

yet another attempt to fix this gather script somehow ending abruptly
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

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

Run ID: 19fb4971-7ef8-487e-9b47-ca6990812ce6

📥 Commits

Reviewing files that changed from the base of the PR and between e62f975 and f729039.

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

Walkthrough

Updated remote SSH command execution in the baremetalds-sno-gather-commands script: the heredoc is now captured into a script variable before execution with bash -c "$script" instead of being piped directly to bash -, while preserving output redaction via sed.

Changes

SSH Execution Wrapper

Layer / File(s) Summary
SSH heredoc variable capture
ci-operator/step-registry/baremetalds/sno/gather/baremetalds-sno-gather-commands.sh
SSH remote command changed from piping heredoc to bash - to capturing heredoc content in a script variable and executing via bash -c "$script" while maintaining sed-based output redaction for pull-secret filtering.

Possibly Related PRs

  • openshift/release#79568: Also modifies the same remote SSH/heredoc execution flow in baremetalds-sno-gather-commands.sh to prevent premature stdin consumption.

Suggested Labels

lgtm, approved, rehearsals-ack

Suggested Reviewers

  • jaypoulz
  • eggfoobar

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the main change: preventing stdin drainage in the SNO gather script by modifying SSH command execution.
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 modifies a bash shell script with no Ginkgo test definitions, making this Ginkgo test name check not applicable.
Test Structure And Quality ✅ Passed PR modifies a bash shell script (baremetalds-sno-gather-commands.sh) for CI operations, not Ginkgo test code. Check is not applicable.
Microshift Test Compatibility ✅ Passed This PR modifies only a shell script (baremetalds-sno-gather-commands.sh) and does not add any new Ginkgo e2e tests. The custom check is specific to Ginkgo tests and is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies a bash shell script for log gathering, not Ginkgo e2e tests. The custom check only applies when new e2e tests are added; this PR contains none.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies a CI test script, not deployment manifests, operators, or controllers. No scheduling constraints introduced.
Ote Binary Stdout Contract ✅ Passed PR modifies a shell script in CI operator step registry, not a Go-based OTE binary. OTE check applies only to Go test binaries with JSON stdout contracts.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR modifies only a bash shell script used for CI/CD log gathering, not a Ginkgo e2e test file. The custom check applies only to new Ginkgo e2e tests, which are not present in this PR.

✏️ 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 and usage tips.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 21, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: omertuc
Once this PR has been reviewed and has the lgtm label, please assign jeff-roche 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 agullon and fonta-rh May 21, 2026 00:20
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@omertuc: 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-test-infra-master-e2e-metal-sno-live-iso openshift/assisted-test-infra presubmit Registry content changed
pull-ci-openshift-assisted-test-infra-master-e2e-metal-sno-with-worker-live-iso openshift/assisted-test-infra presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-main-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-5.1-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-5.0-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.23-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.22-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.21-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.20-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.19-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.18-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.17-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.16-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.15-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.14-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.13-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.12-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.11-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.10-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.9-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.8-e2e-metal-single-node-live-iso openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-origin-main-e2e-metal-ovn-single-node-live-iso openshift/origin presubmit Registry content changed
pull-ci-openshift-origin-main-e2e-metal-ovn-single-node-with-worker-live-iso openshift/origin presubmit Registry content changed
pull-ci-openshift-origin-release-5.1-e2e-metal-ovn-single-node-live-iso openshift/origin presubmit Registry content changed
pull-ci-openshift-origin-release-5.1-e2e-metal-ovn-single-node-with-worker-live-iso openshift/origin presubmit Registry content changed

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

@omertuc
Copy link
Copy Markdown
Contributor Author

omertuc commented May 21, 2026

/pj-rehearse pull-ci-rh-ecosystem-edge-recert-main-baremetalds-sno-recert-cluster-rename

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 21, 2026

@omertuc: The following test 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/rh-ecosystem-edge/recert/main/baremetalds-sno-recert-cluster-rename f729039 link unknown /pj-rehearse pull-ci-rh-ecosystem-edge-recert-main-baremetalds-sno-recert-cluster-rename

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant