summaryrefslogtreecommitdiff
path: root/systemd
AgeCommit message (Collapse)Author
2017-03-20cloudinit.net: add network config v2 parsing and renderingRyan Harper
Network configuration version 2 format is implemented in a package called netplan (nplan)[1] which allows consolidated network config for multiple network controllers. - Add a new netplan renderer - Update default policy, placing eni and sysconfig first This requires explicit policy to enable netplan over eni on systems which have both (Yakkety, Zesty, UC16) - Allow any network state (parsed from any format cloud-init supports) to render to v2 if system supports netplan. - Move eni's _subnet_is_ipv6 to common code for use by other renderers - Make sysconfig renderer always emit /etc/syconfig/network configuration - Update cloud-init.service systemd unit to also wait on systemd-networkd-wait-online.service 1. https://lists.ubuntu.com/archives/ubuntu-devel/2016-July/039464.html
2017-02-03Add tools/ds-identify to identify datasources available.Scott Moser
ds-identify is run here from the generator. If ds-identify does not see any datasources, it can completely disable cloud-init. The big value in this is that if there is no datasource, no python will ever be loaded, and cloud-init will be disabled.o The default policy being added here is: search,found=all,maybe=all,notfound=disabled That means: - enable (in 'datasource_list') all sources that are found. - if none are found, enable all 'maybe'. - if no maybe are found, then disable cloud-init. On platforms without DMI (everything except for aarch64 and x86), the default 'notfound' setting is 'enabled'. This is because many of the detection mechanisms rely on dmi data, which is present only on x86 and aarch64.
2016-11-15systemd: cloud-init-local use RequiresMountsFor=/var/lib/cloudScott Moser
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
2016-11-15systemd: cloud-init remove After=systemd-networkd-wait-onlineScott Moser
cloud-init.service cannot currently run After=systemd-networkd-wait-online.service as systemd-networkd.service is After dbus.service, but cloud-init.service is: Before=sysinit.target and sysinit.target is before dbus.service. The result is that we are temporarily preferring for cases where there is systemd-networkd in place to have cloud-init.service run without networking properly configured. See bug 1636912 for more information.
2016-11-15systemd: cloud-init-local change Before basic to sysinitScott Moser
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.
2016-11-10systemd: drop both Wants and After local-fs.targetScott Moser
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.
2016-11-10systemd: networking service adjustments.Scott Moser
Here we drop the Requires=networking.service but keep the After=networking.service. The change there is that we no longer force networking.service to run, as the system may not have it or be configured to use it. Second, we add After=systemd-networkd-wait-online.service. That causes us to run after systemd-networkd has brought networking up. The end result is that we now run after both ifupdown or systemd-networkd (if they were going to run) but do not force either to run. One other change is that by dropping Requires=networking.service cloud-init will now run even if networking failed to come up. LP: #1636912
2016-11-10systemd: replace Before=basic.target, dbus.target with sysinit.targetScott Moser
Per discussion on bug 1636912 and subsequent feedback on bug 1629797, using: Before=sysinit.target is a simpler solution than what we had implemented: Before=basic.target Before=dbus.target LP: #1629797
2016-10-07systemd: Run cloud-init.service Before dbus.socket not dbus.targetDaniel Watkins
The change reported to fix bug 1629797 was incorrect. It added: Before=dbus.target and its commit message referenced dbus.service. dbus.target does not exist, and dbus.service would not solve the problem. The change did not fix the problem nor actually make any difference. The fix here is just to use Before=dbus.socket. LP: #1629797
2016-10-04systemd: run cloud-init.service Before dbus.serviceScott Moser
This is the best work around we have for an issue seen when dns is used during cloud-init.service on a system that is configured in nsswitch to use systemd-resolved. The problem is that cloud-init.service was blocking basic.target, and dbus would not be available until after cloud-init.service finished. LP: #1629797
2016-09-21systemd: Ensure that cloud-init-local happens before NetworkManagerJoshua Harlow
2016-09-20Adjust mounts and disk configuration for systemd.Scott Moser
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
2016-09-15systemd: put cloud-init.target After multi-user.targetScott Moser
When we moved cloud-final.service to run After multi-user.target it caused a dependency loop (as cloud-init.target was still implied to be Before multi-user.target). journalctl would either show: cloud-init.target: Breaking ordering cycle by deleting job cloud-final.service/start or multi-user.target: Breaking ordering cycle by deleting job cloud-init.target/start The fix here is to clearly state that cloud-init.target is also After multi-user.target LP: #1623868
2016-09-09systemd: Better support package and upgrade.Scott Moser
In systemd, package installation before the system is fully booted (systemctl is-system-running == starting) may result in the package not being started. Upgrade (package_upgrade: true) can also cause failure if that is done during systemd boot. The solution here is: a.) move config modules that do or may do package installation to 'final_modules'. That list is: - snappy - package-update-upgrade-install - fan - landscape - lxd - puppet - chef - salt-minion - mcollective b.) move cloud-final.service to run as 'Type=idle' LP: #1576692, #1621336
2016-08-22azure dhclient-hook cleanupsScott Moser
This adds some function to the generator to maintain the presense of a flag file '/run/cloud-init/enabled' indicating that cloud-init is enabled. Then, only run the dhclient hooks if on Azure and cloud-init is enabled. The test for is_azure currently only checks to see that the board vendor is Microsoft, not actually that we are on azure. Running should not be harmful anywhere, other than slowing down dhclient. The value of this additional code is that then dhclient having run does not task the system with the load of cloud-init. Additionally, some changes to config are done here. * rename 'dhclient_leases' to 'dhclient_lease_file' * move that to the datasource config (datasource/Azure/dhclient_lease_file) Also, it removes the config in config/cloud.cfg that set agent_command to __builtin__. This means that by default cloud-init still needs the agent installed. The suggested follow-on improvement is to use __builtin__ if there is no walinux-agent installed.
2016-05-27remove blocking udev functionalityScott Moser
This didn't really work. See bug for more info. LP: #1577844
2016-04-04systemd: do not specify After of obsolete syslog.target (LP: #1536964)Scott Moser
syslog.target is obsolete in debian, this fixes a lintian warning. LP: #1536964
2016-03-21cloud-init-local needs to want network-pre or it isnt guaranteed to startScott Moser
2016-03-20fix creation of network-config-ready and dont bother waiting on loScott Moser
2016-03-18cloud-init-local.service: touch file that cloud-init-wait will wait forScott Moser
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.
2016-03-18commit the systemd waiting mechanismScott Moser
Note, still broken as cloud-init local is not going to ever touch the CI_NET_READY file (/run/cloud-init/network-config-ready). So as this is , it will actually just block for 60 seconds and go on.
2016-03-14minor cleanup. long line and remove unused 'local'Scott Moser
2016-03-10generator: use /run/cloud-init instead of /runScott Moser
2016-03-10generator: support reading cmdline of pid 1 in a containerScott Moser
This might need cleaning up in the future as I believe in some containers /proc/cmdline is provided, and in that case it would be preferred to pid 1's command line.
2016-03-10initial systemd service suggestions provided by pittiScott Moser
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.
2016-03-03mention link path in generatorScott Moser
2016-03-03cloud-init.target should not do anythingScott Moser
no wants or after or before.
2016-03-03generator: be more clear on where kernel cmdline came fromScott Moser
2016-03-03do not duplicate '-generator' in log ameScott Moser
2016-03-03consume KERNEL_CMDLINE even if set to "". explain 'container'Scott Moser
2016-03-012 fixupsScott Moser
2016-02-29remove unused varScott Moser
2016-02-29be less verbose by defaultScott Moser
2016-02-29systemd/cloud-init-generator: add a generator to support disablingScott Moser
This gets installed in /lib/systemd/system/cloud-init.target and then is called to generate the symlink (or not generate the symlink) for the cloud-init target. The end result is cloud-init can be completely disabled by: touch /etc/cloud/cloud-init.disabled or a kernel command line with 'cloud-init=disabled'
2016-02-29add cloud-init.target, update service files accordinglyScott Moser
This adds cloud-init.target which is a single target to encompass all the services of cloud-init.
2015-11-30systemd/power_state: fix power_state when cloud-final exited failureScott Moser
if a runcmd exited failure, then power_state would not work. This was because systemd was killing off subprocesses, and cloud-init implemented power off with a subprocess that waited for the parent to exit. LP: #1449318
2015-04-09systemd: use network-online instead of network.target (LP: #1440180)Scott Moser
don't declare a Wants/Requires on network.target; this is a passive target that should only be pulled in by implementors of the networking service. The requirement for network needs to be expressed as a dependency on network-online.target. LP: #1440180
2015-03-17systemd: update config and final to run even if init jobs failScott Moser
LP: #1432758
2015-01-16Use systemd-user-sessions.service for sequencing, not getty.target, for ↵Steve Langasek
correct race-free ordering
2015-01-15Ensure that when running under systemd, cloud-init.service is run before weSteve Langasek
display any getty on the console so that the cloud-init output doesn't get written on top of a login prompt.
2014-07-15run before sshd-keygen.serviceJordan Evans
2014-06-24Add wants for sshd to make sure there isn't a race conditionJordan Evans
2013-09-20Some containers lack /dev/console, so when multi_log attempts to openGarrett Holmstrom
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".
2012-08-03systemd: disable timeouts so cloud-config jobs have time to finishGarrett Holmstrom
2012-08-03systemd: update program calling formatsGarrett Holmstrom
2012-08-03systemd: write stdout to tty so it shows up in GetConsoleOutputGarrett Holmstrom
2011-10-30Add sample/example systemd config filesScott Moser
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