summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-24Remove 26 from default tox.ini listingJoshua Harlow
2016-05-24Revert some of the alterations of the tox.ini fileJoshua Harlow
2016-05-19Fix up tests and flake8 warningsJoshua Harlow
2016-05-19Remerge against head/masterJoshua Harlow
2016-05-19Adjust net module to be more isolatedJoshua Harlow
This allows it to be used outside of cloudinit more easily in the future.
2016-05-17Don't expose anything but 'render_network_state'Joshua Harlow
This should be the visible api of a network renderer as anything more granular varies between the different render types and will not apply to those renderers.
2016-05-17Document improvements for runcmd/bootcmdMatt Fischer
Note that runcmd runs only on first boot. Note that strings need to be quoted, not escaped. Switch bootcmd list text to use - not * like everything else.
2016-05-12Enable flake8 and fix a large amount of reported issuesJoshua Harlow
2016-05-12fix last flake8 errorScott Moser
2016-05-12fix setup.py for flake8Scott Moser
2016-05-12run flake8 instead of pyflakes in tox. expect tests/ to pass flake8.Scott Moser
2016-05-12Freeze lint testing requirementsJoshua Harlow
2016-05-12Ensure hacking is installedJoshua Harlow
2016-05-12Fix logging importJoshua Harlow
2016-05-12Fix up a ton of flake8 issuesJoshua Harlow
2016-05-11Use a fake serial module that will allow tests to contineJoshua Harlow
Instead of aborting all serial using tests instead just create a serial module in cloudinit that will create a fake and broken serial class when pyserial is not actually installed. This allows for using the datasource and tests that exist in a more functional and tested manner (even when pyserial is not found).
2016-05-11Remove stray prints leftoverJoshua Harlow
2016-05-11Fix py26 for rhel (and older versions of python)Joshua Harlow
2016-05-10Use lstrip for easier viewing of test expected resultJoshua Harlow
2016-05-10Add some basic eni rendering testsJoshua Harlow
2016-05-10Fix removal of validate_commandJoshua Harlow
2016-05-10Move net/renderers -> netJoshua Harlow
2016-05-10Fix up tests and debian distroJoshua Harlow
2016-05-10Rename to net/renderers and klibc -> cmdline.pyJoshua Harlow
2016-05-09Rename renderer attribute to _net_rendererJoshua Harlow
2016-05-09Use the new renderer in the debian and stages filesJoshua Harlow
2016-05-09Move the current rendering to a debian distro fileJoshua Harlow
This format allows for rendering to work in other distros and clearly separates the API needed to do this (it also moves the klibc parsing into its own module so that the leftover code in net/__init__.py is smaller and only focused on util code).
2016-05-06fix timestamp in reporting events.Scott Moser
If no timestamp was passed into a ReportingEvent, then the default was used. That default was 'time.time()' which was evaluated once only at import time.
2016-05-05Use a decorator vs repeated key checks.Joshua Harlow
2016-05-05Add the bridge net typeJoshua Harlow
2016-05-05Get this test of net json -> net config workingJoshua Harlow
2016-05-05Work on refactoring (and adding) network conversion testsJoshua Harlow
2016-04-29Paths: fix instance path if datasource's id has a '/'.Scott Moser
If the datasource's instance id contained a '/' then the instance_id path would not be as expected under /var/lib/cloud/instances/instance_id. LP: #1575938
2016-04-29Config Drive: fix check_instance_id signature.Scott Moser
After reboot cloud-init would fail as the previously pickled object would have a check_instance_id signature but it didn't match expected LP: #1575055
2016-04-29cloudstack: Only use DHCPv4 lease files as a datasourceDaniel Watkins
LP: #1576273
2016-04-28Tweak instance path name based on review feedbackRobert Jennings
r1213 (Ensure instance path is a child of cloud_dir) stripped the leading path separator. This patch goes further by replacing all path seperators with '_' which will avoid a deep directory structure under /var/lib/cloud/instances. LP: #1575938
2016-04-28cloudstack: Only use DHCPv4 lease files as a datasourceWido den Hollander
It could be that there are also 'dhclient6.leases' files in /var/lib/dhcp when DHCPv6 is used next to DHCPv4. This patch makes sure we only read from DHCPv4 lease files
2016-04-27Ensure instance path is a child of cloud_dirRobert Jennings
A cloud has an instance-id metadata value in the form: /Compute-$TENANT/$CLOUDUSERNAME/$UUID The leading '/' causes /var/lib/cloud/instance to link to /Compute-$TENANT/$CLOUDUSERNAME/$UUID rather than /var/lib/cloud/instances/Compute-$TENANT/$CLOUDUSERNAME/$UUID This patch strips the leading path separator from the instance-id. LP: #1575938
2016-04-15network: do not write interface as 'auto' from ip= on command line.Scott Moser
When ip= on the kernel command line defines the networking, set those network devices to be manually controlled, instead of 'auto'. The reason for this is that if they're marked as 'auto': a.) a second attempt will be made to ifup them. b.) they'll be brought down on shutdown 'b' is problematic on network root filesystem. Also this picks up 2 changes from curtin's net module: - Cleanup newline logic so we always have a clean '\n\n' between stanza - Add a unittest to validate bonding network config render, specifically when to emit auto $iface for dependent bond slaves. LP: #1568637
2016-04-15write 'allow-hotplug', but 'auto' for auto.Scott Moser
2016-04-15support and render control=manual on initramfs network devicesScott Moser
when reading the initramfs configurewd devices and turning them into network config, we change to not have 'auto' control (or allow=auto). The reason for this is that if the device was still up: a.) it would try to bring it up again (due to bug 1570142) b.) it would be brought down. 'b' is problematic if there is an iscsi or network root filesystem. Note, that ifupdown does now support 'no-auto-down' which means that the nic should not be brought down on 'ifdown -a'. LP: #1568637
2016-04-15sync with curtin on render_interfacesScott Moser
This picks up newline cleanup and some bond fixes from curtin at rev 374. - Cleanup newline logic so we always have a clean '\n\n' between stanza - Add a unittest to validate bonding network config render, specifically when to emit auto $iface for dependent bond slaves.
2016-04-15apply networking less oftenScott Moser
Do not apply networking configuration whenever a previous datasource has been loaded from disk and found to be valid (via positive return 'check_instance_id' or user configuration of manual_cache_clean). This effectively means that we apply fallback networking only once per instance rather than every boot on any datasource with 'check_instance_id' implemented. LP: #1571004
2016-04-15log that you're not applying configScott Moser
2016-04-15only apply networking once per instanceScott Moser
This attempts to only apply the networking once per instance by doing so only if the datasource was restored from disk. This will work by default for datasources with a functioning check_instance_id or if the user has set manual_cache_clean to true.
2016-04-15networking: no longer delete eth0.cfg on debian/ubuntuScott Moser
Ubuntu cloud images in created a file during build that would interfere with cloud-init's discovered or rendered networking. To avoid the issues, cloud-init was deleting /etc/network/interfaces.d/eth0.cfg . The build process no longer creates this file. However, to address any existing files cloud-init will still remove the file if it has known content and warn otherwise. LP: #1563487
2016-04-14fallback net config: do not consider devices starting with 'veth'Scott Moser
Just skip devices that are named veth*. The fix here is to ignore lxd created devices, but any other veth device that is created at this point in boot is probably not the right interface to dhcp on. LP: #1569064
2016-04-13phone_home: allow usage of fqdnScott Moser
This simply allows the phone_home template to pass the systems fully qualified domain name. LP: #1566824
2016-04-13chef: straighten out validation_cert and validation_keyScott Moser
Now, validation_key is always a path to a file, as it is in chef's client.rb syntax. validation_cert is always the *content* of that file that should be written. However, if validation_cert is the string "system", then we do not write that value, but rather assume the file exists. LP: #1568940
2016-04-13skip bridges when generating fallback networkingScott Moser
It does not make sense to consider bridges when searching for fallback networking. If the system is configured with a bridge, then its probably for some purpose other than to get to a metadata service. Considering the bridge could make cloud-init pick the wrong device on reboot. LP: #1569974