OCPBUGS-63213: Add priority field to prevent early shutdown#1915
OCPBUGS-63213: Add priority field to prevent early shutdown#1915openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
Conversation
WalkthroughAdds a numeric priority field to the kube-apiserver Pod manifest to set its scheduling priority. No other fields or control flow are changed. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Hi @CoreyCook8. 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 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. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
bindata/assets/kube-apiserver/pod.yaml (2)
291-291: Add a short inline comment for future maintainersExplain why the numeric priority is set explicitly.
hostNetwork: true + # Explicit numeric priority because kubelet ignores priorityClassName for static pods in static pod files. + # Ref: https://github.com/kubernetes/kubernetes/issues/133442 priority: 2000001000
289-295: Ensure shutdown ordering is consistent across control-plane static podsVerify priorities for other control-plane static pods (scheduler, controller-manager, etcd) meet the intended shutdown order relative to kube-apiserver.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
bindata/assets/kube-apiserver/pod.yaml(1 hunks)
🔇 Additional comments (1)
bindata/assets/kube-apiserver/pod.yaml (1)
291-293: Approve numeric priority for static pod ordering: priority and priorityClassName fields are present in bindata/assets/kube-apiserver/pod.yaml (lines 291–292).
|
👋 @p0lyn0mial @benluddy Could I get a review on this and an ok-to-test 🙏 |
| readOnlyRootFilesystem: true | ||
| terminationGracePeriodSeconds: {{.GracefulTerminationDuration}} | ||
| hostNetwork: true | ||
| priority: 2000001000 |
There was a problem hiding this comment.
Perhaps for HA it doesn’t matter, but for SNO it might. It would be helpful to shut down KAS as the last pod, so that the remaining workloads can gracefully shut down before KAS.
Unless I am missing something. WDYT?
|
/ok-to-test |
|
@CoreyCook8 @benluddy once we are convinced about this PR perhaps we should add the priority for the other control plane components that use the static pods. |
|
@CoreyCook8: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
|
/lgtm Thanks for opening this PR and calling out this issue! There's a concise summary here for the record: kubernetes/kubernetes#133535 (comment). It's the numeric priority that Kubelet uses to determine shutdown priority, and the priority admission plugin is responsible for setting a numeric priority based on a priority class name. Static pods aren't created through API admission, so they don't get the numeric priority. I don't know if we absolutely need kube-apiserver to be shut down later on an HA topology, since other components on the same node should continue to work while their local kube-apiserver process rolls out, but it does seem good to shrink the window of time we're running with reduced redundancy, even if it ends up making node shutdown take a bit longer. Maybe we'll see smoother rollouts on single-node with this? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benluddy, CoreyCook8 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified by @CoreyCook8 |
|
@p0lyn0mial: This PR has been marked as verified by 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. |
|
/retitle NO-JIRA: Add priority field to prevent early shutdown |
|
@CoreyCook8: This pull request explicitly references no jira issue. 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. |
51e09bc
into
openshift:main
|
/backport release-4.20 |
|
/cherry-pick release-4.20 |
|
@dinhxuanvu: new pull request created: #1955 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. |
|
@CoreyCook8: Jira Issue OCPBUGS-63213 is in an unrecognized state (ON_QA) and will not be moved to the MODIFIED state. 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. |
|
/jira refresh |
|
@sanchezl: Jira Issue Verification Checks: Jira Issue OCPBUGS-63213 Jira Issue OCPBUGS-63213 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
Based on the issue described here : kubernetes/kubernetes#133442
priorityClassName is currently ignored by Kubelet for static pod files so setting this value has no impact on the gracefulShutdown order causing the static pods to start to be killed as soon as shutdown begins.
To prevent this we must set priority explicitly
Summary by CodeRabbit