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

improve how cni and cruntimes work together #11185

Merged
merged 1 commit into from Apr 29, 2021

Conversation

prezha
Copy link
Collaborator

@prezha prezha commented Apr 23, 2021

fixes #11184

as stated in the issue's description:

crio is the only container runtime atm that allows specifying cni network that should be used (via 'cni_default_network' config param) and, unlike containerd or docker, it doesn't need custom kubelet's '--cni-conf-dir' flag to avoid conflicting CNI configs in default /etc/cni/net.d, so we can used that to improve how cni & cruntime work together (especially for multinode), while also avoiding later runtime reconfiguration and restart

@k8s-ci-robot k8s-ci-robot added 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 Apr 23, 2021
@medyagh
Copy link
Member

medyagh commented Apr 23, 2021

/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 23, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11185) |
+----------------+----------+---------------------+
| minikube start | 49.5s    | 50.9s               |
| enable ingress | 35.3s    | 34.6s               |
+----------------+----------+---------------------+

Times for minikube start: 48.8s 48.4s 51.2s 50.5s 48.8s
Times for minikube (PR 11185) start: 54.8s 47.9s 50.5s 47.7s 53.7s

Times for minikube (PR 11185) ingress: 36.3s 34.3s 33.7s 33.7s 35.2s
Times for minikube ingress: 34.8s 36.3s 34.3s 35.2s 35.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11185) |
+----------------+----------+---------------------+
| minikube start | 21.9s    | 21.6s               |
| enable ingress | 30.8s    | 33.2s               |
+----------------+----------+---------------------+

Times for minikube start: 23.0s 21.9s 21.7s 21.4s 21.7s
Times for minikube (PR 11185) start: 21.5s 21.2s 21.4s 22.0s 21.8s

Times for minikube ingress: 27.5s 41.0s 29.5s 27.6s 28.5s
Times for minikube (PR 11185) ingress: 42.0s 30.0s 30.0s 34.0s 30.0s

docker driver with containerd runtime
error collecting results for docker driver: timing run 0 with minikube: timing cmd: [out/minikube addons enable ingress]: waiting for minikube: exit status 10

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11185) |
+----------------+----------+---------------------+
| minikube start | 50.6s    | 49.6s               |
| enable ingress | 34.9s    | 35.0s               |
+----------------+----------+---------------------+

Times for minikube start: 54.8s 51.8s 46.9s 51.5s 48.1s
Times for minikube (PR 11185) start: 47.4s 48.7s 50.0s 51.6s 50.5s

Times for minikube ingress: 34.3s 37.7s 34.2s 34.3s 33.8s
Times for minikube (PR 11185) ingress: 34.3s 37.3s 34.4s 33.9s 35.3s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11185) |
+----------------+----------+---------------------+
| minikube start | 22.1s    | 21.2s               |
| enable ingress | 30.5s    | 31.2s               |
+----------------+----------+---------------------+

Times for minikube start: 22.4s 21.9s 22.1s 22.0s 22.1s
Times for minikube (PR 11185) start: 21.0s 21.8s 21.3s 21.1s 20.8s

Times for minikube ingress: 33.0s 32.0s 28.5s 30.0s 29.0s
Times for minikube (PR 11185) ingress: 29.5s 29.5s 28.5s 38.0s 30.5s

docker driver with containerd runtime
error collecting results for docker driver: timing run 0 with minikube: timing cmd: [out/minikube addons enable ingress]: waiting for minikube: exit status 10

@medyagh
Copy link
Member

medyagh commented Apr 25, 2021

/retest-this-please

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11185) |
+----------------+----------+---------------------+
| minikube start | 48.5s    | 49.8s               |
| enable ingress | 34.6s    | 34.4s               |
+----------------+----------+---------------------+

Times for minikube (PR 11185) ingress: 34.3s 34.7s 34.2s 34.2s 34.7s
Times for minikube ingress: 34.3s 34.8s 35.8s 34.2s 33.7s

Times for minikube start: 51.9s 47.1s 46.5s 49.2s 48.1s
Times for minikube (PR 11185) start: 49.7s 46.1s 51.3s 48.1s 53.9s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11185) |
+----------------+----------+---------------------+
| minikube start | 21.7s    | 21.5s               |
| enable ingress | 32.0s    | 30.5s               |
+----------------+----------+---------------------+

Times for minikube ingress: 29.0s 31.4s 32.5s 36.5s 30.5s
Times for minikube (PR 11185) ingress: 34.0s 29.5s 29.5s 30.5s 29.0s

Times for minikube (PR 11185) start: 22.4s 21.4s 20.8s 21.2s 21.6s
Times for minikube start: 22.9s 20.4s 22.5s 21.0s 21.6s

docker driver with containerd runtime
error collecting results for docker driver: timing run 0 with minikube: timing cmd: [out/minikube addons enable ingress]: waiting for minikube: exit status 10

@medyagh
Copy link
Member

medyagh commented Apr 25, 2021

@prezha needs a rebase

return errors.Wrap(err, "parse cidr")
}

oldNet := "10.88.0.0/16"
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure we dont need this ?
@afbjorklund

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the idea was to stop kubernetes and podman/crio from trying to use the same network.

Some conflict with the default 10.85.0.0/16 and 10.88.0.0/16 subnets ? #8570

Copy link
Member

Choose a reason for hiding this comment

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

@prezha shouldn’t we keep this ? To avoid the conflict ?

@medyagh
Copy link
Member

medyagh commented Apr 25, 2021

@afbjorklund what is your guidance on this PR ?

@prezha now that we merged the bump kindnet, could we expect the containerd test for this PR not to timeout ?

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2021
@prezha
Copy link
Collaborator Author

prezha commented Apr 25, 2021

@prezha now that we merged the bump kindnet, could we expect the containerd test for this PR not to timeout ?

i'm not sure if it will work without #11106 being merged first

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11185) |
+----------------+----------+---------------------+
| minikube start | 50.5s    | 50.8s               |
| enable ingress | 40.5s    | 40.9s               |
+----------------+----------+---------------------+

Times for minikube start: 54.5s 50.2s 49.3s 50.5s 48.1s
Times for minikube (PR 11185) start: 55.3s 48.2s 47.8s 55.0s 47.5s

Times for minikube (PR 11185) ingress: 42.3s 35.8s 44.3s 42.8s 39.3s
Times for minikube ingress: 42.8s 36.2s 42.8s 43.3s 37.2s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11185) |
+----------------+----------+---------------------+
| minikube start | 21.7s    | 21.2s               |
| enable ingress | 35.8s    | 37.3s               |
+----------------+----------+---------------------+

Times for minikube start: 23.2s 20.8s 21.8s 21.4s 21.1s
Times for minikube (PR 11185) start: 21.8s 21.1s 20.1s 21.2s 21.5s

Times for minikube ingress: 34.5s 40.0s 32.5s 37.6s 34.5s
Times for minikube (PR 11185) ingress: 33.0s 41.5s 37.5s 37.5s 37.0s

docker driver with containerd runtime
error collecting results for docker driver: timing run 0 with minikube: timing cmd: [out/minikube addons enable ingress]: waiting for minikube: exit status 10

@medyagh
Copy link
Member

medyagh commented Apr 25, 2021

@prezha now that we merged the bump kindnet, could we expect the containerd test for this PR not to timeout ?

i'm not sure if it will work without #11106 being merged first

How about pull all of them in that PR just to prove first it works, if it does we can merge the smaller PRs ?
Currently I yet have not seen one of them that doesn’t time out and I don’t wanna risk reverting them if proved that it didn’t make difference

@medyagh
Copy link
Member

medyagh commented Apr 26, 2021

@prezha @afbjorklund I confirm this PR fixes
the coredns NOT coming up

Before

$ kc get pods -A 
NAMESPACE     NAME                               READY   STATUS              RESTARTS   AGE
kube-system   coredns-74ff55c5b-2hchh            0/1     ContainerCreating   0          77s
kube-system   etcd-minikube                      1/1     Running             0          89s
kube-system   kindnet-rwvfz                      1/1     Running             0          77s
kube-system   kube-apiserver-minikube            1/1     Running             0          89s
kube-system   kube-controller-manager-minikube   1/1     Running             0          89s
kube-system   kube-proxy-8hphs                   1/1     Running             0          77s
kube-system   kube-scheduler-minikube            1/1     Running             0          89s
kube-system   storage-provisioner                1/1     Running             1          90s

#after

$ kc get pods -A
NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE
kube-system   coredns-74ff55c5b-cs6st            0/1     Running   0          36s
kube-system   etcd-minikube                      1/1     Running   0          47s
kube-system   kindnet-tz8qc                      1/1     Running   0          36s
kube-system   kube-apiserver-minikube            1/1     Running   0          47s
kube-system   kube-controller-manager-minikube   0/1     Running   0          47s
kube-system   kube-proxy-tnsqx                   1/1     Running   0          36s
kube-system   kube-scheduler-minikube            1/1     Running   0          47s
kube-system   storage-provisioner                1/1     Running   0          47s

// Note: currently, this change affects only Kindnet CNI (and all multinodes using it), but it can be easily expanded to other/all CNIs if needed.
// Note2: Cilium does not need workaround as they automatically restart pods after CNI is successfully deployed.
func configureCNI(cc *config.ClusterConfig, cnm Manager) error {
if _, kindnet := cnm.(KindNet); kindnet {
Copy link
Member

Choose a reason for hiding this comment

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

on the crio KVM test I see these failing https://storage.googleapis.com/minikube-builds/logs/11189/cc9afff/KVM_Linux_crio.html



214 | TestNetworkPlugins/group/auto/HairPin | 0.24
-- | -- | --
237 | TestNetworkPlugins/group/calico/DNS | 395.35
241 | TestNetworkPlugins/group/false/KubeletFlags | 0.24
252 | TestNetworkPlugins/group/flannel/DNS | 377.81


@ilya-zuyev do u midn taking a look ?

@medyagh medyagh self-requested a review April 29, 2021 20:36
@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 29, 2021
@medyagh medyagh self-requested a review April 29, 2021 21:56
@ilya-zuyev ilya-zuyev merged commit 9947c61 into kubernetes:master Apr 29, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ilya-zuyev, medyagh, prezha

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

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.

improve how cni and cruntimes work together
6 participants