OCPBUGS-92836: fix bootstrap deadlock when ManagementCPUsOverride rejects pods with 0 nodes#2712
Conversation
|
@bhuvi-op: This pull request references Jira Issue OCPBUGS-92836, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@bhuvi-op: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bhuvi-op The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @bhuvi-op. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
…entCPUsOverride rejects pods with 0 nodes During Baremetal IPI bootstrap, the ManagementCPUsOverride admission plugin hard-rejects pod creation when the cluster has no registered nodes. This blocks the machine-approver from starting, which prevents nodes from joining (CSRs cannot be approved), creating a circular deadlock. Fix by allowing pods through without mutation when len(nodes) == 0 instead of returning Forbidden. This is safe because the plugin cannot determine whether CPU partitioning is enabled without nodes anyway, and once nodes join the plugin will function normally for subsequent pod creations.
4dc4e98 to
e0cf699
Compare
|
@bhuvi-op: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
Comment |
|
@bhuvi-op: This pull request references Jira Issue OCPBUGS-92836, which is invalid:
Comment DetailsIn response to this:
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. |
|
/assign ehila |
|
@bhuvi-op: GitHub didn't allow me to assign the following users: ehila. Note that only openshift members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. DetailsIn response to this:
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. |
|
/jira refresh |
|
@bhuvi-op: This pull request references Jira Issue OCPBUGS-92836, which is invalid:
Comment DetailsIn response to this:
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. |
|
/close Closing in favor of #2713 |
|
@eggfoobar: Closed this PR. DetailsIn response to this:
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. |
|
@bhuvi-op: This pull request references Jira Issue OCPBUGS-92836. The bug has been updated to no longer refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
Bug
https://redhat.atlassian.net/browse/OCPBUGS-92836
Summary
During Baremetal IPI bootstrap (specifically IBM Fusion HCI / Cistern environments), the
ManagementCPUsOverride admission plugin hard-rejects pod creation when
len(nodes) == 0.This blocks the machine-approver from starting, which prevents nodes from joining
(CSRs cannot be approved), creating a circular deadlock and stalling the installation
indefinitely.
Root Cause
In
openshift-kube-apiserver/admission/autoscaling/managementcpusoverride/admission.go,the
Admitfunction returnedadmission.NewForbidden(...)when the node list was empty.During initial bootstrap, no nodes exist yet, so every pod creation — including critical
infrastructure like the machine-approver — was rejected with:
Fix
Return
nil(allow without mutation) whenlen(nodes) == 0. This is safe because:Testing
go test ./openshift-kube-apiserver/admission/autoscaling/managementcpusoverride//cc @ehila