diskimage-builder/elements/growroot
Ian Wienand 9cd35c36e4 Fix startup race with growroot/systemd
Tucked away in systemd-udev-settle.service is the following comment

 # This service can dynamically be pulled-in by legacy services which
 # cannot reliably cope with dynamic device configurations, and
 # wrongfully expect a populated /dev during bootup.

The info that the growroot script is querying is populated via udev,
particularly the blkid bits of [1].  This creates a race-condition
where sometimes udev has been triggered and the rules have applied and
sometimes not.  Obviously in the first case, the root disk is not
grown correctly.

systemd-udev-settle is mostly disabled on distros because it can cause
an increase in boot-time for systems with lots of disks; this is not
our situation so it makes basically no difference.

That said, I will investigate if some systemd people know even better
ways to do this (possibly the service should depend on block .device
targets in systemd, and then filter out and only apply to the root
disk?)

[1] https://github.com/systemd/systemd/blob/master/rules/60-persistent-storage.rules#L66

Change-Id: I453e3afcd953dfc29ab6c42ddc81e940cfa70ee0
2016-02-10 13:47:18 +11:00
..
init-scripts Fix startup race with growroot/systemd 2016-02-10 13:47:18 +11:00
post-install.d Add systemd/fedora support to growroot 2016-01-25 17:40:52 +11:00
static/usr/local/sbin Fix growroot device detection 2015-12-20 08:23:54 +00:00
element-deps create growroot element 2015-08-19 21:12:56 +00:00
package-installs.yaml Add systemd/fedora support to growroot 2016-01-25 17:40:52 +11:00
pkg-map Add Gentoo support to growroot 2016-02-01 10:55:03 +11:00
README.rst Add Gentoo support to growroot 2016-02-01 10:55:03 +11:00

========
growroot
========

Grow the root partition on first boot.

This is only supported on:

* ubuntu trusty or later
* gentoo
* fedora & centos