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

Use CGroupDriver function from cruntime for kubelet #6287

Merged
merged 4 commits into from
Jan 15, 2020

Conversation

afbjorklund
Copy link
Collaborator

For #4172

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 12, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

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 Jan 12, 2020
@codecov-io
Copy link

codecov-io commented Jan 12, 2020

Codecov Report

Merging #6287 into master will increase coverage by 0.1%.
The diff coverage is 60.41%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #6287     +/-   ##
=========================================
+ Coverage   38.28%   38.38%   +0.1%     
=========================================
  Files         124      123      -1     
  Lines        8257     8318     +61     
=========================================
+ Hits         3161     3193     +32     
- Misses       4686     4706     +20     
- Partials      410      419      +9
Impacted Files Coverage Δ
pkg/minikube/cruntime/cruntime.go 60% <ø> (-3.64%) ⬇️
pkg/minikube/bootstrapper/bsutil/kubelet.go 52.38% <33.33%> (-1.47%) ⬇️
pkg/minikube/cruntime/containerd.go 47.11% <50%> (+0.52%) ⬆️
pkg/minikube/cruntime/cri.go 58.76% <54.54%> (+1.22%) ⬆️
pkg/minikube/cruntime/docker.go 43.75% <66.66%> (+1.52%) ⬆️
pkg/minikube/cruntime/crio.go 47.05% <83.33%> (+5.96%) ⬆️
cmd/minikube/cmd/config/addons_list.go 11.76% <0%> (-12.05%) ⬇️
pkg/minikube/driver/driver.go 78.46% <0%> (-3.8%) ⬇️
cmd/minikube/cmd/start.go 21.99% <0%> (-0.05%) ⬇️
... and 8 more

@afbjorklund afbjorklund changed the title WIP: Add CGroupDriver function to cruntime interface Use CGroupDriver function from cruntime for kubelet Jan 12, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 12, 2020
@afbjorklund
Copy link
Collaborator 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 Jan 12, 2020
@minikube-bot
Copy link
Collaborator

Error: running mkcmp
2020/01/12 21:05:33 Executing run 1/3...
2020/01/12 21:05:33 Running: [/home/performance-monitor/minikube/out/minikube start]...
2020/01/12 21:05:33 0.472194: * minikube v1.6.2 on Debian 9.11
2020/01/12 21:05:33 0.043603: * Selecting 'kvm2' driver from user configuration (alternates: [docker none])
2020/01/12 21:06:21 47.749094: * Creating kvm2 VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
2020/01/12 21:07:14 52.604855: * Preparing Kubernetes v1.17.0 on Docker '19.03.5' ...
2020/01/12 21:07:15 1.793329: * Pulling images ...
2020/01/12 21:07:37 21.744691: * Launching Kubernetes ...
2020/01/12 21:07:40 2.640139: * Waiting for cluster to come online ...
2020/01/12 21:07:41 Running: [/home/performance-monitor/.minikube/minikube-binaries/6287/minikube start]...
2020/01/12 21:07:41 0.399357: * minikube v1.6.2 on Debian 9.11
2020/01/12 21:07:41 0.043949: * Selecting 'kvm2' driver from user configuration (alternates: [none docker])
2020/01/12 21:08:27 45.503383: * Creating kvm2 VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xbd878f]

goroutine 1 [running]:
k8s.io/minikube/pkg/minikube/cruntime.(*Docker).CGroupDriver(0xc0005ca980, 0x7, 0x0, 0x0, 0x0)
/app/pkg/minikube/cruntime/docker.go:134 +0x8f
k8s.io/minikube/pkg/minikube/bootstrapper/bsutil.NewKubeletConfig(0xc00050ce40, 0x7, 0xc0005d37c0, 0xe, 0x20fb, 0x174180c, 0x8, 0x17444cb, 0xa, 0x0, ...)
/app/pkg/minikube/bootstrapper/bsutil/kubelet.go:44 +0x162
k8s.io/minikube/pkg/minikube/bootstrapper/kubeadm.(*Bootstrapper).UpdateCluster(0xc000841470, 0x174180c, 0x8, 0x0, 0xc0000d9cc0, 0x3f, 0x7d0, 0x2, 0x4e20, 0xc0000c6150, ...)
/app/pkg/minikube/bootstrapper/kubeadm/kubeadm.go:381 +0x2b8
k8s.io/minikube/cmd/minikube/cmd.setupKubeAdm(0x19e8640, 0xc000083200, 0x174180c, 0x8, 0x0, 0xc0000d9cc0, 0x3f, 0x7d0, 0x2, 0x4e20, ...)
/app/cmd/minikube/cmd/start.go:1239 +0x3a1
k8s.io/minikube/cmd/minikube/cmd.runStart(0x2453620, 0x24ed750, 0x0, 0x0)
/app/cmd/minikube/cmd/start.go:355 +0x7d7
github.com/spf13/cobra.(*Command).execute(0x2453620, 0x24ed750, 0x0, 0x0, 0x2453620, 0x24ed750)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x2452720, 0x27, 0x1, 0xc00051c030)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
k8s.io/minikube/cmd/minikube/cmd.Execute()
/app/cmd/minikube/cmd/root.go:107 +0x621
main.main()
/app/cmd/minikube/main.go:66 +0xe7
: exit status 1

@minikube-bot
Copy link
Collaborator

All Times minikube: [ 120.538497 120.565129 111.032352]
All Times Minikube (PR 6287): [ 119.154191 119.998187 119.645931]

Average minikube: 117.378659
Average Minikube (PR 6287): 119.599436

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6287) |
+----------------------+-----------+--------------------+
| minikube v           |  0.417486 |           0.410441 |
| Creating kvm2        | 45.706304 |          45.489857 |
| Preparing Kubernetes | 46.596232 |          48.297469 |
| Pulling images       |  2.621126 |           2.406580 |
| Launching Kubernetes | 19.113633 |          20.053932 |
| Waiting for cluster  |  2.880125 |           2.899267 |
| Done                 |           |                    |
|                      |  0.044881 |           0.041890 |
+----------------------+-----------+--------------------+

cgroupManager := "cgroupfs" // default
switch config["systemdCgroup"] {
case false:
cgroupManager = "cgroupfs"
Copy link
Member

Choose a reason for hiding this comment

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

just a nit but could put it in a const ?

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.

looks good a just minior change request, to add same logic for kicbs.

I will make a PR soon, to avoid this need to maintain duplicate code

@minikube-bot
Copy link
Collaborator

All Times minikube: [ 121.530996 120.357455 108.812287]
All Times Minikube (PR 6287): [ 111.007424 123.517840 110.326774]

Average minikube: 116.900246
Average Minikube (PR 6287): 114.950679

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6287) |
+----------------------+-----------+--------------------+
| minikube v           |  0.309166 |           0.296338 |
| Creating kvm2        | 46.462915 |          45.907998 |
| Preparing Kubernetes | 46.235130 |          44.740071 |
| Pulling images       |  2.631709 |           2.336833 |
| Launching Kubernetes | 18.498580 |          18.717940 |
| Waiting for cluster  |  2.712747 |           2.902932 |
| Done                 |           |                    |
|                      |  0.047990 |           0.048566 |
+----------------------+-----------+--------------------+

@medyagh
Copy link
Member

medyagh commented Jan 14, 2020

the test restults show we are hitting github api limit
https://storage.googleapis.com/minikube-builds/logs/6287/KVM_Linux.txt

#6308

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants