Skip to content

[release-4.21] OCPBUGS-140844: Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects - #6759

Open
isabella-janssen wants to merge 1 commit into
openshift:release-4.21from
isabella-janssen:ocpbugs-126899-421
Open

isabella-janssen wants to merge 1 commit into
openshift:release-4.21from
isabella-janssen:ocpbugs-126899-421

Conversation

@isabella-janssen

@isabella-janssen isabella-janssen commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Closes: OCPBUGS-140844

- What I did
This is a manual cherrypick of #6706.

- How to verify it
Test on a 4.21 cluster with this PR included that has at least one PinnedImageSet applied and OCL enabled.

$ oc get clusterversion
NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.21.0-0-2026-11-13-114856-test-ci-ln-f5sdpwb-latest   True        False         55m     Cluster version is 4.21.0-0-2026-11-13-114856-test-ci-ln-f5sdpwb-latest
$ oc get pinnedimageset
NAME          AGE
test-pinned   10m
$ oc get machineosbuild
NAME                                     PREPARED   BUILDING   SUCCEEDED   INTERRUPTED   FAILED   AGE
infra-8b815e2f413706d0968fafef699f7bf8   False      False      True        False         False    9m33s
  1. Get all related objects.
$ oc get clusteroperator machine-config -o jsonpath='{range .status.relatedObjects[*]}{.resource}{"\t"}{.group}{"\n"}{end}'
...
machineconfignodes	machineconfiguration.openshift.io
pinnedimagesets	machineconfiguration.openshift.io
machineosconfigs	machineconfiguration.openshift.io
machineosbuilds	machineconfiguration.openshift.io
...
  1. Write information to /tmp/mco-inspect
$ oc adm inspect clusteroperator/machine-config --dest-dir=/tmp/mco-inspect
  1. Check that the machineconfiguration.openshift.io related objects from step 1 and targetted by this bug are included in the machineconfiguration.openshift.io directory
$ ls /tmp/mco-inspect/cluster-scoped-resources/machineconfiguration.openshift.io
...	machineosbuilds		pinnedimagesets
machineconfignodes	...		machineosconfigs

- Description for the changelog
OCPBUGS-140844: Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs and /pipeline help for 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 Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: a46794d0-2111-4baa-aa9d-325d92bf971c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Pre-merge checks: Passed 10

Check name Status Explanation
Stable And Deterministic Test Names Passed The check covers Ginkgo test titles (It, Describe, Context, When). This PR (openshift/machine-config-operator #6759, author isabella-janssen) only adds four resources to the ClusterOperator relatedObj…
Test Structure And Quality Passed The check applies to Ginkgo test code. The PR changes the MCO ClusterOperator relatedObjects list in pkg/operator/status.go and does not add any Ginkgo It/Describe blocks, ote.Informing() ca…
Microshift Test Compatibility Passed The check applies only to new Ginkgo e2e tests (It/Describe/Context/When). This PR is a manual cherry-pick of #6706. It adds machineconfignode, pinnedimagesets, `m…
Single Node Openshift (Sno) Test Compatibility Passed The check applies only when new Ginkgo e2e tests (It/Describe/Context/When) are added. This PR (#6759, author isabella-janssen, a manual cherry-pick of #6706) changes …
Topology-Aware Scheduling Compatibility Passed The check applies when deployment manifests, operator code, or controllers add or modify scheduling constraints. This PR is a manual cherry-pick (per the PR description) that adds four entries to the …
Ote Binary Stdout Contract Passed The check applies to OTE binary process-level stdout (main, init, TestMain, suite setup, top-level initializers). This PR is a cherry-pick that adds four entries (machineconfignodes, pinnedimagesets, …
Ipv6 And Disconnected Network Test Compatibility Passed The check applies only to newly added Ginkgo e2e tests (It, Describe, Context, When). This PR adds none. The PR (cherry-pick of #6706, OCPBUGS-140844) changes only `pk…
No-Weak-Crypto Passed The PR (openshift/machine-config-operator #6759, author isabella-janssen) adds four machineconfiguration.openshift.io entries to syncRelatedObjects in pkg/operator/status.go: `machineconfignodes…
Container-Privileges Passed The check flags privileged containers, host namespaces, SYS_ADMIN, root containers, and allowPrivilegeEscalation in container or Kubernetes manifests. PR #6759 (openshift/machine-config-operator, auth…
No-Sensitive-Data-In-Logs Passed The check looks for logging that may expose passwords, tokens, API keys, PII, session IDs, internal hostnames, or customer data. The PR (openshift/machine-config-operator #6759, a cherry-pick of #6706…
Full details: Stable And Deterministic Test Names

Explanation

The check covers Ginkgo test titles (It, Describe, Context, When). This PR (openshift/machine-config-operator #6759, author isabella-janssen) only adds four resources to the ClusterOperator relatedObjects list in pkg/operator/status.go. It also adds one plain Go unit test, TestSyncRelatedObjectsContainsMachineConfigurationTypes, in pkg/operator/status_test.go. Neither file imports Ginkgo, and status_test.go contains no g.It or g.Describe titles. The added test name is static and descriptive, so it would also satisfy the naming rule if the check were applied to Go test names. The legacy openshift-tests-private tokens (Author:, NonHyperShiftHOST, ROSA/OSD_CCS/ARO, Polarion IDs) do not appear in the changed code. No Ginkgo titles are introduced, so the check is inapplicable and passes. Limitation: the local git history is a single squashed commit (5628168), so the PR diff was inferred from the PR description and by reading the touched files directly, not from a per-PR diff.

Full details: Test Structure And Quality

Explanation

The check applies to Ginkgo test code. The PR changes the MCO ClusterOperator relatedObjects list in pkg/operator/status.go and does not add any Ginkgo It/Describe blocks, ote.Informing() calls, or Eventually/Consistently waits. Evidence: - The repository is a single squashed commit (5628168), so no pre-change base was available. I identified PR-relevant test code by content, not by diff. - The only related test is TestSyncRelatedObjectsContainsMachineConfigurationTypes in pkg/operator/status_test.go (lines 829-853). It is a plain Go testing test using testify assert. It imports no Ginkgo, Gomega, or ote packages. - The test creates no cluster-scoped resources. It builds an in-memory ClusterOperator, calls syncRelatedObjects, and checks that the expected machineconfiguration.openshift.io resources are present. No cleanup is needed. - Its assertion includes a meaningful failure message: "relatedObjects must include %s for oc adm inspect to collect it". - The test/e2e-2of2/mcn_test.go hits reference machineconfignodes but are pre-existing and not part of this change's test additions. I did not find evidence that they were added by this PR. Criterion 6 (informing) targets new Ginkgo It() blocks. None were added, so it does not apply. Because the check is scoped to Ginkgo code and the PR adds none, the check is not applicable and passes.

Full details: Microshift Test Compatibility

Explanation

The check applies only to new Ginkgo e2e tests (It/Describe/Context/When). This PR is a manual cherry-pick of #6706. It adds machineconfignode, pinnedimagesets, machineosconfigs, and machineosbuilds to the ClusterOperator relatedObjects list. Evidence gathered: - install/0000_80_machine-config_06_clusteroperator.yaml lists the four new machineconfiguration.openshift.io resources in relatedObjects (lines 30-37). - pkg/operator/status.go defines syncRelatedObjects, which populates those objects. - pkg/operator/status_test.go lines 829-853 add TestSyncRelatedObjectsContainsMachineConfigurationTypes. This is a standard testing.T unit test, not a Ginkgo It/Describe e2e test. - The PR description's verification steps are manual oc commands. They do not add any Ginkgo test. Limitation: the local HEAD is a single root commit, and origin/main is an unrelated, much larger base. So the PR patch could not be diffed cleanly. No new Ginkgo test file or g.It block was identified that the PR introduces. The existing [apigroup:machineconfiguration.openshift.io] tests in test/extended and test/extended-priv predate this change. None of the changed code is a new e2e test, so no MicroShift-compatibility failure condition is triggered.

Full details: Single Node Openshift (Sno) Test Compatibility

Explanation

The check applies only when new Ginkgo e2e tests (It/Describe/Context/When) are added. This PR (#6759, author isabella-janssen, a manual cherry-pick of #6706) changes ClusterOperator relatedObjects for four machineconfiguration.openshift.io resources. Evidence gathered: - The checkout is a single-commit snapshot (commit 5628168, no parent), so a PR base diff is not available. The file-level diff therefore could not be isolated. - The PR description describes only the relatedObjects change and manual oc verification steps. It mentions no new Ginkgo tests. - The relatedObjects logic is in pkg/operator/status.go (syncRelatedObjects, around lines 51-80 and 461-462). The only test tied to it, TestSyncRelatedObjectsContainsMachineConfigurationTypes in pkg/operator/status_test.go (line 829), is a standard Go unit test, not a Ginkgo e2e test. - A search of test/ for relatedObjects and the four resource names found no Ginkgo test that asserts on relatedObjects. The Ginkgo files that reference these resources (test/extended/machineconfignode.go, test/extended/image_mode_status_reporting.go, test/extended-priv/*) were not shown to be added by this PR. Because the PR does not add Ginkgo e2e tests, the SNO topology review does not apply. The base diff was not available, so this rests on the PR description and the scope of the visible change, not on a full diff review.

Full details: Topology-Aware Scheduling Compatibility

Explanation

The check applies when deployment manifests, operator code, or controllers add or modify scheduling constraints. This PR is a manual cherry-pick (per the PR description) that adds four entries to the machine-config ClusterOperator relatedObjects list: machineconfignodes, pinnedimagesets, machineosconfigs, and machineosbuilds (group machineconfiguration.openshift.io). The current tree shows these entries in pkg/operator/status.go (lines 63-66) and install/0000_80_machine-config_06_clusteroperator.yaml (lines 31-37), with the expected test list in pkg/operator/status_test.go. None of these are scheduling-related. The repository is a single squashed commit, so a line-by-line diff against a base was not available. The evidence still does not show any affinity, anti-affinity, toleration, nodeSelector, topology-spread, replica-count, or PDB change introduced by this PR. The PR description also describes only the relatedObjects change. No topology-sensitive scheduling constraint is introduced, so no failure condition is met.

Full details: Ote Binary Stdout Contract

Explanation

The check applies to OTE binary process-level stdout (main, init, TestMain, suite setup, top-level initializers). This PR is a cherry-pick that adds four entries (machineconfignodes, pinnedimagesets, machineosconfigs, machineosbuilds) to the syncRelatedObjects slice in pkg/operator/status.go, with a matching assertion in pkg/operator/status_test.go. Neither file is part of the OTE test binary. The OTE binary is cmd/machine-config-tests-ext/main.go. Its main() was reviewed and it has no stdout writes in the PR's changes. The PR does not modify that file, and the added lines contain no fmt.Print*, os.Stdout, klog, or log output calls. The check is therefore inapplicable to this change, and no new process-level stdout write is introduced. Note: the sandbox HEAD commit contains the full tree, so the diff was checked by file content and the PR description rather than a clean patch. The conclusion holds because the relevant changes are limited to operator status code.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

The check applies only to newly added Ginkgo e2e tests (It, Describe, Context, When). This PR adds none. The PR (cherry-pick of #6706, OCPBUGS-140844) changes only pkg/operator/status.go, where syncRelatedObjects adds four machineconfiguration.openshift.io entries to the ClusterOperator relatedObjects: machineconfignodes, pinnedimagesets, machineosconfigs, and machineosbuilds. It also adds TestSyncRelatedObjectsContainsMachineConfigurationTypes in pkg/operator/status_test.go. That test is a plain Go testing.T unit test, not a Ginkgo spec. A grep of pkg/operator/ found no g.It(, g.Describe(, or ginkgo. usage. The added code contains no IP literals, IP parsing, external URLs, or network connectivity. Because the repository is a single root commit, I could not isolate a diff against a parent. I identified the changed code from the commit contents and the PR description, which is sufficient for this check.

Full details: No-Weak-Crypto

Explanation

The PR (openshift/machine-config-operator #6759, author isabella-janssen) adds four machineconfiguration.openshift.io entries to syncRelatedObjects in pkg/operator/status.go: machineconfignodes, pinnedimagesets, machineosconfigs, and machineosbuilds. Its test assertion in pkg/operator/status_test.go also covers these entries. The PR description describes only this change, a cherry-pick of #6706. The check flags weak cryptography (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB), custom crypto, and non-constant-time comparison of secrets or tokens. Searches of pkg and cmd found MD5 usage in pkg/controller/render/hash.go and pkg/controller/build/buildrequest/machineosbuild.go. Neither file is part of the described change, and both are pre-existing content hashing. The added lines contain no cryptographic primitive, no cipher, and no secret comparison. Limitation: the sandbox shows the PR commit as a full-tree addition, so a line-level base diff was not available. The PASS relies on the commit message, the PR description, and the status.go hunk. None of these show a crypto change.

Full details: Container-Privileges

Explanation

The check flags privileged containers, host namespaces, SYS_ADMIN, root containers, and allowPrivilegeEscalation in container or Kubernetes manifests. PR #6759 (openshift/machine-config-operator, author isabella-janssen) only adds four machineconfiguration.openshift.io resources to ClusterOperator relatedObjects, which the must-gather/inspect tooling reads. Evidence: - pkg/operator/status.go, syncRelatedObjects (lines 51-79): adds machineconfignodes, pinnedimagesets, machineosconfigs, and machineosbuilds entries to coStatusCopy.RelatedObjects. The other entries are unchanged. - pkg/operator/status.go, around line 461: the bootstrap-time relatedObjects list is unchanged in the security sense. It holds only namespaces, MCPs, controllerconfigs, and machineconfigurations. - install/0000_80_machine-config_06_clusteroperator.yaml: the ClusterOperator status lists the same four resources. It contains no pod spec, container, or securityContext fields. - pkg/operator/status_test.go, TestSyncRelatedObjectsContainsMachineConfigurationTypes: a unit test that asserts those resources are present. It adds no workload configuration. The repository snapshot is a single squashed commit with no parent, so the exact PR patch cannot be isolated from history. The files the PR description and summary name were read directly. None of them contains privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, runAsUser 0, or allowPrivilegeEscalation settings. Matches in the commit belong to vendored code and unrelated manifests, not to this change. No explicit failure condition of the check is introduced.

Full details: No-Sensitive-Data-In-Logs

Explanation

The check looks for logging that may expose passwords, tokens, API keys, PII, session IDs, internal hostnames, or customer data. The PR (openshift/machine-config-operator #6759, a cherry-pick of #6706, by isabella-janssen) adds four ObjectReference entries to syncRelatedObjects in pkg/operator/status.go (lines 63-66: machineconfignodes, pinnedimagesets, machineosconfigs, machineosbuilds). It also updates the matching relatedObjects list in install/0000_80_machine-config_06_clusteroperator.yaml and adds test entries in pkg/operator/status_test.go. None of these changes adds a log statement or writes any runtime value to logs. The Go-diff grep for new klog/Infof/Errorf-style lines in the commit returned no matches. The PR therefore introduces no logging that could expose sensitive data.

@openshift-ci

openshift-ci Bot commented Nov 12, 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

@isabella-janssen

Copy link
Copy Markdown
Member Author

/jira cherrypick OCPBUGS-136140

@openshift-ci

openshift-ci Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

Copy link
Copy Markdown
Contributor

@isabella-janssen: Jira Issue OCPBUGS-136140 has been cloned as Jira Issue OCPBUGS-140844. Will retitle bug to link to clone.
/retitle OCPBUGS-140844: Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects

Details

In response to this:

/jira cherrypick OCPBUGS-136140

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 changed the title Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects OCPBUGS-140844: Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects Nov 12, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. 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 Nov 12, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@isabella-janssen: This pull request references Jira Issue OCPBUGS-140844, which is invalid:

  • expected dependent Jira Issue OCPBUGS-136140 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

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:

Closes:

- What I did
This is a manual cherrypick of #6706.

- How to verify it
Test on a 4.21 cluster with this PR included that has at least one PinnedImageSet applied and OCL enabled.

$ oc get clusterversion
<>
$ oc get pinnedimageset
<>
$ oc get machineosbuild
<>
  1. Get all related objects.
$ oc get clusteroperator machine-config -o jsonpath='{range .status.relatedObjects[*]}{.resource}{"\t"}{.group}{"\n"}{end}'
<>
  1. Write information to /tmp/mco-inspect
$ oc adm inspect clusteroperator/machine-config --dest-dir=/tmp/mco-inspect
  1. Check that the machineconfiguration.openshift.io related objects from step 1 and targetted by this bug are included in the machineconfiguration.openshift.io directory
$ ls /tmp/mco-inspect/cluster-scoped-resources/machineconfiguration.openshift.io
<>

- Description for the changelog
Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects

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.

@isabella-janssen isabella-janssen changed the title OCPBUGS-140844: Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects [release-4.21] OCPBUGS-140844: Add machineconfignode, pinnedimageset, machineosconfig, and machineosbuild resources to relatedObjects Nov 12, 2026
@isabella-janssen
isabella-janssen marked this pull request as ready for review November 13, 2026 13:42
@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 Nov 13, 2026
@redhat-chai-bot

Copy link
Copy Markdown
Contributor

Chai risk assessment for 5628168d0a7e53ecfe745476b6e33aa21d22d634 → release-4.21

Tier: Low
Assessed: Low
Minimum: Low
Signals: 3 files, +38/-0 lines outside vendored and generated code; no API type changes; no CRD schema changes; full diff read.

Reason: This change adds four existing MCO resource types (machineconfignodes, pinnedimagesets, machineosconfigs, machineosbuilds) to the ClusterOperator's relatedObjects list in both the YAML manifest and Go code, plus a corresponding test. The relatedObjects field is metadata on the ClusterOperator status consumed solely by oc adm inspect to determine which resources to collect during must-gather. No reconciliation logic, node management, upgrade path, or runtime behaviour is altered. The resources already exist on-cluster; they simply were not being gathered by the inspect tool. This meets the Low tier definition as a non-functional change that does not impact product behaviour.

Change it with @redhat-chai-bot /risk-tier <low|moderate|critical>: anyone can raise the tier; lowering it needs two OWNERS approvers and lasts until the next push.

/label chai-risk-assessment/low

@openshift-ci openshift-ci Bot added the chai-risk-assessment/low Chai risk assessment of the latest commit: low (no product behaviour change). label Nov 13, 2026
@openshift-ci

openshift-ci Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@isabella-janssen: 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

chai-risk-assessment/low Chai risk assessment of the latest commit: low (no product behaviour change). jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-low Referenced Jira bug's severity is low 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