Comment 3 for bug 1576333

This was actually attempted to get fixed in https://launchpad.net/ubuntu/+source/pollinate/4.18-0ubuntu1, see commit http://bazaar.launchpad.net/~pollinate/pollinate/trunk/revision/306 .

However, when we did this we were missing the "WantedBy=network.target" which will still attempt to start it early, and cause dependency loops when network-online.target gets activated. This can be seen in the recent nfs-utils test regression in https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-yakkety/yakkety/amd64/n/nfs-utils/20160518_225715@/log.gz:

May 18 22:55:25 adt systemd[1]: pollinate.service: Found ordering cycle on pollinate.service/start
May 18 22:55:25 adt systemd[1]: pollinate.service: Found dependency on network-online.target/start
May 18 22:55:25 adt systemd[1]: pollinate.service: Found dependency on network.target/start
May 18 22:55:25 adt systemd[1]: pollinate.service: Found dependency on pollinate.service/start
May 18 22:55:25 adt systemd[1]: pollinate.service: Breaking ordering cycle by deleting job network-online.target/start
May 18 22:55:25 adt systemd[1]: network-online.target: Job network-online.target/start deleted to break ordering cycle starting with pollinate.service/start

We missed that when verifying bug 1578833 as in a cloud image nothing actually pulls in network-online.target. But this is the case with NFS mounts in /etc/fstab.

This can be reproduced with installing pollinate and nfs-common, and adding this to fstab:

   echo "1.2.3.4:/foo /mnt nfs defaults,nofail 0 0" | sudo tee -a /etc/fstab