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

Add Hyper-V memory validation for odd numbers #17325

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

spowelljr
Copy link
Member

@spowelljr spowelljr commented Sep 29, 2023

Closes #17242

Added logic to ensure that if --memory max is passed we don't generate an invalid memory value for Hyper-V and added validation to ensure odd MB memory value isn't passed to Hyper-V.

$ minikube start --driver hyperv --memory 6001
...

⛔  Exiting due to RSRC_INVALID_HYPERV_MEMORY: Hyper-V requires that memory MB be an even number, 6001MB was specified, try passing `--memory 6000`

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 29, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spowelljr

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 29, 2023
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
@medyagh medyagh changed the title Add Hyper-V memory validation Add Hyper-V memory validation for odd numbers Oct 2, 2023
@medyagh
Copy link
Member

medyagh commented Oct 3, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 3, 2023
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 17325) |
+----------------+----------+---------------------+
| minikube start | 50.7s    | 51.0s               |
| enable ingress | 28.1s    | 28.3s               |
+----------------+----------+---------------------+

Times for minikube start: 52.0s 52.8s 49.1s 49.0s 50.8s
Times for minikube (PR 17325) start: 49.3s 51.8s 52.6s 51.5s 49.8s

Times for minikube ingress: 28.2s 28.1s 28.2s 28.1s 27.8s
Times for minikube (PR 17325) ingress: 29.1s 27.2s 29.3s 27.7s 28.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 17325) |
+----------------+----------+---------------------+
| minikube start | 23.4s    | 23.9s               |
| enable ingress | 21.1s    | 21.1s               |
+----------------+----------+---------------------+

Times for minikube start: 22.1s 26.2s 21.7s 22.2s 24.9s
Times for minikube (PR 17325) start: 25.2s 22.1s 22.8s 24.7s 24.9s

Times for minikube ingress: 21.8s 20.8s 20.8s 20.9s 21.4s
Times for minikube (PR 17325) ingress: 20.9s 20.8s 20.9s 20.8s 21.9s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 17325) |
+----------------+----------+---------------------+
| minikube start | 21.5s    | 23.4s               |
| enable ingress | 38.2s    | 32.2s               |
+----------------+----------+---------------------+

Times for minikube start: 23.7s 20.5s 21.4s 22.1s 20.0s
Times for minikube (PR 17325) start: 24.0s 23.5s 23.8s 24.5s 21.4s

Times for minikube ingress: 47.4s 48.3s 31.4s 32.4s 31.4s
Times for minikube (PR 17325) ingress: 19.4s 31.4s 47.4s 31.4s 31.4s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Linux_crio TestFunctional/parallel/ImageCommands/ImageTagAndLoadDaemon (gopogh) 0.74 (chart)
Docker_Linux_docker_arm64 TestMissingContainerUpgrade (gopogh) 2.21 (chart)
Docker_Linux_containerd TestFunctional/serial/LogsFileCmd (gopogh) 4.38 (chart)
Hyper-V_Windows TestNoKubernetes/serial/StartWithK8s (gopogh) 5.88 (chart)
KVM_Linux_crio TestFunctional/parallel/ImageCommands/ImageLoadFromFile (gopogh) 6.67 (chart)
Hyper-V_Windows TestRunningBinaryUpgrade (gopogh) 35.29 (chart)
QEMU_macOS TestFunctional/parallel/TunnelCmd/serial/RunSecondTunnel (gopogh) 47.66 (chart)

To see the flake rates of all tests by environment, click here.

@medyagh medyagh merged commit daf0e66 into kubernetes:master Oct 4, 2023
25 of 40 checks passed
@spowelljr spowelljr deleted the checkForHyperVMemoryValidation branch October 5, 2023 18:14
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add memory validation for Hyper-V
4 participants