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

Skip containerd shutdown if Docker is bound to it #7595

Merged
merged 1 commit into from
Apr 10, 2020

Conversation

tstromberg
Copy link
Contributor

A simple approach to something Medya was discussing for #7435

In the KIC configuration, Docker is bound to containerd.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 10, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tstromberg

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 Apr 10, 2020
@codecov-io
Copy link

Codecov Report

Merging #7595 into master will increase coverage by 0.01%.
The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7595      +/-   ##
==========================================
+ Coverage   36.49%   36.50%   +0.01%     
==========================================
  Files         147      147              
  Lines        9109     9120      +11     
==========================================
+ Hits         3324     3329       +5     
- Misses       5398     5403       +5     
- Partials      387      388       +1     
Impacted Files Coverage Δ
pkg/minikube/cruntime/cruntime.go 64.28% <0.00%> (-3.64%) ⬇️
pkg/minikube/cruntime/docker.go 29.67% <62.50%> (+1.50%) ⬆️

@tstromberg
Copy link
Contributor Author

/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 Apr 10, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [62.767086182 64.415935529 63.745128094]
Average time for minikube: 63.642716601666656

Times for Minikube (PR 7595): [61.90356139100001 62.687164577000004 66.40008736700001]
Average time for Minikube (PR 7595): 63.66360444500001

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7595) |
+--------------------------------+-----------+--------------------+
| * minikube v1.9.2 on Debian    |  0.050622 |           0.050708 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.017055 |           0.017095 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.002853 |           0.011462 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 41.254743 |          39.950991 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.0 | 20.472871 |          21.684879 |
| on Docker 19.03.8 ...          |           |                    |
| * Enabling addons:             |  1.767574 |           1.869727 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.074236 |           0.074023 |
| configured to use "minikube"   |           |                    |
|                                |  0.002763 |           0.004720 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [46.957958753999996 45.863305964000006 34.174199931]
Average time for minikube: 42.331821549666664

Times for Minikube (PR 7595): [38.21885815299999 35.791257140000006 44.445368318]
Average time for Minikube (PR 7595): 39.485161203666664

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 7595) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.9.2 on Debian            |  0.061618 |           0.062932 |
|                                   9.11 |           |                    |
| * Using the docker driver              |  0.002408 |           0.002454 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.000091 |           0.000117 |
| minikube in cluster minikube           |           |                    |
| * Pulling base image ...               |  0.149294 |           0.162020 |
| * Creating Kubernetes in               |  9.398490 |           8.301537 |
| docker container with (CPUs=2)         |           |                    |
| (4 available), Memory=3700MB           |           |                    |
| (15043MB available) ...                |           |                    |
| * Preparing Kubernetes v1.18.0         |  0.098482 |           0.093929 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 24.669442 |          27.792262 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Enabling addons:                     |  7.572525 |           2.989142 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.376534 |           0.077708 |
| configured to use "minikube"           |           |                    |
|                                        |  0.002937 |           0.003059 |
+----------------------------------------+-----------+--------------------+

@medyagh
Copy link
Member

medyagh commented Apr 10, 2020

the soft start on this PR is 13 seconds ( on my PR it was 8 seconds)
#7435

could be I am using different laptop ( but maybe somethign is wrong?)

medya@~/workspace/minikube (tstromberg-containerd-bound) $ time ./out/minikube start --driver=docker
😄  minikube v1.9.2 on Darwin 10.15.3
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🏃  Updating the running docker "minikube" container ...
🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.2 ...
    ▪ kubeadm.pod-network-cidr=10.244.0.0/16
🌟  Enabling addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"

real	0m13.866s
user	0m2.883s
sys	0m1.686s

@tstromberg
Copy link
Contributor Author

tstromberg commented Apr 10, 2020

@medyagh - This is not expected to have a major impact on soft start speed. You can however confirm using --alsologtostderr that it does not shutdown containerd. From the integration test logs at https://storage.googleapis.com/minikube-builds/logs/7595/de45f94/Docker_Linux.html#fail_TestStartStop%2fgroup%2fold-docker you can see:

I0410 13:31:10.871962    8002 kic_runner.go:91] Run: sudo systemctl cat docker.service
I0410 13:31:11.191318    8002 cruntime.go:185] skipping containerd shutdown because we are bound to it
I0410 13:31:11.191426    8002 kic_runner.go:91] Run: sudo systemctl is-active --quiet service crio
I0410 13:31:11.479427    8002 kic_runner.go:91] Run: sudo systemctl daemon-reload
I0410 13:31:11.855862    8002 kic_runner.go:91] Run: sudo systemctl start docker
I0410 13:31:12.194383    8002 kic_runner.go:91] Run: docker version --format {{.Server.Version}}

So, while containerd might have been an issue, it is not the only issue.

@medyagh medyagh merged commit aa8de05 into kubernetes:master Apr 10, 2020
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.

5 participants