kata-containers / kata-containers

Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Apache License 2.0
5.49k stars 1.06k forks source link

runtime-rs: failed to use kubectl cp to copy a file from host to pod #4729

Closed studychao closed 2 years ago

studychao commented 2 years ago

This bug is found in the k8s-copy-file.bats CI test.

How to reproduce the error :

  1. create the pod: kubectl create -f pod.yaml
    
    pod.yaml

apiVersion: v1 kind: Pod metadata: name: pod-copy-file-from-host spec: terminationGracePeriodSeconds: 0 runtimeClassName: kata shareProcessNamespace: true containers:

  1. echo "helloworld" > /tmp/file.txt

  2. kubectl cp /tmp/file.txt pod-copy-file-from-host:/tmp

The step 3 failed and runtime-rs will be stuck.

studychao commented 2 years ago

We found out that the root cause is that we haven't supported CloseIO api.