summaryrefslogtreecommitdiff
path: root/cloudinit
AgeCommit message (Collapse)Author
2016-05-25fix bring_upScott Moser
2016-05-25commit to push for fear of loss.Scott Moser
== background == DataSource Mode (dsmode) is present in many datasources in cloud-init. dsmode was originally added to cloud-init to specify when this datasource should be 'realized'. cloud-init has 4 stages of boot. a.) cloud-init --local . network is guaranteed not present. b.) cloud-init (--network). network is guaranteed present. c.) cloud-config d.) cloud-init final 'init_modules' [1] are run "as early as possible". And as such, are executed in either 'a' or 'b' based on the datasource. However, executing them means that user-data has been fully consumed. User-data and vendor-data may have '#include http://...' which then rely on the network being present. boothooks are an example of the things run in init_modules. The 'dsmode' was a way for a user to indicate that init_modules should run at 'a' (dsmode=local) or 'b' (dsmode=net) directly. Things were further confused when a datasource could provide networking configuration. Then, we needed to apply the networking config at 'a' but if the user had provided boothooks that expected networking, then the init_modules would need to be executed at 'b'. The config drive datasource hacked its way through this and applies networking if *it* detects it is a new instance. == Suggested Change == The plan is to 1. incorporate 'dsmode' into DataSource superclass 2. make all existing datasources default to network 3. apply any networking configuration from a datasource on first boot only apply_networking will always rename network devices when it runs. for bug 1579130. 4. run init_modules at cloud-init (network) time frame unless datasource is 'local'. 5. Datasources can provide a 'first_boot' method that will be called when a new instance_id is found. This will allow the config drive's write_files to be applied once. Over all, this will very much simplify things. We'll no longer have 2 sources like DataSourceNoCloud and DataSourceNoCloudNet, but would just have one source with a dsmode. == Concerns == Some things have odd reliance on dsmode. For example, OpenNebula's get_hostname uses it to determine if it should do a lookup of an ip address. == Bugs to fix here == http://pad.lv/1577982 ConfigDrive: cloud-init fails to configure network from network_data.json http://pad.lv/1579130 need to support systemd.link renaming of devices in container http://pad.lv/1577844 Drop unnecessary blocking of all net udev rules
2016-05-25remove debug print statementsScott Moser
2016-05-24fix logic error in ec2 get_instance_userdata and slow testsScott Moser
The change to get_instance_userdata is to fix an issue that was causing retry in the test when it was not desired. if user_data returned 404 it means "there was no user-data", so dont bother retrying. However, _skip_retry_on_codes was returning False indicating that readurl should retry. test_merging was creating 2500 random tests, shrink that down to 100. test_seed_runs is still on my system the slowest test, but taking < .5 seconds where it was taking > 3.
2016-05-24Fix up some of the net usage and restore imports and add a mini compat moduleJoshua Harlow
2016-05-24Fix load -> readJoshua Harlow
2016-05-24pacify pep8 regarding the new changesChristian Ehrhardt
2016-05-24integrate further smaller review feedbackChristian Ehrhardt
2016-05-24rebased with upstream and reolved merge conflictsChristian Ehrhardt
2016-05-23final pep8 check fixupsChristian Ehrhardt
2016-05-23make sure we only handle list or dict apt_sources and bail out for othersChristian Ehrhardt
2016-05-23fix issue with dictionary style apt_sources handling filenamesChristian Ehrhardt
2016-05-23warn about multiple colliding apt_source without filenamesChristian Ehrhardt
2016-05-23support apt_sources to be a dictionaryChristian Ehrhardt
key is the filename, and "old" input shall be handled as it was all the time. For compatibility this will (continue to) overwrite the file of multiple options that did not specify an output file (they all get the same default). Yet it will process them all - as it always did - e.g. to add the keys of all of them. Any users of the new format won't have these issues, as they will always have a key.
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-16Fix slow testsJoshua Harlow
Timeouts and retries were triggering so make it so that tests do not use the typical timesouts and retries so that the tests finish faster.
2016-05-12fix last flake8 errorScott Moser
2016-05-12run flake8 instead of pyflakes in tox. expect tests/ to pass flake8.Scott Moser
2016-05-12make pep8 happy with a few spacesChristian Ehrhardt
2016-05-12split add_key and add_key_raw fior better testabilityChristian Ehrhardt
2016-05-12fix EXPORT_GPG_KEYID for long key fingerprintsChristian Ehrhardt
2016-05-12Fix logging importJoshua Harlow
2016-05-12Fix up a ton of flake8 issuesJoshua Harlow
2016-05-12remove Unnecessary parens in add_keyChristian Ehrhardt
2016-05-12move errorlist.append out of add_keyChristian Ehrhardt
2016-05-12add feature to allow a custom template for source listChristian Ehrhardt
2016-05-12remove missed test printChristian Ehrhardt
2016-05-12test mirror list with failing mirrorChristian Ehrhardt
2016-05-12allow to add keys without specifying a sourceChristian Ehrhardt
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-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-05Work on refactoring (and adding) network conversion testsJoshua Harlow
2016-05-01initial commit of reworkScott Moser
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