summaryrefslogtreecommitdiff
path: root/cloudinit/sources
AgeCommit message (Collapse)Author
2014-08-26Add logging around failure to read optional/mandatory pathsJoshua Harlow
2014-08-26Optimize away most of the path_exists checksJoshua Harlow
2014-08-26further remove evidence of pylint.Scott Moser
This just removes comments '# pylint:' things and other code remnents of pylint.
2014-08-26fix(pep8): Fix various pep8 violations and version-lock pep8Jay Faulkner
Fixed all complaints from running "make pep8". Also version locked pep8 in test-requirements.txt to ensure that pep8 requirements don't change without an explicit commit.
2014-08-21use url_helper to combine urlScott Moser
This seems cleaner, to avoid duplicate '/' being added.
2014-06-02SmartOS test: do not require existance of /dev/ttyS1.Scott Moser
LP: #1316597
2014-05-30CloudSigma: only poll on serial device after dmidecode check.Kiril Vladimiroff
On systems with a ttyS1 and nothing attached, the read attempts that the cloud sigma datasource would do would block. Also, Add timeouts for reading/writting from/to the serial console LP: #1316475
2014-05-30minor cleanups.Scott Moser
* do not run dmidecode on arm. * line length * comment that 60 second time out is expected
2014-05-30Use dmidecode to detect if cloud-init runs in CloudSigma's infrastructureKiril Vladimiroff
2014-05-27Enable vendordata for CloudSigma (LP: #1303986)Ben Howard
2014-03-27change 'default' encoding to be "None"Scott Moser
Instead of just trying to see if userdata decodes as the indication that it should be encoded, the user must explicitly set this. The "just try it" will fail in the case where the user had other use of user-data and wanted a blob of data to go through unrecognized by cloud-init. In cases where there can be mistake in automatic behavior, and some users may be relaying on old behavior, its best to just require explicit use.
2014-03-25Added base64 decoding of user data for OpenNebula.Enol Fernandez
2014-03-20NoCloud: fix broken seedfrom on the kernel command lineScott Moser
This was broken in the VendorData add. LP: #1295223
2014-03-19Azure: pep8 and pylint cleanups from previous commit.Scott Moser
2014-03-19change to unmount then check to address possible raceScott Moser
2014-03-19minor changes: be more careful about umount and warn on failScott Moser
2014-03-18Windows Azure defines the ephemeral0 mount as being a per-boot instead ofBen Howard
per instance. Under a variety of circumstances, the ephemeral device may be presented as a default device. This patch detects when that situation happens and triggers CC modules disk-setup and mounts to run again. Details of changes for cloudinit/sources/DataSourceAzure.py: - auto-detect the location of ephemeral0 - check each boot if ephemeral0 is new - done via NTFS w/ label of "Temporary Storage" w/ no files on it - if device is mounted, datasource will unmount it - if is new, change mounts and disk-setup to always for that boot only
2014-03-04CloudSigma: support user-data being base64 encodedKiril Vladimiroff
This adds the ability to read a 'base64_fields' entry in the metadata, and if cloud-init-userdata is listed in that, then content will be base64 decoded first.
2014-02-27AltCloud: do not run dmidecode on arm32/arm64 because it leads to kvm crashOleg Strikov
See LP1243287 for more information
2014-02-26pep8 and pylintScott Moser
2014-02-26SmartOS: do not run on arm as dmidecode causes problemsScott Moser
See LP: #1243287 for more information, but the easiest thing to do here is just not run smartos on arm. LP: #1243287
2014-02-24ConfigDrive: trim trailing newlines in previous-instance-idScott Moser
When cloud-init writes previous-instance-id, it does so with a trailing '\n'. This isn't ideal, as other readers also have to know that this will have a trailing '\n' on it, but here we just trim that off.
2014-02-24Reduce OSds LOG levels when detecting and use HAVANA instead of latestJoshua Harlow
2014-02-24Ensure we strip the previous_iid file contentsJoshua Harlow
The instance-id file contains the instance id and a newline, to compare correctly make sure we strip the newline before further usage.
2014-02-19Read encoded with base64 user dataKiril Vladimiroff
This allows users of CloudSigma's VM to encode their user data with base64. In order to do that thet have to add the ``cloudinit-user-data`` field to the ``base64_fields``. The latter is a comma-separated field with all the meta fields whit base64 encoded values.
2014-02-18NoCloud: fix broken seed from external imageScott Moser
2014-02-18CloudSigma: remove 'WARN' in not found caseScott Moser
The CloudSigma datasource would attempt to read /dev/ttyS1 and if not found would warn (which gets logged to stdout by default). Better to just debug.
2014-02-14DataSourceGCE: fix 'is_resolvable', remove unnecessary WARNScott Moser
2014-02-14DataSourceOpenStack: allow vendor-data to be a dict with 'cloud-init' insideScott Moser
There might be multiple things to put inside a vendor-data. So, if it is a dict and that dict has 'cloud-init', assume that the whole thing was not meant for cloud-init, and set vendordata_raw to the specific item.
2014-02-14The symlink of /var/lib/cloud/instance is not created at the time that theBen Howard
datasource for SmartOS runs. This patch creates the instance's directory.
2014-02-13re-work vendor-data and smartosScott Moser
This reduces how much cloud-init is explicitly involved in what "vendor-data" could accomplish. The goal of vendor-data was to provide the vendor with a channel to run arbitrary code that accomodate for their specific platform. Much of those accomodations are currently being done in cloud-init. However, this now moves some of those things to default "vendor-data", instead of cloud-init proper. Basically, now we have an 'sdc:vendor-data' key in the metadata. If that does not exist, then cloud-init will use the default. The default, provides a boothook. That boothook writes a file into /var/lib/cloud/per-boot/ . That file will be both written on every boot and then executed at rc.local time frame (by 'scripts-per-boot'). It will then execute /var/lib/cloud/instance/data/user-script and /var/lib/cloud/instance/data/operator-script if they exist. So, the things that cloud-init is now doing outside of the default vendor-data that I would rather be done in vendor-data is: * managing the population of instance/data/user-script and instance/data/operator-script. These could very easily be done from the boothook, but doing them in cloud-init removes the necessity for having a 'mdata-get' command in the image (or some other way for the boothook script to query the datasource). * managing the LEGACY things.
2014-02-13merge from trunkScott Moser
2014-02-13some style changes, some pylint, be less noisyScott Moser
this changes url_map to a list and adds 'required' information. * If we've not already found an entry, and this is required, then debug log (ie, this is just not GCE). * if we already found an entry and this is required: warn split the keys fixing out of the loop.
2014-02-13Define default vendordata for SmartOS. In absence of a vendordata, use aBen Howard
default #cloud-config that writes per-boot script that fetches subsequent sdc:operator-scripts and executes it.
2014-02-13GCE: use dns name instead of IP addressVaidas Jablonskis
2014-02-13GCE: add unit tests, user-data support and few other fixesVaidas Jablonskis
2014-02-13do not warn on waiting for urlScott Moser
2014-02-13wait less for the metadata service (by default)Scott Moser
Waiting around for a metadata service in a given datasource means that if its not there all the subsequent datasources have to wait, and boot is slowed down. As it is right now, EC2 is the only one that has the right to wait. In the past, we had to wait around for the EC2 metadata service. I really do not want to extend that courtesy to other cloud platforms. A network based metadata service should be up as soon as networking is up.
2014-02-13merge from trunkScott Moser
2014-02-13Add initial GCE datasourceScott Moser
There are some rough edges here and its missing some test, but I want to get this pulled in.
2014-02-13add 'user-data' support.Scott Moser
This just adds user-data in 'instance/attributes/user-data'. Also turns retries to 0 on all other things.
2014-02-13cloudsigma: change default dsmode to 'net'Scott Moser
Previously this had 'local' as the default datasource mode, meaning that user-data code such as boot hooks and such would not be guaranteed to have network access. That would be out of sync with the expectation on other platforms where the default is 'network up'. The user can still specify 'dsmode' as local if necessary and the local datasource will claim itself found.
2014-02-13merge from trunkScott Moser
2014-02-12support configuration of MD_URL, disable if not resolvable.Scott Moser
this allows the metadata url to be configured by setting: datasource: GCE: metadata_url: <value> Then also, if its not resolvable, we just deactivate the datasource quickly.
2014-02-12Add CloudSigma data sourceKiril Vladimiroff
2014-02-10DataSourceEc2: Fix incorrect return in _get_url_settingsScott Moser
get_url_settings should return a pair of max wait and timeout and not false, fix this bug by checking the max_wait <= 0 in the calling function and returning correctly from there instead.
2014-02-10make a defined var of DATA_DIR_CLEAN_LIST, some pylint cleanupsScott Moser
2014-02-10change behavior to only delete SharedConfig.xml.Scott Moser
2014-02-08Handle code not existing in older requests versionsJoshua Harlow
2014-02-08Capture IOError and use LOG betterJoshua Harlow