« Back to projectatomic.io
Ask Your Question

Flanneld fails when VM starts

asked 2016-01-08 23:08:21 +0000

fcruz gravatar image


I am using image https://download.fedoraproject.org/pu...64/Images/Fedora-Cloud-Atomic-Vagrant-23-20151215.x8664.vagrant-virtualbox.box and am having issues with flanneld when VM starts.

After boot, If I ssh into VM and check service I get this:

 vagrant@atomic-3 docker.service.requires]$ sudo systemctl status flanneld
● flanneld.service - Flanneld overlay address etcd agent
   Loaded: loaded (/usr/lib/systemd/system/flanneld.service; enabled; vendor preset: disabled)
   Active: failed (Result: timeout) since Fri 2016-01-08 11:37:24 UTC; 10h ago
  Process: 781 ExecStart=/usr/bin/flanneld -etcd-endpoints=${FLANNEL_ETCD} -etcd-prefix=${FLANNEL_ETCD_KEY} $FLANNEL_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 781 (code=exited, status=0/SUCCESS)

Jan 08 11:35:54 atomic-3 systemd[1]: Starting Flanneld overlay address etcd agent...
Jan 08 11:35:55 atomic-3 flanneld[781]: I0108 11:35:55.503785     781 main.go:275] Installing signal handlers
Jan 08 11:35:55 atomic-3 flanneld[781]: I0108 11:35:55.682972     781 main.go:141] Determining IP address of default interface
Jan 08 11:35:55 atomic-3 flanneld[781]: E0108 11:35:55.683729     781 main.go:180] **Failed to get default interface: Unable to find default route**
Jan 08 11:37:24 atomic-3 systemd[1]: flanneld.service: Start operation timed out. Terminating.
Jan 08 11:37:24 atomic-3 flanneld[781]: I0108 11:37:24.341885     781 main.go:292] Exiting...
Jan 08 11:37:24 atomic-3 systemd[1]: Failed to start Flanneld overlay address etcd agent.
Jan 08 11:37:24 atomic-3 systemd[1]: flanneld.service: Unit entered failed state.
Jan 08 11:37:24 atomic-3 systemd[1]: flanneld.service: Failed with result 'timeout'.

It was like network was started after flanneld.service.

However, while in ssh if I run "sudo systemctl start flanneld", it works fine.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-02-29 12:28:11 +0000

surajd gravatar image

Make changes in the file /usr/lib/systemd/system/flanneld.service under [Unit] section. There you might find something like After=network.target change it to After=network-online.target and next time you restart the vagrant box, it would have started the flanneld service.

So the catch is setting After=network.target means that, this service will start after any type of network stack is enabled, while After=network-online.target means that it will wait till it gets routable IP address.

For more information read Running Services After the Network is up

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower


Asked: 2016-01-08 23:08:21 +0000

Seen: 475 times

Last updated: Feb 29 '16