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

feat: allow preload for overlayfs #18333

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

ComradeProgrammer
Copy link
Member

@ComradeProgrammer ComradeProgrammer commented Mar 7, 2024

In docker desktop when we check the "Use containerd for pulling and storing images" option in setting, docker desktop will use the containerd image store and switch to overlayfs storage driver.

Before this pr, minikube will set preload to false anyway when encountering the overlayfs file system. However, actually minikube can still use the preload to accelerate the image pulling process under such circumstance.

This small pr allows preload when overlayfs is used. FIX #18255

Before:

minikube set preload to false when encountering overlayfs

 $ minikube start                    
minikube v1.32.0 on Darwin 14.2.1 (arm64)
✨  Automatically selected the docker driver
❗  docker is currently using the overlayfs storage driver, setting preload=false
📌  Using Docker Desktop driver with root privileges
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
    > gcr.io/k8s-minikube/kicbase...:  410.58 MiB / 410.58 MiB  100.00% 3.45 Mi
🔥  Creating docker container (CPUs=2, Memory=6100MB) ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔗  Configuring bridge CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

After

Now preload is used even when overlayfs is used

 $ minikube start        
😄  minikube v1.32.0 on Darwin 14.2.1 (arm64)
✨  Automatically selected the docker driver
📌  Using Docker Desktop driver with root privileges
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image v0.0.42-1708944392-18244 ...
💾  Downloading Kubernetes v1.28.4 preload ...
    > preloaded-images-k8s-v18-v1...:  341.36 MiB / 341.36 MiB  100.00% 2.22 Mi
    > gcr.io/k8s-minikube/kicbase...:  415.65 MiB / 415.65 MiB  100.00% 2.70 Mi
🔥  Creating docker container (CPUs=2, Memory=6100MB) ...
🐳  Preparing Kubernetes v1.28.4 on Docker 25.0.3 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔗  Configuring bridge CNI (Container Networking Interface) ...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🔎  Verifying Kubernetes components...
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

time comparasion:
Before: 3minute 45 seconds
After: 3 minute 37 seconds

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 7, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @ComradeProgrammer. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 7, 2024
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

for the PR descripton for the Before please explain the Docker desktop settings

for example... Enable this or Disable that...

and also for Before Explain what was happening (not using the Preload)

@medyagh
Copy link
Member

medyagh commented Mar 8, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 8, 2024
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18333) |
+----------------+----------+---------------------+
| minikube start | 51.1s    | 51.4s               |
| enable ingress | 27.0s    | 26.4s               |
+----------------+----------+---------------------+

Times for minikube start: 52.7s 52.2s 51.5s 49.3s 49.8s
Times for minikube (PR 18333) start: 51.9s 51.5s 51.9s 49.8s 52.1s

Times for minikube ingress: 28.7s 26.8s 26.3s 26.8s 26.3s
Times for minikube (PR 18333) ingress: 26.3s 26.8s 23.8s 27.2s 27.7s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18333) |
+----------------+----------+---------------------+
| minikube start | 24.9s    | 24.6s               |
| enable ingress | 20.1s    | 20.2s               |
+----------------+----------+---------------------+

Times for minikube start: 25.3s 26.0s 24.1s 25.8s 23.5s
Times for minikube (PR 18333) start: 24.2s 26.4s 25.6s 23.3s 23.7s

Times for minikube ingress: 19.9s 19.4s 20.4s 20.9s 19.9s
Times for minikube (PR 18333) ingress: 20.4s 19.4s 20.4s 20.4s 20.4s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18333) |
+----------------+----------+---------------------+
| minikube start | 22.3s    | 24.1s               |
| enable ingress | 33.9s    | 36.5s               |
+----------------+----------+---------------------+

Times for minikube ingress: 29.9s 29.9s 30.9s 46.9s 31.9s
Times for minikube (PR 18333) ingress: 29.9s 45.9s 45.9s 30.9s 29.9s

Times for minikube start: 21.6s 22.4s 21.9s 22.1s 23.7s
Times for minikube (PR 18333) start: 24.0s 22.1s 25.3s 24.1s 24.9s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Linux_crio TestAddons/parallel/Headlamp (gopogh) 0.61 (chart)
KVM_Linux_containerd TestFunctional/parallel/MountCmd/specific-port (gopogh) 1.84 (chart)
Docker_Windows TestCertExpiration (gopogh) 2.05 (chart)
KVM_Linux_crio TestFunctional/parallel/ImageCommands/ImageSaveToFile (gopogh) 2.45 (chart)
Docker_Linux_containerd_arm64 TestStartStop/group/old-k8s-version/serial/SecondStart (gopogh) 4.85 (chart)
KVM_Linux_crio TestFunctional/parallel/ImageCommands/ImageLoadFromFile (gopogh) 8.59 (chart)
QEMU_macOS TestImageBuild/serial/Setup (gopogh) 14.81 (chart)
QEMU_macOS TestJSONOutput/pause/Command (gopogh) 14.81 (chart)
QEMU_macOS TestJSONOutput/start/Command (gopogh) 14.81 (chart)
QEMU_macOS TestJSONOutput/unpause/Command (gopogh) 14.81 (chart)
QEMU_macOS TestMinikubeProfile (gopogh) 16.67 (chart)
KVM_Linux_crio TestPause/serial/SecondStartNoReconfiguration (gopogh) 49.08 (chart)

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

Copy link
Member

@spowelljr spowelljr left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@spowelljr spowelljr merged commit 6e40639 into kubernetes:master Mar 8, 2024
34 of 47 checks passed
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ComradeProgrammer, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 8, 2024
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/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.

Experiment not setting preload to false for Stargz
6 participants