weaveworks / weave

Simple, resilient multi-host containers networking and more.
https://www.weave.works
Apache License 2.0
6.62k stars 670 forks source link

iptables: not found , aarch64 , CentOS 8, Raspberry Pi 4 #3865

Open kallisti5 opened 3 years ago

kallisti5 commented 3 years ago

What you expected to happen?

Weave to deploy on aarch64 k8s

What happened?

[root@chaos ~]# kubectl -n kube-system logs pod/weave-net-kwc4b weave /home/weave/launch.sh: line 77: iptables: not found

How to reproduce it?

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.IPTABLES_BACKEND=nft"

Anything else we need to know?

Bare metal, CentOS 8, CRI-O, Kubernetes 1.19.3, aarch64

Versions:

[root@chaos ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/arm64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:41:49Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/arm64"}

Logs:

[root@chaos ~]# kubectl get events -n kube-system
LAST SEEN   TYPE      REASON                   OBJECT                        MESSAGE
2s          Warning   FailedCreatePodSandBox   pod/coredns-f9fd979d6-h9jj6   (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get network status for pod sandbox k8s_coredns-f9fd979d6-h9jj6_kube-system_492ea53b-68ce-457b-96cc-c32d6b9388b2_0(7127791b6833028b20ef9b6197704d9aec5e40ad2bd829e645b13b3cea7ddfef): cache file path requires network name (""), container ID ("7127791b6833028b20ef9b6197704d9aec5e40ad2bd829e645b13b3cea7ddfef"), and interface name ("eth0")
5m3s        Warning   FailedCreatePodSandBox   pod/coredns-f9fd979d6-qshhm   (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get network status for pod sandbox k8s_coredns-f9fd979d6-qshhm_kube-system_b3408dd7-7171-4a30-bb02-0231db5e97de_0(ef2d3a96a77fa6e7c8d6549af9ad3c9fb8f3e1f00d7ba27472eb0a0fc9b190ef): cache file path requires network name (""), container ID ("ef2d3a96a77fa6e7c8d6549af9ad3c9fb8f3e1f00d7ba27472eb0a0fc9b190ef"), and interface name ("eth0")
12m         Normal    Scheduled                pod/weave-net-kwc4b           Successfully assigned kube-system/weave-net-kwc4b to chaos
12m         Normal    Pulling                  pod/weave-net-kwc4b           Pulling image "docker.io/weaveworks/weave-kube:2.7.0"
12m         Normal    Pulled                   pod/weave-net-kwc4b           Successfully pulled image "docker.io/weaveworks/weave-kube:2.7.0" in 18.918816732s
11m         Normal    Created                  pod/weave-net-kwc4b           Created container weave
11m         Normal    Started                  pod/weave-net-kwc4b           Started container weave
12m         Normal    Pulling                  pod/weave-net-kwc4b           Pulling image "docker.io/weaveworks/weave-npc:2.7.0"
12m         Normal    Pulled                   pod/weave-net-kwc4b           Successfully pulled image "docker.io/weaveworks/weave-npc:2.7.0" in 7.490060721s
12m         Normal    Created                  pod/weave-net-kwc4b           Created container weave-npc
12m         Normal    Started                  pod/weave-net-kwc4b           Started container weave-npc
11m         Normal    Pulled                   pod/weave-net-kwc4b           Container image "docker.io/weaveworks/weave-kube:2.7.0" already present on machine
2m34s       Warning   BackOff                  pod/weave-net-kwc4b           Back-off restarting failed container
12m         Normal    SuccessfulCreate         daemonset/weave-net           Created pod: weave-net-kwc4b
root@chaos ~]# iptables -v
iptables v1.8.4 (nf_tables): no command specified
Try `iptables -h' or 'iptables --help' for more information.
craigsloggett commented 3 years ago

I'm seeing this same issue.

System

Bare metal, Debian 10.8, containerd, Kubernetes 1.20.4, aarch64 (Raspberry Pi 4)

# kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.12", GitCommit:"7cd5e9086de8ae25d6a1514d0c87bac67ca4a481", GitTreeState:"clean", BuildDate:"2020-11-12T09:18:55Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:03:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/arm64"}
DEBU: 2021/03/22 20:57:26.913816 [kube-peers] Checking peer "7a:fc:3f:21:8e:25" against list &{[{7a:fc:3f:21:8e:25 k8s-node-1}]}
INFO: 2021/03/22 20:57:27.237476 Command line options: map[conn-limit:200 datapath:datapath db-prefix:/weavedb/weave-net docker-api: expect-npc:true http-addr:127.0.0.1:6784 ipalloc-init:consensus=2 ipalloc-range:10.32.0.0/12 metrics-addr:0.0.0.0:6782 name:7a:fc:3f:21:8e:25 nickname:k8s-node-1 no-dns:true no-masq-local:true port:6783]
INFO: 2021/03/22 20:57:27.237617 weave  2.8.1
FATA: 2021/03/22 20:57:27.409335 creating iptables object while resetting: exec: "iptables": executable file not found in $PATH
root@k8s-node-1:~# iptables --version
iptables v1.8.2 (nf_tables)