Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Weavenet pod crashes with minikube #3318

Closed
pgandhipfpt opened this issue Jun 11, 2018 · 5 comments
Closed

Weavenet pod crashes with minikube #3318

pgandhipfpt opened this issue Jun 11, 2018 · 5 comments

Comments

@pgandhipfpt
Copy link

.
** Is this a FEATURE REQUEST? **
yes as its easy to create kubernetes cluster with minikube , so would be really helpful if we can set n/w policies on that cluster with weavenet

What you expected to happen?

Weavnet pod comes up correctly on minikube after performing
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')" on kubenetes cluster

What happened?

weavenet pod doesnot run . Its always in CrashLoopBackOff state

kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system etcd-minikube 1/1 Running 0 21m
kube-system kube-addon-manager-minikube 1/1 Running 0 21m
kube-system kube-apiserver-minikube 1/1 Running 0 21m
kube-system kube-controller-manager-minikube 1/1 Running 0 21m
kube-system kube-dns-86f4d74b45-md2m6 3/3 Running 0 22m
kube-system kube-proxy-9h8t5 1/1 Running 0 22m
kube-system kube-scheduler-minikube 1/1 Running 0 21m
kube-system kubernetes-dashboard-5498ccf677-kgflm 1/1 Running 0 22m
kube-system storage-provisioner 1/1 Running 0 22m
kube-system weave-net-nm7f2 1/2 CrashLoopBackOff 8 16m

How to reproduce it?

a. I tried on macOS Sierra.
b. checked out latest changes from https://github.com/kubernetes/minikube.git so that it has latest code from kubernetes/minikube#2876
b. built the source code and got minikube.iso
c. ./out/minikube start
d.kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

output:
serviceaccount "weave-net" created
clusterrole.rbac.authorization.k8s.io "weave-net" created
clusterrolebinding.rbac.authorization.k8s.io "weave-net" created
role.rbac.authorization.k8s.io "weave-net" created
rolebinding.rbac.authorization.k8s.io "weave-net" created
daemonset.extensions "weave-net" created

e.kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system etcd-minikube 1/1 Running 0 21m
kube-system kube-addon-manager-minikube 1/1 Running 0 21m
kube-system kube-apiserver-minikube 1/1 Running 0 21m
kube-system kube-controller-manager-minikube 1/1 Running 0 21m
kube-system kube-dns-86f4d74b45-md2m6 3/3 Running 0 22m
kube-system kube-proxy-9h8t5 1/1 Running 0 22m
kube-system kube-scheduler-minikube 1/1 Running 0 21m
kube-system kubernetes-dashboard-5498ccf677-kgflm 1/1 Running 0 22m
kube-system storage-provisioner 1/1 Running 0 22m
kube-system weave-net-nm7f2 1/2 CrashLoopBackOff 8 16m

To verify that I have this fix, I tried this

grep CONFIG_DUMMY ./deploy/iso/minikube-iso/board/coreos/minikube/linux-4.9_defconfig
CONFIG_DUMMY=m
grep CONFIG_OPENVSWITCH ./deploy/iso/minikube-iso/board/coreos/minikube/linux-4.9_defconfig
CONFIG_OPENVSWITCH=m

Anything else we need to know?

kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.4", GitCommit:"5ca598b4ba5abb89bb773071ce452e33fb66339d", GitTreeState:"clean", BuildDate:"2018-06-06T15:23:04Z", GoVersion:"go1.9.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

weave version
weave script 2.3.0
weave 2.3.0

docker version
Client:
Version: 18.05.0-ce
API version: 1.37
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:12:05 2018
OS/Arch: darwin/amd64
Experimental: true
Orchestrator: swarm

Server:
Engine:
Version: 18.05.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.10.1
Git commit: f150324
Built: Wed May 9 22:20:16 2018
OS/Arch: linux/amd64
Experimental: true

Logs:

$ kubectl logs -n kube-system weave

kubectl logs -n kube-system weave-net-xgpzx weave
DEBU: 2018/06/11 18:21:02.462674 [kube-peers] Checking peer "a2:ae:e8:48:64:3b" against list &{[]}
Peer not in list; removing persisted data
INFO: 2018/06/11 18:21:02.507730 Command line options: map[datapath:datapath expect-npc:true no-dns:true conn-limit:100 docker-api: host-root:/host http-addr:127.0.0.1:6784 metrics-addr:0.0.0.0:6782 port:6783 name:a2:ae:e8:48:64:3b db-prefix:/weavedb/weave-net ipalloc-init:consensus=1 ipalloc-range:10.32.0.0/12 nickname:minikube]
INFO: 2018/06/11 18:21:02.507992 weave 2.3.0
FATA: 2018/06/11 18:21:02.508218 Existing bridge type "bridge" is different than requested "bridged_fastdp". Please do 'weave reset' and try again

weave reset
Weave is not running.

I am very new to k8s . Please let me know If I missed anything

@brb
Copy link
Contributor

brb commented Jun 12, 2018

Thanks for the issue.

Could you run weave reset --force and retry?

Also, to make sure that you have required modules, what do zgrep -i config_openvswitch /proc/config.gz and zgrep -i config_dummy /proc/config.gz return?

@pgandhipfpt
Copy link
Author

zgrep -i config_openvswitch /proc/config.gz
zgrep: /proc/config.gz: No such file or directory

zgrep -i config_dummy /proc/config.gz
zgrep: /proc/config.gz: No such file or directory

As I am using mac Sierra .. I am not sure if this file would be there or not .

@brb
Copy link
Contributor

brb commented Jun 13, 2018

@pgandhipfpt

You need first to ssh to your minikube VM by minikube ssh, and then to run the zgreps.

@pgandhipfpt
Copy link
Author

This is before installing weavenet on minikube cluster

$ zgrep -i config_openvswitch /proc/config.gz

CONFIG_OPENVSWITCH is not set

$ zgrep -i config_dummy /proc/config.gz

CONFIG_DUMMY_IRQ is not set

CONFIG_DUMMY is not set

CONFIG_DUMMY_CONSOLE=y
CONFIG_DUMMY_CONSOLE_COLUMNS=80
CONFIG_DUMMY_CONSOLE_ROWS=25

@brb
Copy link
Contributor

brb commented Jun 16, 2018

@pgandhipfpt This shows that you are using minikube VM w/o kubernetes/minikube#2876 being applied. Please see #3124 (comment) for running Weave Net on minikube.

@brb brb closed this as completed Jun 16, 2018
@brb brb added this to the n/a milestone Jun 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants