Adding 'After=local-fs.target' essentially pushes cloud-init to have that same dependency, which it does not have. We don't really want cloud-init to have to wait for local-fs.target.
For example see bug 1691489 (and related fallout bug 1717477).
If the only reason for local-fs.target was actually PrivateTmp, then there is a bug in systemd.
https://www.freedesktop.org/software/systemd/man/systemd.exec.html
| Implicit Dependencies
| Similar, units with PrivateTmp= enabled automatically get mount unit
| dependencies for all mounts required to access /tmp and /var/tmp. They
| will also gain an automatic After= dependency on systemd-tmpfiles-
| setup.service(8).
So there must have been a different read-only filesystem involved.
I dont think I really agree with this fix.
Adding 'After= local-fs. target' essentially pushes cloud-init to have that same dependency, which it does not have. We don't really want cloud-init to have to wait for local-fs.target.
For example see bug 1691489 (and related fallout bug 1717477).
If the only reason for local-fs.target was actually PrivateTmp, then there is a bug in systemd.
https:/ /www.freedeskto p.org/software/ systemd/ man/systemd. exec.html
| Implicit Dependencies
| Similar, units with PrivateTmp= enabled automatically get mount unit
| dependencies for all mounts required to access /tmp and /var/tmp. They
| will also gain an automatic After= dependency on systemd-tmpfiles-
| setup.service(8).
So there must have been a different read-only filesystem involved.