luxas / kubeadm-workshop

Showcasing a bare-metal multi-platform kubeadm setup with persistent storage and monitoring
MIT License
680 stars 190 forks source link

Weave does not work on Hypriot 1.4.0 #7

Closed rhuss closed 7 years ago

rhuss commented 7 years ago

When using the latest Hypriot base image (1.4.0) I can't get Weave running. As it seems, weaves uses the same UUID for calculating the virtual Mac address for all nodes:

k logs weave-net-x1z25 --namespace=kube-system weave
INFO: 2017/04/04 06:16:06.910766 Command line options: map[http-addr:127.0.0.1:6784 ipalloc-init:consensus=4 nickname:n3 status-addr:0.0.0.0:6782 docker-api: conn-limit:30 datapath:datapath ipalloc-range:10.32.0.0/12 no-dns:true port:6783]
INFO: 2017/04/04 06:16:06.911597 Communication between peers is unencrypted.
INFO: 2017/04/04 06:16:07.062159 Our name is 8e:0e:19:5d:4e:5e(n3)
INFO: 2017/04/04 06:16:07.062426 Launch detected - using supplied peer list: [192.168.23.200 192.168.23.201 192.168.23.202 192.168.23.203]
INFO: 2017/04/04 06:16:07.062669 Checking for pre-existing addresses on weave bridge
INFO: 2017/04/04 06:16:07.072861 [allocator 8e:0e:19:5d:4e:5e] No valid persisted data
INFO: 2017/04/04 06:16:07.158094 [allocator 8e:0e:19:5d:4e:5e] Initialising via deferred consensus
INFO: 2017/04/04 06:16:07.159120 Sniffing traffic on datapath (via ODP)
INFO: 2017/04/04 06:16:07.163257 ->[192.168.23.202:6783] attempting connection
INFO: 2017/04/04 06:16:07.163770 ->[192.168.23.201:6783] attempting connection
INFO: 2017/04/04 06:16:07.164761 ->[192.168.23.203:6783] attempting connection
INFO: 2017/04/04 06:16:07.165369 ->[192.168.23.200:6783] attempting connection
INFO: 2017/04/04 06:16:07.165999 ->[192.168.23.203:48229] connection accepted
INFO: 2017/04/04 06:16:07.173375 ->[192.168.23.203:6783|8e:0e:19:5d:4e:5e(n3)]: connection shutting down due to error: cannot connect to ourself
INFO: 2017/04/04 06:16:07.174156 ->[192.168.23.203:48229|8e:0e:19:5d:4e:5e(n3)]: connection shutting down due to error: cannot connect to ourself
INFO: 2017/04/04 06:16:07.185573 ->[192.168.23.202:6783|8e:0e:19:5d:4e:5e(n3)]: connection shutting down due to error: local "8e:0e:19:5d:4e:5e(n3)" and remote "8e:0e:19:5d:4e:5e(n2)" peer names collision
INFO: 2017/04/04 06:16:07.189360 Listening for HTTP control messages on 127.0.0.1:6784

This is related to https://github.com/kubernetes/kubeadm/issues/31.

Is there are workaround to force a different UUID ? Or, how does Weave obtain / calculate the UUID ?

rhuss commented 7 years ago

Don't know why, but all of my nodes have the same content of /etc/machine-id:

$ cat /etc/machine-id
9989a26f06984d6dbadc01770f018e3b

which causes Weave to calculate the same UUID for all nodes.

Digging further ...

luxas commented 7 years ago

Very strange... cc @DieterReuter

rhuss commented 7 years ago

yeah, funny. Its even the same after a reflash. Seems to be that 9989a26f06984d6dbadc01770f018e3b is a magic number :) (tbh I believe that systemd-machine-id-setup is the culprit which always creates the same number)

Just updated the machine-ids manually, lets see how it works.

luxas commented 7 years ago

Closing due to that this isn't specific to this workshop...