| From ee65a69ff12ab28ef8a44f35c7952d55c6c52fe9 Mon Sep 17 00:00:00 2001 |
| From: varsha teratipally <teratipally@google.com> |
| Date: Sat, 5 Jun 2021 00:23:15 +0000 |
| Subject: [PATCH] Remove network and sshd dependencies |
| |
| 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. |
| --- |
| systemd/cloud-init-local.service.tmpl | 4 ---- |
| systemd/cloud-init.service.tmpl | 10 +++------- |
| 2 files changed, 3 insertions(+), 11 deletions(-) |
| |
| diff --git a/systemd/cloud-init-local.service.tmpl b/systemd/cloud-init-local.service.tmpl |
| index 7166f640..168f25d8 100644 |
| --- a/systemd/cloud-init-local.service.tmpl |
| +++ b/systemd/cloud-init-local.service.tmpl |
| @@ -4,11 +4,7 @@ Description=Initial cloud-init job (pre-networking) |
| {% if variant in ["ubuntu", "unknown", "debian"] %} |
| DefaultDependencies=no |
| {% endif %} |
| -Wants=network-pre.target |
| -After=hv_kvp_daemon.service |
| 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 f140344d..9aec6816 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 |
| Before=shutdown.target |
| @@ -32,7 +29,6 @@ Conflicts=shutdown.target |
| Before=shutdown.target |
| Conflicts=shutdown.target |
| {% endif %} |
| -Before=systemd-user-sessions.service |
| |
| [Service] |
| Type=oneshot |
| -- |
| 2.32.0.rc1.229.g3e70b5a671-goog |
| |
| |