fuweid / embedshim

Provide task runtime implementation with pidfd and eBPF sched_process_exit tracepoint to manage deamonless container with low overhead.
Apache License 2.0
116 stars 10 forks source link

When the command does not exist, `kubectl exec` hangs. #36

Open 113xiaoji opened 8 months ago

113xiaoji commented 8 months ago

Background

When bash is absent, containers managed by `embedshim experience a hang, as illustrated by the following command:

[root@master1 ~]#  kubectl -it exec  xxx-bqwbh -n manager -- bash
Defaulted container "xxx" out of: xxx, init-rights (init)

Under normal circumstances, the output is as follows:

[root@master1 ~]#  kubectl -it exec  xxx-h4vvp -n manager -- bash
Defaulted container "xxx" out of: xxx, permission-change (init),
error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "54071ac1a5e33002e26bd979bb5f94d8ba6072f0cf125966e721b0ddf2129889": OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown