diff options
author | Scott Moser <smoser@brickies.net> | 2016-09-19 11:48:54 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-09-20 13:42:29 -0400 |
commit | 80f5ec4be0f781b26eca51d90d51abfab396b3f6 (patch) | |
tree | 50075b3a8949324b2c43536bf6ac8ffa2280b597 /config | |
parent | f94b16cea578062c8abf3dd3a1ada234fa671cd3 (diff) | |
download | vyos-cloud-init-80f5ec4be0f781b26eca51d90d51abfab396b3f6.tar.gz vyos-cloud-init-80f5ec4be0f781b26eca51d90d51abfab396b3f6.zip |
Adjust mounts and disk configuration for systemd.
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
Diffstat (limited to 'config')
-rw-r--r-- | config/cloud.cfg | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/cloud.cfg b/config/cloud.cfg index 7c94ec5c..3b4c5383 100644 --- a/config/cloud.cfg +++ b/config/cloud.cfg @@ -30,6 +30,8 @@ cloud_init_modules: - write-files - growpart - resizefs + - disk_setup + - mounts - set_hostname - update_hostname - update_etc_hosts @@ -43,8 +45,6 @@ cloud_config_modules: # Emit the cloud config ready event # this can be used by upstart jobs for 'start on cloud-config'. - emit_upstart - - disk_setup - - mounts - ntp - ssh-import-id - locale |