blob: 12bcec11713bd6b0331671f846b0fea43adfaaf8 [file] [log] [blame]
From:Varsh teratipally
Subject: Removed network-pre.target and network-online.target as it was blocking
the services that depend on network-online.target to start.
Removed sshd server dependencies, if cloud-init fails, it will enable us to ssh
and debug the issue.
diff --git a/systemd/cloud-init-local.service.tmpl b/systemd/cloud-init-local.service.tmpl
index ff9c644d..168f25d8 100644
--- a/systemd/cloud-init-local.service.tmpl
+++ b/systemd/cloud-init-local.service.tmpl
@@ -4,10 +4,7 @@ Description=Initial cloud-init job (pre-networking)
{% if variant in ["ubuntu", "unknown", "debian"] %}
DefaultDependencies=no
{% endif %}
-Wants=network-pre.target
After=systemd-remount-fs.service
-Before=NetworkManager.service
-Before=network-pre.target
Before=shutdown.target
{% if variant in ["ubuntu", "unknown", "debian"] %}
Before=sysinit.target
diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl
index 9ad3574c..3552c74e 100644
--- a/systemd/cloud-init.service.tmpl
+++ b/systemd/cloud-init.service.tmpl
@@ -2,11 +2,10 @@
[Unit]
Description=Initial cloud-init job (metadata service crawler)
DefaultDependencies=no
+Requires=network-online.target
+Wants=network-online.target
Wants=cloud-init-local.service
-Wants=sshd-keygen.service
-Wants=sshd.service
After=cloud-init-local.service
-After=systemd-networkd-wait-online.service
{% if variant in ["ubuntu", "unknown", "debian"] %}
After=networking.service
{% endif %}
@@ -20,9 +19,7 @@ After=wicked.service
# would not be guaranteed at this point.
After=dbus.service
{% endif %}
-Before=network-online.target
-Before=sshd-keygen.service
-Before=sshd.service
+After=network-online.target
{% if variant in ["ubuntu", "unknown", "debian"] %}
Before=sysinit.target
Conflicts=shutdown.target
@@ -30,7 +27,6 @@ Conflicts=shutdown.target
{% if variant in ["suse"] %}
Conflicts=shutdown.target
{% endif %}
-Before=systemd-user-sessions.service
[Service]
Type=oneshot