Commit Graph

2 Commits

Author SHA1 Message Date
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
Ian Wienand
9305ea4b6d Add systemd/fedora support to growroot
Add systemd/fedora support to growroot element.  This involves
installing the correct packages, shipping the systemd service file and
ensuring it is enabled.

Note the required growfs/resize packages for Ubuntu/Debian are
installed in other places.  This is probably a bug in that path, but I
have not addressed that here.

I have tested this with a F23 build with all openstack-infra elements,
uploaded to RAX, and it boots and resizes the main file-system.

Change-Id: I5630dc638f85b1e80795826ef36a306632075460
2016-01-25 17:40:52 +11:00