Age | Commit message (Collapse) | Author |
|
Under el7, cloud-init systemd files need some unit tweaks to ensure
they run at the right time. Pull in current el7 downstream systemd unit
changes.
|
|
While cloud-init writes its data to /var/lib/cloud, we
previously lazily added RequiresMountsFor=/var/lib . It is more correct
to list the more complete path.
LP: #1642062
|
|
sysinit.target happens earlier in boot than basic.target.
cloud-init-local.service had:
Before=basic.target
but cloud-init.service had:
After=cloud-init-local.service
Before=sysinit.target
The result was that cloud-init-local.service was indirectly
Before sysinit.target anyway, so this change is just to more
specifically state that.
|
|
Drop mention of local-fs.target from both cloud-init-local.service
and cloud-init.service. This could actually could cause a loop in
ordering due to cc_mounts writing mount points with:
x-systemd.requires=cloud-init.service
Rather, we specifically list /var/lib/ and systemd-remount-fs.service
in cloud-init-local.service. cloud-init.service will run after
cloud-init-local and thus will have these satisfied.
|
|
|
|
The end result of all of these changes is to get mounts managed by
cloud-init to occur only after cloud-init.service is done. We need to do
that so that filesystems that are set up by cloud-init (in disk_setup)
do not get mounted by stale entries in /etc/fstab before
the setup occurs.
This can occur in 2 ways:
a.) new instance with old /etc/fstab
b.) same instance where disk needs adjusting (Azure resize will re-format
the ephemeral disk).
The list of changes here is:
- move mounts and disk_setup module to cloud-init.service rather
than config. cloud-init.service runs earlier in boot so it
can get those mount points done earlier.
- on systemd add 'x-systemd.requires=cloud-init.service' to fstab options
- cloud-init-local.service: add Before=basic.target
- cloud-init.service:
- extend After, Before, and Wants to multiple lines rather than one
long line.
- sort consistently with cloud-init-local.service
- add DefaultDependencies=no
- add Before=default.target
- add Conflicts=shutdown.target
LP: #1611074
|
|
|
|
|
|
this might work. And if it does means we could generally test this
as the file that the cloud-init-wait will wait for will actually get
created.
|
|
This should mean that cloud-init-local is running earlier now
(DefaultDependencies=no). And also blocking networking coming up
(Before=network-pre.target)
cloud-init.service should now actually block network-online.target
from being made (meaning it will run before anything that expects
that) but after networking.service, which is what actually does
the bringup on ifupdown / ubuntu.
|
|
This adds cloud-init.target which is a single target to
encompass all the services of cloud-init.
|
|
that device and write to it directly things can start going haywire.
Here we address this problem by sending console-bound output to stdout
and letting init take care of getting it to the console instead.
We already configure upstart with "console output", so we need only
change systemd to use "journal+console".
|
|
|
|
|
|
|
|
This imports the systemd config files that Garrett Holmstrom added to
fedora. Its not essential that thay be here, rather than just maintained
as distribution delta, but there exists upstart files here.
taken from
git://pkgs.fedoraproject.org/cloud-init.git
commit 87f33190f43d2b26cced4597e7298835024466c2
Author: Garrett Holmstrom <gholms@fedoraproject.org>
Patch2: cloud-init-0.6.2-systemd.patch
|