I have a branch at 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+ref/bug/1576692 
which:
a.) moves cloud-init-final to be Type=idle
b.) moves config modules such as package-update-upgrade-install to run in the 
final_modules

I've patched a lxc container with that, and then launched several
instances.  My experience is that out of 5 containers 2 or 3 of them
will have a running postgres at the end (per systemctl status
postgresql@9.5-main).

The user-data I'm providing is just:
 #cloud-config
 packages: [postgresql]
 runcmd:
   - "systemctl status postgresql@9.5-main > /run/my-status || true"

Then you can just look at /run/my-status.

To start a patched image what you can do is:
 n=y1
 lxc init ubuntu-daily:yakkety $n "--config=user.user-data=$(cat my.user-data)"
 lxc-chroot $n -- sh -ec 'd=/tmp/my.deb; trap "rm -f $d" EXIT; cat > $d && dpkg 
-i $d' < "$deb"
 lxc start $n

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1576692

Title:
  fully support package installation in systemd

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1576692/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to