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

Cannot deploy the operator through minikube: rpc error: code = DeadlineExceeded desc = timed out connecting to vsock #124

Open
gxcuit opened this issue Nov 8, 2022 · 8 comments

Comments

@gxcuit
Copy link

gxcuit commented Nov 8, 2022

Describe the bug
Hi, recently I was trying the coco quick start guide. I noticed that it said we can use Minikube cluster to try the CoCo.

I start the minikube with containerd runtime and docker vm-driver through the following command:

minikube start --vm-driver=docker --container-runtime=containerd --image-mirror-country='cn' --force

Everything looks fine before I deploy the Nginx example: I successfully deployed the operator, the custom resources(https://github.com/confidential-containers/documentation/blob/v0.1.0/quickstart.md#create-the-custom-resource)

And I got the corresponding runtime class:


NAME            HANDLER         AGE
kata            kata            9m55s
kata-clh        kata-clh        9m55s
kata-clh-tdx    kata-clh-tdx    9m55s
kata-qemu       kata-qemu       9m55s
kata-qemu-tdx   kata-qemu-tdx   9m55s
kata-qemu-sev   kata-qemu-sev   9m55s

However, when I deployed the bitnami/nginx image, I got the following error:

Type     Reason                  Age                     From     Message
  ----     ------                  ----                    ----     -------
  Warning  FailedCreatePodSandBox  2m29s (x2641 over 32h)  kubelet  (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim task: Failed to Check if grpc server is working: rpc error: code = DeadlineExceeded desc = timed out connecting to vsock 2711030719:1024: unknown

Does anyone know the reason?

System info:

Frdora with 5.17.5-300.fc36.x86_64 (Also tried Ubuntu with the same error)

minikube version: v1.28.0

[root@fedora ~]# minikube profile list
|----------|-----------|------------|--------------|------|---------|---------|-------|--------|
| Profile  | VM Driver |  Runtime   |      IP      | Port | Version | Status  | Nodes | Active |
|----------|-----------|------------|--------------|------|---------|---------|-------|--------|
| minikube | docker    | containerd | 192.168.49.2 | 8443 | v1.25.3 | Running |     1 | *      |
|----------|-----------|------------|--------------|------|---------|---------|-------|--------|
@fidencio
Copy link
Member

fidencio commented Nov 9, 2022

While I'm testing this right now, I'd like to check whether you can see any difference on using a different driver, such as kvm2 for the minikube.

@fidencio
Copy link
Member

I was finally able to get minikube up and running with the docker driver and I did, indeed, hit the issue with the kata-qemu runtime class.

Events:
  Type     Reason                  Age   From               Message
  ----     ------                  ----  ----               -------
  Normal   Scheduled               42s   default-scheduler  Successfully assigned default/nginx-kata-qemu to minikube
  Warning  FailedCreatePodSandBox  9s    kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim task: Failed to Check if grpc server is working: rpc error: code = DeadlineExceeded desc = timed out connecting to vsock 3189232285:1024: unknown

It's worth mentioning that using the kata-clh one things work as expected.

Let me debug what's happening with QEMU here.

@bpradipt
Copy link
Member

Describe the bug Hi, recently I was trying the coco quick start guide. I noticed that it said we can use Minikube cluster to try the CoCo.

I start the minikube with containerd runtime and docker vm-driver through the following command:

minikube start --vm-driver=docker --container-runtime=containerd --image-mirror-country='cn' --force

Everything looks fine before I deploy the Nginx example: I successfully deployed the operator, the custom resources(https://github.com/confidential-containers/documentation/blob/v0.1.0/quickstart.md#create-the-custom-resource)

And I got the corresponding runtime class:


NAME            HANDLER         AGE
kata            kata            9m55s
kata-clh        kata-clh        9m55s
kata-clh-tdx    kata-clh-tdx    9m55s
kata-qemu       kata-qemu       9m55s
kata-qemu-tdx   kata-qemu-tdx   9m55s
kata-qemu-sev   kata-qemu-sev   9m55s

However, when I deployed the bitnami/nginx image, I got the following error:

Type     Reason                  Age                     From     Message
  ----     ------                  ----                    ----     -------
  Warning  FailedCreatePodSandBox  2m29s (x2641 over 32h)  kubelet  (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim task: Failed to Check if grpc server is working: rpc error: code = DeadlineExceeded desc = timed out connecting to vsock 2711030719:1024: unknown

Does anyone know the reason?

System info:

Frdora with 5.17.5-300.fc36.x86_64 (Also tried Ubuntu with the same error)

minikube version: v1.28.0

[root@fedora ~]# minikube profile list
|----------|-----------|------------|--------------|------|---------|---------|-------|--------|
| Profile  | VM Driver |  Runtime   |      IP      | Port | Version | Status  | Nodes | Active |
|----------|-----------|------------|--------------|------|---------|---------|-------|--------|
| minikube | docker    | containerd | 192.168.49.2 | 8443 | v1.25.3 | Running |     1 | *      |
|----------|-----------|------------|--------------|------|---------|---------|-------|--------|

Which runtimeClass are you using ?
Note that Qemu doesn't work with Kind or Minikube. As @fidencio mentioned clh works.

@fidencio
Copy link
Member

I'd add this as a known issue that we should dig deeper in the future, but not a blocker for the v0.2.0.
We should document somewhere that minikube will not work with QEMU runtime classes.

fidencio added a commit to fidencio/coco-documentation that referenced this issue Nov 10, 2022
It's a known limitation that QEMU based runtime classes will not work
with Kind or Minikube, leading to:
```
Events:
  Type     Reason                  Age   From               Message
  ----     ------                  ----  ----               -------
  Normal   Scheduled               42s   default-scheduler  Successfully assigned default/nginx-kata-qemu to minikube
  Warning  FailedCreatePodSandBox  9s    kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim task: Failed to Check if grpc server is working: rpc error: code = DeadlineExceeded desc = timed out connecting to vsock 3189232285:1024: unknown
```

This needs further debug in order to get to the root cause of the issue,
and potentially to a fix.  However, for now, we should make sure that we
document such limitation.

One issue already reported about this is
confidential-containers/operator#124, and
that's also been observed by Pradipta during the early tests of v0.1.0.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
fidencio added a commit to confidential-containers/documentation that referenced this issue Nov 10, 2022
It's a known limitation that QEMU based runtime classes will not work
with Kind or Minikube, leading to:
```
Events:
  Type     Reason                  Age   From               Message
  ----     ------                  ----  ----               -------
  Normal   Scheduled               42s   default-scheduler  Successfully assigned default/nginx-kata-qemu to minikube
  Warning  FailedCreatePodSandBox  9s    kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim task: Failed to Check if grpc server is working: rpc error: code = DeadlineExceeded desc = timed out connecting to vsock 3189232285:1024: unknown
```

This needs further debug in order to get to the root cause of the issue,
and potentially to a fix.  However, for now, we should make sure that we
document such limitation.

One issue already reported about this is
confidential-containers/operator#124, and
that's also been observed by Pradipta during the early tests of v0.1.0.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
@bpradipt
Copy link
Member

@gxcuit can you please confirm if your issue was specific to using qemu runtime class with minikube ?

@gxcuit
Copy link
Author

gxcuit commented Nov 18, 2022

@gxcuit can you please confirm if your issue was specific to using qemu runtime class with minikube ?

@bpradipt Hi
This issue is specific to using kata runtime class with minikube. If I switch to kata-clh as suggested by @fidencio, it works.

minikube start --driver=docker --container-runtime=containerd

Do I need to install the ccv0-containerd? I install the original docker on my computer.

@bpradipt
Copy link
Member

@gxcuit unfortunately kata runtime class (which defaults to using qemu) doesn't work with minikube and kind.
Basically Kata qemu VM creation inside the container running Kubernetes fails and this needs to be investigated.

I have created an issue in kata-containers/kata-containers#5692
We can use the above issue to continue debugging and taking help from qemu experts.

@gxcuit @fidencio wdyt ?

@gxcuit
Copy link
Author

gxcuit commented Nov 18, 2022

wdyt

@bpradipt When I follow this guide installing kata with minikube, everything works fine(with kvm2 driver). But when I use that same command(minikube start --vm-driver kvm2 --container-runtime containerd) to install ccv0-kata, it failed. Later I will try again and upload the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants