pollinate runs too early on some of the instances i launch. Basically nothing guarantees that it will have network access when it attempts to run.
failure looks something like:
$ lxc launch xenial x1
$ sleep 4
$ lxc exec x1 systemctl status pollinate
● pollinate.service - Seed the pseudo random number generator on first boot
Loaded: loaded (/lib/systemd/system/pollinate.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2016-04-28 17:16:03 UTC; 1min 17s ago
Process: 86 ExecStart=/usr/bin/pollinate (code=exited, status=0/SUCCESS)
Main PID: 86 (code=exited, status=0/SUCCESS)
Apr 28 17:16:03 ubuntu systemd[1]: Starting Seed the pseudo random number generator on first boot...
Apr 28 17:16:03 ubuntu pollinate[106]: client sent challenge to [https://entropy.ubuntu.com/]
Apr 28 17:16:03 ubuntu pollinate[86]: <13>Apr 28 17:16:03 pollinate[86]: client sent challenge to [https://entropy.ubuntu.com/]
Apr 28 17:16:03 ubuntu pollinate[149]: [432B blob data]
Apr 28 17:16:03 ubuntu pollinate[86]: Apr 28 17:16:03 ubuntu <13>Apr 28 17:16:03 pollinate[86]: WARNING: Network communication failed [0]\n % Total % Received % Xferd Average Speed Time Time Time Current
Apr 28 17:16:03 ubuntu pollinate[86]: Dload Upload Total Spent Left Speed
Apr 28 17:16:03 ubuntu pollinate[86]: [139B blob data]
Apr 28 17:16:03 ubuntu pollinate[86]: 17:16:03.859980 * Closing connection 0
Apr 28 17:16:03 ubuntu pollinate[86]: curl: (6) Could not resolve host: entropy.ubuntu.com
Apr 28 17:16:03 ubuntu systemd[1]: Started Seed the pseudo random number generator on first boot.
This seems like it might work:
# diff -u /lib/systemd/system/pollinate.service.dist /lib/systemd/system/pollinate.service
--- /lib/systemd/system/pollinate.service.dist 2016-04-28 17:19:10.807971336 +0000
+++ /lib/systemd/system/pollinate.service 2016-04-28 17:19:17.839874541 +0000
@@ -2,6 +2,7 @@
Description=Seed the pseudo random number generator on first boot
DefaultDependencies=no
After=sysinit.target
+After=network.target
Before=ssh.service
pollinate runs too early on some of the instances i launch. Basically nothing guarantees that it will have network access when it attempts to run.
failure looks something like: system/ pollinate. service; enabled; vendor preset: enabled) /usr/bin/ pollinate (code=exited, status=0/SUCCESS)
$ lxc launch xenial x1
$ sleep 4
$ lxc exec x1 systemctl status pollinate
● pollinate.service - Seed the pseudo random number generator on first boot
Loaded: loaded (/lib/systemd/
Active: inactive (dead) since Thu 2016-04-28 17:16:03 UTC; 1min 17s ago
Process: 86 ExecStart=
Main PID: 86 (code=exited, status=0/SUCCESS)
Apr 28 17:16:03 ubuntu systemd[1]: Starting Seed the pseudo random number generator on first boot... /entropy. ubuntu. com/] /entropy. ubuntu. com/]
Apr 28 17:16:03 ubuntu pollinate[106]: client sent challenge to [https:/
Apr 28 17:16:03 ubuntu pollinate[86]: <13>Apr 28 17:16:03 pollinate[86]: client sent challenge to [https:/
Apr 28 17:16:03 ubuntu pollinate[149]: [432B blob data]
Apr 28 17:16:03 ubuntu pollinate[86]: Apr 28 17:16:03 ubuntu <13>Apr 28 17:16:03 pollinate[86]: WARNING: Network communication failed [0]\n % Total % Received % Xferd Average Speed Time Time Time Current
Apr 28 17:16:03 ubuntu pollinate[86]: Dload Upload Total Spent Left Speed
Apr 28 17:16:03 ubuntu pollinate[86]: [139B blob data]
Apr 28 17:16:03 ubuntu pollinate[86]: 17:16:03.859980 * Closing connection 0
Apr 28 17:16:03 ubuntu pollinate[86]: curl: (6) Could not resolve host: entropy.ubuntu.com
Apr 28 17:16:03 ubuntu systemd[1]: Started Seed the pseudo random number generator on first boot.
This seems like it might work: system/ pollinate. service. dist /lib/systemd/ system/ pollinate. service system/ pollinate. service. dist 2016-04-28 17:19:10.807971336 +0000 system/ pollinate. service 2016-04-28 17:19:17.839874541 +0000 ncies=no sysinit. target network. target
# diff -u /lib/systemd/
--- /lib/systemd/
+++ /lib/systemd/
@@ -2,6 +2,7 @@
Description=Seed the pseudo random number generator on first boot
DefaultDepende
After=
+After=
Before=ssh.service
[Service]
ProblemType: Bug ature: Ubuntu 4.4.0-18.34-generic 4.4.6 ture: all 256color
DistroRelease: Ubuntu 16.04
Package: pollinate 4.15-0ubuntu1 [modified: usr/bin/pollinate]
ProcVersionSign
Uname: Linux 4.4.0-18-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Thu Apr 28 16:39:17 2016
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
SourcePackage: pollinate
UpgradeStatus: No upgrade log present (probably fresh install)