summaryrefslogtreecommitdiff
path: root/cloudinit/sources
AgeCommit message (Collapse)Author
2013-09-04Search for contextualization CDROM by LABEL=CONTEXTVlastimil Holer
2013-09-04Fix RE matching context variables. Test cleanups.Vlastimil Holer
2013-09-04Apply parse.diff by Javier Fontan <jfontan@opennebula.org>Vlastimil Holer
2013-04-02PEP8 fixes.Vlastimil Holer
2013-02-21Remove TODOVlastimil Holer
2013-02-20Minor OpenNebula DS cleanups (style, dsmode, static network).Vlastimil Holer
2013-02-19Merged trunk lp:cloud-initVlastimil Holer
2013-02-19Context.sh parsing cleanups, fix single quotes handling in multiword variables.Vlastimil Holer
2013-02-19Name unification Context.*Device -> Context.*DiskVlastimil Holer
2013-02-19Change network ifaces detection from ifconfig to ip command.Vlastimil Holer
2013-02-07add test_nocloud unit tests, fix one issue foundScott Moser
2013-02-07user-data doesn't merge in from meta-data (typo)Scott Moser
2013-02-04make config of nocloud datasource able to specify meta-data and user-dataScott Moser
LP: #1115833
2013-01-16DataSourceConfigDrive: consider CD rom as valid config-drive source.Scott Moser
previously, there was an attempt in the config drive source to limit the source device to a "full block device" rather than a partition. This was done by a simplistic approach of checking that the last character of the name was not a number. That was filtering out CD-rom devices (sr0). Now, we have a bit more sophisticated approach to that same problem. We filter out block devices that have a 'partition' entry in /sys/class/block/DEVICE_NAME/partition . LP: #1100545
2013-01-07DataSourceCloudStack: fallback to default route if no virtual router foundGerard Dethier
Changes in revision 753 broke cloud-init on ubuntu, as it has a different dhclient directory than Fedora where the change was developed and tested. This change does 2 things: * searches multiple directories (including /var/lib/dhcp) for the lease files. * adds a fallback to the old code path of choosing the default route as the virtual router if there were no virtual routers found in the lease files. LP: #1089989
2013-01-04Append DNS related stuff to network interfaces configuration. Minor cleanups.Vlastimil Holer
2013-01-02Add OpenNebula.org copyright.Vlastimil Holer
2012-12-21Add OpenNebula contextualization options to cloud-initJavi Fontan
2012-12-20Fix exception handlers for data read. Fix name read_context_disk_dir.Vlastimil Holer
2012-12-20Change subp exception handling to util.ProcessExecutionErrorVlastimil Holer
2012-12-20Add explanation on how context variables parsing works.Vlastimil Holer
2012-12-20Change context variables .replace with .decodeVlastimil Holer
2012-12-19Remove conflicting merge blockVlastimil Holer
2012-12-19Merged trunk lp:cloud-initVlastimil Holer
2012-12-19DataSourceCloudStack: use virtual router rather than default routeGerard Dethier
In CloudStack's documentation, it is stated that meta/user-data can be retrieved from CloudStack's Virtual Router [1]. However, cloud-init retrieves these information from default gateway. VR and default gateway may be the same machine (i.e. have the same address) in some cases, but that is not be always true (actually, in my case, it is not). This change searches the lease files in /var/lib/dhclient to pick out the dhcp-server-identifier. It admittedly does make this specific to dhclient. -- [1] http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Admin_Guide/user-data-and-meta-data.html). LP: #1089989
2012-11-12config-drive-v2: support public keysScott Moser
This does a couple things: * separates out the 'normalize_public_keys' from the DataSource's get_public_ssh_keys * uses that from config-drive datasource * supports config drive v1 or v2 public-keys * adds a test. LP: #1077700
2012-11-12pep8 and pylint fixupsScott Moser
2012-11-12REVERT revno 714: config-drive-v2: populate metadata['public-keys'] from ↵Scott Moser
'public_keys'
2012-11-12merge from trunkScott Moser
2012-11-11config-drive-v2: populate metadata['public-keys'] from 'public_keys'Scott Moser
other datasources populate 'public-keys' rather than 'public_keys' and there is a more complete handler in the base DataSource. So, to take advantage of that, have DataSourceConfigDrive copy public_keys to public-keys, and remove the 'get_public_ssh_keys' from the DataSourcEConfigDrive. LP: #1077700
2012-11-10whitespace / indentation cleanupsScott Moser
These changes were pulled out of the previous merge (cc_yum_add_repo) as they were unrelated there. Re-applying them here.
2012-11-07remove dead code from DataSourceEc2Scott Moser
2012-10-27Helpful cleanups.harlowja
1. Remove the usage of the path.join function now that all code should be going through the util file methods (and they can be mocked out as needed). 2. Adjust all occurences of the above join function to either not use it or replace it with the standard os.path.join (which can also be mocked out as needed) 3. Fix pylint from complaining about the tests folder 'helpers.py' not being found 4. Add a pylintrc file that is used instead of the options hidden in the 'run_pylint' tool.
2012-10-24Remove function that shouldn't have shown up.Joshua Harlow
2012-10-24Handle the case where newer versions of botoJoshua Harlow
are used that lazily load the metadata from the ec2 metadata service. 1. Add a ec2_utils module that checks which version of boto is being used and under the right versions the metadata dictionary will be expanded. 2. Use this new ec2_utils module in the cloudstack and ec2 datasources as there entrypoints into boto.
2012-10-23use only util methods for reading/loading/appending/peekingScott Moser
Use only util methods for reading/loading/appending/peeking at files since it is likely soon that we will add a new way of adjusting the root of files read, also it is useful for debugging to track what is being read/written in a central fashion.
2012-10-05Add checks around the device names that are foundJoshua Harlow
to ensure that even if they are found that they are also valid, before they are assumed to be the correct device name.
2012-10-05Add tests to show that the assigned bug is fixed.Joshua Harlow
Also fix the extraction of the metadata key name since it actually uses 'dashes' instead of being a single word.
2012-10-05Ensure that config drive datasource attempts toJoshua Harlow
translate the device name to a actual device using logic that will try the ec2 metadata (if avail) or will try using 'blkid' to find a corresponding label. LP: #1062540
2012-10-04Ensure that for config drive thatJoshua Harlow
we map 'hostname' to 'local-hostname' so that the modules work correctly with the cfgdrive style of data.
2012-10-03Delete hyphen.Vlastimil Holer
2012-10-03Delete old ConfigDrive's code.Vlastimil Holer
2012-10-01fix oauth time skew. actual implementation was returning 401 not 403.Scott Moser
This fixes (tested) bug 978127. The server was actually returning a 401 not a 403. As such, the fix here was insufficient. This will now take either of those 2 error codes. I've also tested it by changing the clock in the cloud-init upstart job with a stanza like below, and verifying that we do see the problem and then it resolve itself: pre-start script offset="10 minutes ago" past=$(date -R --date "$offset") date --set "$past" && echo ===== "set date to $past [$offset]" ===== || echo ===== "failed to set date to $past [$offset]" ==== end script LP: #978127
2012-09-30[pylint]: remove unused importScott Moser
2012-09-28make DataSourceMAAS 'main()' use load_yamlScott Moser
2012-09-24DataSourceMAAS: if a oauth request fails due to 403 try updating local timeScott Moser
In the event of a 403 (Unauthorized) in oauth, try set a 'oauth_clockskew' variable. In future headers, use a time created by 'time.time() + self.oauth_clockskew'. The idea here is that if the local time is bad (or even if the server time is bad) we will essentially use something that should be similar to the remote clock. This fixes LP: #978127. LP: #978127
2012-09-24fix make pep8Scott Moser
2012-09-24Process userdata, ignored by mistake.Vlastimil Holer
2012-09-20Use only util methods for reading/loading/appending/peekingJoshua Harlow
at files since it is likely soon that we will add a new way of adjusting the root of files read, also it is useful for debugging to track what is being read/written in a central fashion.
2012-09-20Configurable dsmode. Resolve IPv4 hostname only with dsmode=net.Vlastimil Holer