diff options
author | zsdc <taras@vyos.io> | 2020-03-11 21:20:58 +0200 |
---|---|---|
committer | zsdc <taras@vyos.io> | 2020-03-11 21:22:23 +0200 |
commit | c6627bc05a57645e6af8b9a5a67e452d9f37e487 (patch) | |
tree | b754b3991e5e57a9ae9155819f73fa0cbd4be269 /systemd | |
parent | ca9a4eb26b41c204d1bd3a15586b14a5dde950bb (diff) | |
parent | 13e82554728b1cb524438163784e5b955c7c5ed0 (diff) | |
download | vyos-cloud-init-c6627bc05a57645e6af8b9a5a67e452d9f37e487.tar.gz vyos-cloud-init-c6627bc05a57645e6af8b9a5a67e452d9f37e487.zip |
Cloud-init: T2117: Updated to 20.1
- Merge 20.1 version from the Canonical repository
- Removed unneeded changes in datasources (now only OVF datasource is not equal to upstream's version)
- Adapted cc_vyos module to new Cloud-init version
- Changed Jenkinsfile to use build scripts, provided by upstream
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/cloud-final.service.tmpl | 1 | ||||
-rwxr-xr-x | systemd/cloud-init-generator.tmpl (renamed from systemd/cloud-init-generator) | 12 | ||||
-rw-r--r-- | systemd/cloud-init.service.tmpl | 7 |
3 files changed, 18 insertions, 2 deletions
diff --git a/systemd/cloud-final.service.tmpl b/systemd/cloud-final.service.tmpl index e2b91255..8207b18c 100644 --- a/systemd/cloud-final.service.tmpl +++ b/systemd/cloud-final.service.tmpl @@ -15,6 +15,7 @@ ExecStart=/usr/bin/cloud-init modules --mode=final RemainAfterExit=yes TimeoutSec=0 KillMode=process +TasksMax=infinity # Output needs to appear in instance console output StandardOutput=journal+console diff --git a/systemd/cloud-init-generator b/systemd/cloud-init-generator.tmpl index bd9f2678..45efa243 100755 --- a/systemd/cloud-init-generator +++ b/systemd/cloud-init-generator.tmpl @@ -1,3 +1,4 @@ +## template:jinja #!/bin/sh set -f @@ -9,7 +10,11 @@ DISABLE="disabled" FOUND="found" NOTFOUND="notfound" RUN_ENABLED_FILE="$LOG_D/$ENABLE" +{% if variant in ["suse"] %} +CLOUD_SYSTEM_TARGET="/usr/lib/systemd/system/cloud-init.target" +{% else %} CLOUD_SYSTEM_TARGET="/lib/systemd/system/cloud-init.target" +{% endif %} CLOUD_TARGET_NAME="cloud-init.target" # lxc sets 'container', but lets make that explicitly a global CONTAINER="${container}" @@ -77,7 +82,12 @@ default() { } check_for_datasource() { - local ds_rc="" dsidentify="/usr/lib/cloud-init/ds-identify" + local ds_rc="" +{% if variant in ["redhat", "fedora", "centos"] %} + local dsidentify="/usr/libexec/cloud-init/ds-identify" +{% else %} + local dsidentify="/usr/lib/cloud-init/ds-identify" +{% endif %} if [ ! -x "$dsidentify" ]; then debug 1 "no ds-identify in $dsidentify. _RET=$FOUND" return 0 diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl index d8dc393e..9ad3574c 100644 --- a/systemd/cloud-init.service.tmpl +++ b/systemd/cloud-init.service.tmpl @@ -3,6 +3,8 @@ Description=Initial cloud-init job (metadata service crawler) DefaultDependencies=no 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"] %} @@ -10,14 +12,17 @@ After=networking.service {% endif %} {% if variant in ["centos", "fedora", "redhat"] %} After=network.service +After=NetworkManager.service {% endif %} {% if variant in ["suse"] %} -Before=wicked.service +After=wicked.service # setting hostname via hostnamectl depends on dbus, which otherwise # would not be guaranteed at this point. After=dbus.service {% endif %} Before=network-online.target +Before=sshd-keygen.service +Before=sshd.service {% if variant in ["ubuntu", "unknown", "debian"] %} Before=sysinit.target Conflicts=shutdown.target |