Skip to content

OCPBUGS-84513: set terminationMessagePolicy on update-payload pods#1417

Open
jrangelramos wants to merge 1 commit into
openshift:mainfrom
jrangelramos:OCPBUGS-84513
Open

OCPBUGS-84513: set terminationMessagePolicy on update-payload pods#1417
jrangelramos wants to merge 1 commit into
openshift:mainfrom
jrangelramos:OCPBUGS-84513

Conversation

@jrangelramos

@jrangelramos jrangelramos commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Set terminationMessagePolicy=FallbackToLogsOnError on all containers in update-payload pods created by CVO
  • The fix is a one-line addition in setContainerDefaults() in pkg/cvo/updatepayload.go, which covers all 4 init containers and the 1 main container

Problem

The update-payload pods dynamically created by CVO to retrieve release images were missing terminationMessagePolicy=FallbackToLogsOnError, causing the monitor test [Monitor:termination-message-policy][sig-arch] all containers in ns/openshift-cluster-version must have terminationMessagePolicy=FallbackToLogsOnError to flake.

Affected containers:

  • initContainers[cleanup]
  • initContainers[make-temporary-directory]
  • initContainers[copy-operator-manifests-to-temporary-directory]
  • initContainers[copy-release-manifests-to-temporary-directory]
  • containers[rename-to-final-location]

Note: The CVO deployment manifest (install/0000_00_cluster-version-operator_30_deployment.yaml) already had the policy set correctly — only the dynamically-created payload pods were missing it.

Follow-up

After this merges, the exemption in openshift/origin (monitortest.go L155) should be removed.

Fixes https://redhat.atlassian.net/browse/OCPBUGS-84513

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved how payload retrieval containers handle termination messages, so error details are more reliably captured from logs when a container fails.

The update-payload pods created by CVO to retrieve release
images were missing terminationMessagePolicy=FallbackToLogsOnError
on all containers, causing the monitor test
[Monitor:termination-message-policy] to flake.

Set the policy in setContainerDefaults() so all init containers
and the main container inherit it.

Fixes https://redhat.atlassian.net/browse/OCPBUGS-84513

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@jrangelramos: This pull request references Jira Issue OCPBUGS-84513, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

  • Set terminationMessagePolicy=FallbackToLogsOnError on all containers in update-payload pods created by CVO
  • The fix is a one-line addition in setContainerDefaults() in pkg/cvo/updatepayload.go, which covers all 4 init containers and the 1 main container

Problem

The update-payload pods dynamically created by CVO to retrieve release images were missing terminationMessagePolicy=FallbackToLogsOnError, causing the monitor test [Monitor:termination-message-policy][sig-arch] all containers in ns/openshift-cluster-version must have terminationMessagePolicy=FallbackToLogsOnError to flake.

Affected containers:

  • initContainers[cleanup]
  • initContainers[make-temporary-directory]
  • initContainers[copy-operator-manifests-to-temporary-directory]
  • initContainers[copy-release-manifests-to-temporary-directory]
  • containers[rename-to-final-location]

Note: The CVO deployment manifest (install/0000_00_cluster-version-operator_30_deployment.yaml) already had the policy set correctly — only the dynamically-created payload pods were missing it.

Follow-up

After this merges, the exemption in openshift/origin (monitortest.go L155) should be removed.

Fixes https://redhat.atlassian.net/browse/OCPBUGS-84513

🤖 Generated with Claude Code

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.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

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: 9d5a1670-8ef4-43af-ad74-739df7bfe0f5

📥 Commits

Reviewing files that changed from the base of the PR and between 22480a3 and 6130926.

📒 Files selected for processing (1)
  • pkg/cvo/updatepayload.go

Walkthrough

This change modifies the container factory used during payload retrieval in pkg/cvo/updatepayload.go to explicitly set TerminationMessagePolicy to FallbackToLogsOnError on generated containers, rather than relying on the Kubernetes default behavior. No public API changes are involved.

Changes

Payload Pod Container Configuration

Layer / File(s) Summary
Set termination message policy
pkg/cvo/updatepayload.go
Each generated container in the payload retrieval pod now explicitly sets TerminationMessagePolicy to FallbackToLogsOnError.

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: setting terminationMessagePolicy on generated update-payload pods.
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 touches pkg/cvo/updatepayload.go, a non-test file, and it contains no Ginkgo test titles or dynamic title construction.
Test Structure And Quality ✅ Passed No Ginkgo tests were added or changed; the PR only updates production pod defaults in pkg/cvo/updatepayload.go, so the checklist is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo/e2e tests were added; the PR only changes a pod default in pkg/cvo/updatepayload.go, so MicroShift test compatibility is not implicated.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: The PR only changes pkg/cvo/updatepayload.go to set container policy; no new Ginkgo tests or SNO-relevant assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed The change only sets container terminationMessagePolicy; no new node selectors, affinity, spreads, replicas, or tolerations were introduced.
Ote Binary Stdout Contract ✅ Passed PASS: The PR only changes pod container defaults in pkg/cvo/updatepayload.go; it adds no main/init/TestMain/suite-setup stdout writes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only changes pkg/cvo/updatepayload.go; no new Ginkgo specs or network/IP-handling tests were added.
No-Weak-Crypto ✅ Passed Only change is setting TerminationMessagePolicy; no weak-crypto code was added or modified in the patch.
Container-Privileges ✅ Passed PASS: PR only adds TerminationMessagePolicy in updatepayload.go; no new hostPID/hostNetwork/hostIPC, SYS_ADMIN, or allowPrivilegeEscalation changes were introduced.
No-Sensitive-Data-In-Logs ✅ Passed The patch only sets TerminationMessagePolicy on generated containers; it adds no new logging or sensitive fields in logs.
✨ 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.

@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@jrangelramos

Copy link
Copy Markdown
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@jrangelramos: This pull request references Jira Issue OCPBUGS-84513, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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.

@jrangelramos

Copy link
Copy Markdown
Member Author

/test e2e-hypershift-conformance

@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@jrangelramos: 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.

@jrangelramos

Copy link
Copy Markdown
Member Author

/cherry-pick release-4.23
/cherry-pick release-5.0
/cherry-pick release-5.1

@openshift-cherrypick-robot

Copy link
Copy Markdown

@jrangelramos: once the present PR merges, I will cherry-pick it on top of release-4.23, release-5.0, release-5.1 in new PRs and assign them to you.

Details

In response to this:

/cherry-pick release-4.23
/cherry-pick release-5.0
/cherry-pick release-5.1

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.

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.

3 participants