Skip to content
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

Fix wrong quota filtering when preset.spec.cpu has no quantity #11046

Merged
merged 1 commit into from Sep 23, 2022

Conversation

hdurand0710
Copy link
Contributor

@hdurand0710 hdurand0710 commented Sep 23, 2022

Signed-off-by: Helene Durand helene@kubermatic.com

What this PR does / why we need it:
We were wrongly discarding some presets, like

apiVersion: kubevirt.io/v1
kind: VirtualMachineInstancePreset
metadata:
  name: dedicated-cpu
  namespace: default
spec:
  domain:
    ioThreadsPolicy: auto
    cpu:
      dedicatedCpuPlacement: true
      isolateEmulatorThread: true
    devices: {}
    resources:
      requests:
        cpu: 4
        memory: 16Gi
  selector:
    matchLabels:
      kubevirt.io/flavor: dedicated-cpu

with an error:
2022-09-23T08:24:16.810+0200 error provider/kubevirt.go:309 skipping VMIPreset:dedicated-cpu, fetching presetResourceDetails failed:should not specify both spec.domain.cpu and spec.domain.resources.[requests/limits].cpu in VMIPreset

Which issue(s) this PR fixes:

Fixes #11044

What type of PR is this?

/kind bug

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

Fix wrong quota filtering when VirtualMachineInstancePreset.spec.cpu has no quantity but only other fields.

Documentation:

NONE

@hdurand0710 hdurand0710 added the sig/virtualization Denotes a PR or issue as being assigned to SIG Virtualization. label Sep 23, 2022
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. sig/api Denotes a PR or issue as being assigned to SIG API. labels Sep 23, 2022
…her fields

Signed-off-by: Helene Durand <helene@kubermatic.com>
Copy link
Contributor

@mfranczy mfranczy left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 23, 2022
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 27c35df6f9d620cc9b8b8e14d00aa3da8a6c8398

Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 23, 2022
@hdurand0710
Copy link
Contributor Author

/test pre-kubermatic-e2e-kubevirt-centos-1.24
/test pre-kubermatic-e2e-kubevirt-ubuntu-1.24

@lsviben
Copy link
Contributor

lsviben commented Sep 23, 2022

/approve

we should add this to the next patch release for 2.21

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmedwaleedmalik, hdurand0710, lsviben, mfranczy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

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

@hdurand0710
Copy link
Contributor Author

/cherrypick release/v2.21

@kubermatic-bot
Copy link
Contributor

@hdurand0710: once the present PR merges, I will cherry-pick it on top of release/v2.21 in a new PR and assign it to you.

In response to this:

/cherrypick release/v2.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/test-infra repository.

@hdurand0710
Copy link
Contributor Author

/retest

@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@hdurand0710
Copy link
Contributor Author

/retest

@kubermatic-bot
Copy link
Contributor

@hdurand0710: new pull request created: #11056

In response to this:

/cherrypick release/v2.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/test-infra repository.

@hdurand0710 hdurand0710 deleted the 11044-quota-filtering branch September 23, 2022 14:05
@kubermatic-bot kubermatic-bot added the docs/none Denotes a PR that doesn't need documentation (changes). label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api Denotes a PR or issue as being assigned to SIG API. sig/virtualization Denotes a PR or issue as being assigned to SIG Virtualization. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KubeVirt: resource Quota filtering wrongly filters out some VirutalMachineInstancePresets.
6 participants