embedshim icon indicating copy to clipboard operation
embedshim copied to clipboard

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

Open 113xiaoji opened this issue 1 year ago • 0 comments

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

113xiaoji avatar Jan 23 '24 09:01 113xiaoji