Conversation
Add dependencies to the flanneld service configuration for systemd, so that systemd will make sure the network is up and etcd is running before it goes to start flannel.
Fedora 20's about to hit EOL, and later versions of the fedora images don't appear to include iputils. Switch to using rhel-tools instead, since it's already the big bag of troubleshooting tools.
In the captured output of the 'ip a' command, include leading whitespace in the sample output to more closely match the expected output.
As of etcd 2.0.11, etcd requires ETCD_ADVERTISE_CLIENT_URLS to be set if ETCD_LISTEN_CLIENT_URLS is set, and will fail to start with an error if it is not set.
| # systemctl enable flanneld.service | ||
| # mkdir /etc/systemd/system/flanneld.service.wants | ||
| # ln -s /usr/lib/systemd/system/etcd.service /etc/systemd/system/flanneld.service.wants/ | ||
| # ln -s /usr/lib/systemd/system/NetworkManager-wait-online.service /etc/systemd/system/flanneld.service.wants/ |
There was a problem hiding this comment.
This absolutely should not be necessary... flannel waits until it can find an ip/default route... What problem did you have?
There was a problem hiding this comment.
I think you may be right, that the startup problems I was seeing could have been caused by not being up yet. This is what happened when etcd was being started later:
Jun 23 14:06:55 nalin-atomic-1.os1.phx2.redhat.com flanneld[697]: E0623 14:06:36.579070 00697 main.go:151] Failed to create SubnetManager: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
Jun 23 14:06:55 nalin-atomic-1.os1.phx2.redhat.com flanneld[697]: E0623 14:06:37.581440 00697 main.go:151] Failed to create SubnetManager: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
Jun 23 14:06:55 nalin-atomic-1.os1.phx2.redhat.com flanneld[697]: E0623 14:06:38.582929 00697 main.go:151] Failed to create SubnetManager: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
Jun 23 14:06:55 nalin-atomic-1.os1.phx2.redhat.com flanneld[697]: I0623 14:06:41.377479 00697 main.go:247] Installing signal handlers
Jun 23 14:06:55 nalin-atomic-1.os1.phx2.redhat.com flanneld[697]: I0623 14:06:41.377529 00697 main.go:118] Determining IP address of default interface
Jun 23 14:06:55 nalin-atomic-1.os1.phx2.redhat.com flanneld[697]: E0623 14:06:41.378311 00697 main.go:190] Failed to get default interface: Unable to find default route
Jun 23 14:06:55 nalin-atomic-1.os1.phx2.redhat.com flanneld[697]: I0623 14:06:41.378335 00697 main.go:264] VXLAN mode exited
They're still being started in the right order on my system, even after removing the .wants symlink, so I'm not seeing this problem any more.
There was a problem hiding this comment.
rhel-toolsinstead of soon-to-be-EOLfedora:20.ETCD_ADVERTISE_CLIENT_URLS.systemdwill always startetcdbeforeflannelon the master node.ip a l eth0output to better match the formatting of a live run.