← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~smoser/cloud-init:bug/1576692 into cloud-init:master

 

Scott Moser has proposed merging ~smoser/cloud-init:bug/1576692 into cloud-init:master.

Commit message:
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

Requested reviews:
  cloud init development team (cloud-init-dev)
Related bugs:
  Bug #1576692 in cloud-init: "fully support package installation in systemd"
  https://bugs.launchpad.net/cloud-init/+bug/1576692
  Bug #1621336 in snapd (Ubuntu): "snapd.boot-ok.service hangs eternally on cloud image upgrades"
  https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1621336

For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/305335
-- 
Your team cloud init development team is requested to review the proposed merge of ~smoser/cloud-init:bug/1576692 into cloud-init:master.
diff --git a/config/cloud.cfg b/config/cloud.cfg
index 2d7fb47..7c94ec5 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 3927710..0f9b17f 100644
--- a/systemd/cloud-final.service
+++ b/systemd/cloud-final.service
@@ -4,7 +4,7 @@ After=network-online.target cloud-config.service rc-local.service
 Wants=network-online.target cloud-config.service
 
 [Service]
-Type=oneshot
+Type=idle
 ExecStart=/usr/bin/cloud-init modules --mode=final
 RemainAfterExit=yes
 TimeoutSec=0

References