-
Couldn't load subscription status.
- Fork 231
Add Windows VMs vCPU overcommit prevention VAP #2535
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
base: master
Are you sure you want to change the base?
Conversation
|
Can one of the admins verify this patch? |
|
Hi @jcanocan. 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. 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. |
| - virtualmachineinstances | ||
| validations: | ||
| - expression: has(object.spec.domain.cpu.dedicatedCpuPlacement) && object.spec.domain.cpu.dedicatedCpuPlacement == true | ||
| message: Windows VMIs require dedicated CPU placement. Set spec.domain.cpu.dedicatedCpuPlacement to true. |
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.
spec.domain.cpu.dedicatedCpuPlacement is quite low level. Can we point the user to an instancetype to use? If there is no instancetype available yet, let's create one
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.
Yes, we can also follow that path. Great idea. In such case, the drawbacks will still apply. However, we will have a 100% supported way of creating Windows VMs, which is a nice advantage compared with my orginal proposal.
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.
After thinking about this twice, if we want to follow this idea, we should force the user to pick up specific preferences for the supported Windows versions. We can include them in the common-instancetypes repo or here, whatever we find more appropriated. This will allow the user to have different windows sizes by using the different instance types we currently provide.
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.
sounds worth a try!
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.
Added an approximation of what it could look like, it is still required to add further preferences for all supported windows versions.
0ada4dc to
4954ab2
Compare
deploy/srep-vap/vcpu-overcommit/101-windows-10-vcpu-restrict.yaml
Outdated
Show resolved
Hide resolved
deploy/srep-vap/vcpu-overcommit/101-windows-10-vcpu-restrict.yaml
Outdated
Show resolved
Hide resolved
deploy/srep-vap/vcpu-overcommit/101-windows-10-vcpu-restrict.yaml
Outdated
Show resolved
Hide resolved
9ac0225 to
704e950
Compare
| spec: | ||
| policyName: "windows-vcpu-overcommit" | ||
| validationActions: [Deny] | ||
| matchResources: No newline at end of file |
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.
should this key be set explicitly to a non-empty value or is the key with no value valid configuration?
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.
Sorry for the late reply. No it does not, removed.
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 worries! Thanks Javier
704e950 to
611a5f8
Compare
|
@ksimon1 many thanks for your reviews! Much appreciated :) |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jcanocan 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 |
| object.metadata.annotations['kubevirt.io/preference-name'].lowerAscii().contains('dedicated') | ||
| ) | ||
| message: "Windows VM are required to use *dedicated preferences." | ||
|
No newline at end of file |
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.
missing new line at the end of file
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.
Fixed
Co-authored-by: Cursor AI Assistant <[email protected]> Signed-off-by: Javier Cano Cano <[email protected]>
611a5f8 to
1241d17
Compare
What type of PR is this?
Feature
What this PR does / why we need it?
It is required to enable some sort of protection in Windows based VMs to prevent them to overcommit vCPUs. To achieve this, it is assumed that CPUmanager is enabled on, and only on, Windows Licensed nodes. This is due to the fact that, during the scheduling process, any VM with
spec.domain.cpu.dedicatedCpuPlacementwill be assigned to nodes withcpumanagerfeature enabled. Therefore, the scheduler will effectively assign those VMs to Windows Licensed nodes. Moreover, if the VM does not overcommit, vCPUs will be allowed to run.This approach has the following drawbacks as it is:
Which Jira/Github issue(s) this PR fixes?
Fixes #
Special notes for your reviewer:
Pre-checks (if applicable):
Tested latest changes against a cluster
Included documentation changes with PR
If this is a new object that is not intended for the FedRAMP environment (if unsure, please reach out to team FedRAMP), please exclude it with: