istio: [CNI] CNI binary for 1.19.6 crashes if `sh` is not on the host
Is this the right place to submit this?
- This is not a security vulnerability or a crashing bug
- This is not a question about how to use Istio
Bug Description
We’re running into an issue when we try to use Istio 1.19.6 on our EKS clusters. 1.19.5 works. We think it’s because of this patch https://github.com/istio/istio/pull/48422. We’re running on bottlerocket, which doesn’t include a shell - that change means that exec.Command("sh" ...) is called on both code paths, while previously it was only run for older versions of iptables. This blocks us from upgrading to 1.19.6 (and presumably 1.20.2 which includes that logic).
The error we get (kubelet logs):
Warning FailedCreatePodSandBox Pod/httpbin-1-94bf7fddd-5m4zh Failed to create pod sandbox: rpc error: code = Unknown
desc = failed to setup network for sandbox "809561b2f41924b90f7299a5b26c67189fa6c4527dcc7ab0cb7f59c5266a933b": plugin
type="istio-cni" name="istio-cni" failed (add): exec: "sh": executable file not found in $PATH
Not sure on the best fix if this is the issue. One (slightly hacky) option would be for the CNI binary to call itself to set up the mini-container environment, since that way we know the binary exists and can run.
Version
$ istioctl version --context sandbox20 (sandbox 20 is a testing cluster)
client version: 1.17.2
control plane version: 1.19.6
data plane version: 1.18.5 (6 proxies), 1.19.6 (2 proxies)
-> the mix of proxies is because 2 1.19.6 proxies were able to run since they run in excluded namespaces and don't reach the issue in the CNI logic.
Additional Information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 19 (15 by maintainers)
Commits related to this issue
- cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 — committed to howardjohn/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 — committed to howardjohn/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 — committed to howardjohn/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 — committed to howardjohn/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount (#48757) * cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 * wip * working * wip * Final... — committed to istio/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount (#48757) * cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 * wip * working * wip * Final... — committed to howardjohn/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount (#48757) * cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 * wip * working * wip * Final... — committed to howardjohn/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount (#48928) * iptables: avoid `nsenter`ing twice (#48423) We are already in the network namespace as this point, no need to enter again (see `plugin.... — committed to istio/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount (#48927) * iptables: avoid `nsenter`ing twice (#48423) We are already in the network namespace as this point, no need to enter again (see `plugin.... — committed to istio/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount (#48757) * cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 * wip * working * wip * Final... — committed to liwenhao0810/istio by howardjohn 3 years ago
- cni: allow running in environments without sh/mount (#48757) * cni: allow running in environments without sh/mount Fixes https://github.com/istio/istio/issues/48746 * wip * working * wip * Final... — committed to thedebugger/istio by howardjohn 3 years ago
For reference, this also occurs on
1.20.2. We’re running on BottleRocket nodes. Thanks for reporting this so quickly.New iteration pushed up to https://github.com/istio/istio/pull/48757. This seems to work on GKE and Bottlerocket (where I have tested so far). Basically if we cannot setup the mounts we just continue anyways