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

Wait for crictl version after the socket is up #10705

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

afbjorklund
Copy link
Collaborator

As there are no guarantees that the CRI socket actually works,
just because it has been made available by the container runtime.

Closes #10355


Now looks something like this:

I0303 21:08:28.291806 3918982 ssh_runner.go:149] Run: sudo systemctl restart containerd
I0303 21:08:28.372919 3918982 start.go:322] Will wait 60s for socket path /run/containerd/containerd.sock
I0303 21:08:28.372999 3918982 ssh_runner.go:149] Run: stat /run/containerd/containerd.sock
I0303 21:08:28.376748 3918982 start.go:347] Will wait 60s for crictl info
I0303 21:08:28.376806 3918982 ssh_runner.go:149] Run: sudo crictl version
I0303 21:08:28.401981 3918982 retry.go:31] will retry after 11.04660288s: Temporary Error: sudo crictl version: Process exited with status 1
stdout:

stderr:
time="2021-03-03T20:08:28Z" level=fatal msg="getting the runtime version failed: rpc error: code = Unknown desc = server is not initialized yet"
I0303 21:08:39.448960 3918982 ssh_runner.go:149] Run: sudo crictl version
I0303 21:08:39.495437 3918982 start.go:356] Version:  0.1.0
RuntimeName:  containerd
RuntimeVersion:  1.4.3
RuntimeApiVersion:  v1alpha2
I0303 21:08:39.495593 3918982 ssh_runner.go:149] Run: containerd --version
I0303 21:08:39.546331 3918982 out.go:119] 📦  Preparing Kubernetes v1.20.2 on containerd 1.4.3 ...

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 3, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 3, 2021
As there are no guarantees that the CRI socket actually _works_,
just because it has been made available by the container runtime.
@medyagh
Copy link
Member

medyagh commented Mar 3, 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 Mar 3, 2021
@kubernetes kubernetes deleted a comment from minikube-pr-bot Mar 3, 2021
@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: 71.3s 68.3s 68.9s
Average time for minikube: 69.5s

Times for Minikube (PR 10705): 71.4s 68.0s 71.4s
Average time for Minikube (PR 10705): 70.3s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10705) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.0 on Debian               | 0.0s     | 0.0s                |
| 9.11 (kvm/amd64)                           |          |                     |
| * Using the kvm2 driver based              | 0.0s     | 0.0s                |
| on user configuration                      |          |                     |
| * Starting control plane node              | 0.0s     | 0.0s                |
| minikube in cluster minikube               |          |                     |
| * Creating kvm2 VM (CPUs=2,                | 43.1s    | 43.7s               |
| Memory=3700MB, Disk=20000MB)               |          |                     |
| ...                                        |          |                     |
| * Preparing Kubernetes v1.20.2             | 16.5s    | 2.3s                |
| on Docker 20.10.3 ...                      |          |                     |
|   - Generating certificates                | 1.4s     | 4.2s                |
| and keys ...                               |          |                     |
|   - Booting up control plane               | 5.4s     | 16.1s               |
| ...                                        |          |                     |
|   - Configuring RBAC rules ...             | 0.9s     | 1.5s                |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 1.6s     | 1.6s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.4s     | 1.0s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

docker Driver
Times for minikube: 27.1s 27.4s 26.8s
Average time for minikube: 27.1s

Times for Minikube (PR 10705): 27.0s 27.4s 26.9s
Average time for Minikube (PR 10705): 27.1s

Averages Time Per Log

+--------------------------------------------+----------+---------------------+
|                    LOG                     | MINIKUBE | MINIKUBE (PR 10705) |
+--------------------------------------------+----------+---------------------+
| * minikube v1.18.0 on Debian               | 0.2s     | 0.2s                |
| 9.11 (kvm/amd64)                           |          |                     |
| * Using the docker driver                  | 0.1s     | 0.1s                |
| based on user configuration                |          |                     |
| * Starting control plane node              | 0.1s     | 0.1s                |
| minikube in cluster minikube               |          |                     |
| * Creating docker container                | 9.8s     | 9.8s                |
| (CPUs=2, Memory=3700MB) ...                |          |                     |
| * Preparing Kubernetes v1.20.2             | 15.9s    | 15.7s               |
| on Docker 20.10.3 ...                      |          |                     |
| * Verifying Kubernetes                     | 0.1s     | 0.1s                |
| components...                              |          |                     |
|   - Using image                            | 0.9s     | 1.1s                |
| gcr.io/k8s-minikube/storage-provisioner:v4 |          |                     |
| * Enabled addons:                          | 0.1s     | 0.1s                |
| storage-provisioner,                       |          |                     |
| default-storageclass                       |          |                     |
| * Done! kubectl is now                     | 0.0s     | 0.0s                |
| configured to use "minikube"               |          |                     |
| cluster and "default"                      |          |                     |
| namespace by default                       |          |                     |
+--------------------------------------------+----------+---------------------+

@medyagh
Copy link
Member

medyagh commented Mar 3, 2021

/retest-this-please

@medyagh
Copy link
Member

medyagh commented Mar 4, 2021

the tests don't look very good on docker but looks better on Containerd

@afbjorklund
Copy link
Collaborator Author

the tests don't look very good on docker but looks better on Containerd

I could only see Mac errors, not sure if there was anything related ?

The code doesn't actually do anything, unless running CRI

       if socket == "" || socket == "/var/run/dockershim.sock" {
               return nil
       }

@medyagh
Copy link
Member

medyagh commented Mar 4, 2021

/retest-this-please

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund, medyagh

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:
  • OWNERS [afbjorklund,medyagh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@medyagh medyagh merged commit ba9ca6e into kubernetes:master Mar 4, 2021
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
4 participants