From bf4010a9c379e2109b030af558033014f9137f47 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 10 Nov 2016 10:49:17 -0500 Subject: systemd: drop both Wants and After local-fs.target Drop mention of local-fs.target from both cloud-init-local.service and cloud-init.service. This could actually could cause a loop in ordering due to cc_mounts writing mount points with: x-systemd.requires=cloud-init.service Rather, we specifically list /var/lib/ and systemd-remount-fs.service in cloud-init-local.service. cloud-init.service will run after cloud-init-local and thus will have these satisfied. --- systemd/cloud-init-local.service | 4 ++-- systemd/cloud-init.service | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/systemd/cloud-init-local.service b/systemd/cloud-init-local.service index 55834ba4..9b3e88fa 100644 --- a/systemd/cloud-init-local.service +++ b/systemd/cloud-init-local.service @@ -1,14 +1,14 @@ [Unit] Description=Initial cloud-init job (pre-networking) DefaultDependencies=no -Wants=local-fs.target Wants=network-pre.target -After=local-fs.target +After=systemd-remount-fs.service Before=basic.target Before=NetworkManager.service Before=network-pre.target Before=shutdown.target Conflicts=shutdown.target +RequiresMountsFor=/var/lib [Service] Type=oneshot diff --git a/systemd/cloud-init.service b/systemd/cloud-init.service index 85e447d2..cde6ed84 100644 --- a/systemd/cloud-init.service +++ b/systemd/cloud-init.service @@ -2,7 +2,6 @@ Description=Initial cloud-init job (metadata service crawler) DefaultDependencies=no Wants=cloud-init-local.service -Wants=local-fs.target Wants=sshd-keygen.service Wants=sshd.service After=cloud-init-local.service -- cgit v1.2.3