Skip to content

Conversation

@dkhater-redhat
Copy link
Contributor

- What I did
Fixed a bug where MCO becomes degraded when an empty pull-secret is configured in the cluster. Modified
getImageRegistryPullSecrets() in pkg/operator/sync.go to gracefully handle empty pull-secrets by
checking if the pull-secret data is empty or contains only {} before attempting to convert and merge
it. When an empty pull-secret is detected, the operator now skips the merge operation instead of
erroring out. Also added test coverage in pkg/secrets/secrets_test.go for empty JSON object and null
literal edge cases.
- How to verify it
1. Configure an empty pull-secret in the cluster

$ oc -n openshift-config set data secret/pull-secret '.dockerconfigjson={}'

and verify MCO is not degraded.

- Description for the changelog

@dkhater-redhat dkhater-redhat changed the title MCO degraded when an empty pull-secret is configured OCPBUGS-62828: MCO degraded when an empty pull-secret is configured Dec 10, 2025
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate 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 Dec 10, 2025
@openshift-ci-robot
Copy link
Contributor

@dkhater-redhat: This pull request references Jira Issue OCPBUGS-62828, which is invalid:

  • expected the bug to target the "4.21.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:

- What I did
Fixed a bug where MCO becomes degraded when an empty pull-secret is configured in the cluster. Modified
getImageRegistryPullSecrets() in pkg/operator/sync.go to gracefully handle empty pull-secrets by
checking if the pull-secret data is empty or contains only {} before attempting to convert and merge
it. When an empty pull-secret is detected, the operator now skips the merge operation instead of
erroring out. Also added test coverage in pkg/secrets/secrets_test.go for empty JSON object and null
literal edge cases.
- How to verify it

  1. Configure an empty pull-secret in the cluster

$ oc -n openshift-config set data secret/pull-secret '.dockerconfigjson={}'

and verify MCO is not degraded.

- Description for the changelog

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 10, 2025
@dkhater-redhat
Copy link
Contributor 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 Dec 10, 2025
@openshift-ci-robot
Copy link
Contributor

@dkhater-redhat: This pull request references Jira Issue OCPBUGS-62828, 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 (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sergiordlr

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.

@openshift-ci openshift-ci bot requested a review from sergiordlr December 10, 2025 21:21
bytes: []byte(`{"auths":{}}`),
expected: &DockerConfigJSON{Auths: DockerConfig{}},
},
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Thanks for adding these test cases!

@cheesesashimi
Copy link
Member

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheesesashimi, dkhater-redhat

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:
  • OWNERS [cheesesashimi,dkhater-redhat]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dkhater-redhat
Copy link
Contributor Author

/test unit

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

@dkhater-redhat: 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/prow/bootstrap-unit 37cdfeb link false /test bootstrap-unit

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.

@openshift-bot
Copy link
Contributor

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Dec 12, 2025
@openshift-ci-robot
Copy link
Contributor

@openshift-bot: This pull request references Jira Issue OCPBUGS-62828, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "4.21.0" 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.

Details

In response to this:

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

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.

@dkhater-redhat
Copy link
Contributor Author

/test e2e-hypershift

@dkhater-redhat
Copy link
Contributor 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 Dec 12, 2025
@openshift-ci-robot
Copy link
Contributor

@dkhater-redhat: This pull request references Jira Issue OCPBUGS-62828, which is valid.

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

Requesting review from QA contact:
/cc @sergiordlr

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.

@sergiordlr
Copy link
Contributor

Verified using IPI on AWS

Test case OCP-57595 has been modified to check the machine-config CO, so that this issue doesn't escape again.

Executed test cases:

  • "[sig-mco] MCO Author:sregidor-NonPreRelease-Longduration-Medium-57595-[OnCLayer] Use empty pull-secret[Disruptive] [Serial]"
  • "[sig-mco] MCO Author:mhanss-NonPreRelease-Longduration-High-42680-[P2] change pull secret in the openshift-config namespace [Serial]"

A MC deploying a file was properly deployed too.

No issues found.

/label qe-approved
/verified by @sergiordlr

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Dec 15, 2025
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 15, 2025
@openshift-ci-robot
Copy link
Contributor

@sergiordlr: This PR has been marked as verified by @sergiordlr.

Details

In response to this:

Verified using IPI on AWS

Test case OCP-57595 has been modified to check the machine-config CO, so that this issue doesn't escape again.

Executed test cases:

  • "[sig-mco] MCO Author:sregidor-NonPreRelease-Longduration-Medium-57595-[OnCLayer] Use empty pull-secret[Disruptive] [Serial]"
  • "[sig-mco] MCO Author:mhanss-NonPreRelease-Longduration-High-42680-[P2] change pull secret in the openshift-config namespace [Serial]"

A MC deploying a file was properly deployed too.

No issues found.

/label qe-approved
/verified by @sergiordlr

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-robot
Copy link
Contributor

@dkhater-redhat: This pull request references Jira Issue OCPBUGS-62828, which is valid.

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

Requesting review from QA contact:
/cc @sergiordlr

Details

In response to this:

- What I did
Fixed a bug where MCO becomes degraded when an empty pull-secret is configured in the cluster. Modified
getImageRegistryPullSecrets() in pkg/operator/sync.go to gracefully handle empty pull-secrets by
checking if the pull-secret data is empty or contains only {} before attempting to convert and merge
it. When an empty pull-secret is detected, the operator now skips the merge operation instead of
erroring out. Also added test coverage in pkg/secrets/secrets_test.go for empty JSON object and null
literal edge cases.
- How to verify it

  1. Configure an empty pull-secret in the cluster

$ oc -n openshift-config set data secret/pull-secret '.dockerconfigjson={}'

and verify MCO is not degraded.

- Description for the changelog

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.

@umohnani8
Copy link
Contributor

Great work! LGTM

@dkhater-redhat
Copy link
Contributor Author

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Dec 15, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 4763806 into openshift:main Dec 15, 2025
13 of 14 checks passed
@openshift-ci-robot
Copy link
Contributor

@dkhater-redhat: Jira Issue OCPBUGS-62828: Some pull requests linked via external trackers have merged:

The following pull request, linked via external tracker, has not merged:

All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-62828 has not been moved to the MODIFIED state.

This PR is marked as verified. If the remaining PRs listed above are marked as verified before merging, the issue will automatically be moved to VERIFIED after all of the changes from the PRs are available in an accepted nightly payload.

Details

In response to this:

- What I did
Fixed a bug where MCO becomes degraded when an empty pull-secret is configured in the cluster. Modified
getImageRegistryPullSecrets() in pkg/operator/sync.go to gracefully handle empty pull-secrets by
checking if the pull-secret data is empty or contains only {} before attempting to convert and merge
it. When an empty pull-secret is detected, the operator now skips the merge operation instead of
erroring out. Also added test coverage in pkg/secrets/secrets_test.go for empty JSON object and null
literal edge cases.
- How to verify it

  1. Configure an empty pull-secret in the cluster

$ oc -n openshift-config set data secret/pull-secret '.dockerconfigjson={}'

and verify MCO is not degraded.

- Description for the changelog

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.

@dkhater-redhat
Copy link
Contributor Author

/cherry-pick release-4.21

@openshift-cherrypick-robot

@dkhater-redhat: new pull request created: #5499

Details

In response to this:

/cherry-pick release-4.21

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

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. 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. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants