-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support generating cpu partitioning file from infra flag #3335
Conversation
Signed-off-by: ehila <ehila@redhat.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: eggfoobar The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There's prior art for the installer generating MachineConfigs based on the install config, see e.g. https://github.com/openshift/installer/blob/master/pkg/asset/machines/machineconfig/hyperthreading.go I personally don't have a strong opinion on this, but I would say that it makes sense to have the "install time configuration to MachineConfiguration" logic live mainly in one place, whether that's github.com/openshift/installer or here. |
@@ -183,6 +188,14 @@ func (b *Bootstrap) Run(destDir string) error { | |||
configs = append(configs, kconfigs...) | |||
} | |||
|
|||
if infraConfig.Status.CPUPartitioning != apicfgv1.CPUPartitioningNone { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed on slack, but to clarify, if this only applies to bootstrap, if the MC does get generated, the install will fail due to a mismatch of configs generated by bootstrap and regular, causing a "can't find rendered-master-xxx" when the install happens. Basically #2114
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @yuqi-zhang , was looking through the code a bit, trying to understand this a little better. Does this mean that it's not possible to have a MC generated and maintain by MCO during bootstrap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is possible. You must have both the bootstrap and the "in-cluster" flow generate the same configs.
As an example, see this: #3015
which adds both for nodes.config.openshift.io objects
@eggfoobar: The following tests failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
Thanks folks, appreciate the feedback, I'll close this PR for now. |
/reopen Re-opening this PR, after some discussion with the installer team, MCO seems to be the best place to enforce the CPU Partitioning configuration cluster wide. |
@eggfoobar: Failed to re-open PR: state cannot be changed. The cpu_partitioning_bootstrap branch was force-pushed or recreated. In 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/test-infra repository. |
New PR #3355 |
/hold
Needs PR: openshift/api#1284
EP: openshift/enhancement#1213
Signed-off-by: ehila ehila@redhat.com
- What I did
Add support for generating a machine config file that will configure kubelet for workload partitioning based off of the infrastructure flag.
- How to verify it
When the Infrastructure status resource is set to
cpuPartitioning: AllNodes
, we will generate two new MCs for workload partitioning named01-master-cpu-partitioning
and01-worker-cpu-partitioning
that will create a configuration file for kubelet to use on start up.- Description for the changelog
Add new generated MCs for workload partitioning based off of infrastructure status.