summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2016-09-08 13:17:37 -0400
committerScott Moser <smoser@brickies.net>2016-09-09 15:58:30 -0400
commit34a26f7f59f2963691e36ca0476bec9fc9ccef63 (patch)
tree0d78c94b6ee132b5bc6019afa0a0488c4015ff9d
parent636deb452d4b448bac4ee83f2a49939982385fe6 (diff)
downloadvyos-cloud-init-34a26f7f59f2963691e36ca0476bec9fc9ccef63.tar.gz
vyos-cloud-init-34a26f7f59f2963691e36ca0476bec9fc9ccef63.zip
systemd: Better support package and upgrade.
In systemd, package installation before the system is fully booted (systemctl is-system-running == starting) may result in the package not being started. Upgrade (package_upgrade: true) can also cause failure if that is done during systemd boot. The solution here is: a.) move config modules that do or may do package installation to 'final_modules'. That list is: - snappy - package-update-upgrade-install - fan - landscape - lxd - puppet - chef - salt-minion - mcollective b.) move cloud-final.service to run as 'Type=idle' LP: #1576692, #1621336
-rw-r--r--config/cloud.cfg16
-rw-r--r--systemd/cloud-final.service2
2 files changed, 9 insertions, 9 deletions
diff --git a/config/cloud.cfg b/config/cloud.cfg
index 2d7fb473..7c94ec5c 100644
--- a/config/cloud.cfg
+++ b/config/cloud.cfg
@@ -49,25 +49,25 @@ cloud_config_modules:
- ssh-import-id
- locale
- set-passwords
- - snappy
- grub-dpkg
- apt-pipelining
- apt-configure
+ - timezone
+ - disable-ec2-metadata
+ - runcmd
+ - byobu
+
+# The modules that run in the 'final' stage
+cloud_final_modules:
+ - snappy
- package-update-upgrade-install
- fan
- landscape
- - timezone
- lxd
- puppet
- chef
- salt-minion
- mcollective
- - disable-ec2-metadata
- - runcmd
- - byobu
-
-# The modules that run in the 'final' stage
-cloud_final_modules:
- rightscale_userdata
- scripts-vendor
- scripts-per-once
diff --git a/systemd/cloud-final.service b/systemd/cloud-final.service
index 3927710f..b8f69b78 100644
--- a/systemd/cloud-final.service
+++ b/systemd/cloud-final.service
@@ -1,6 +1,6 @@
[Unit]
Description=Execute cloud user/final scripts
-After=network-online.target cloud-config.service rc-local.service
+After=network-online.target cloud-config.service rc-local.service multi-user.target
Wants=network-online.target cloud-config.service
[Service]