summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceCloudSigma.py
AgeCommit message (Collapse)Author
2017-04-21pylint: fix all logging warningsJoshua Powers
This will change all instances of LOG.warn to LOG.warning as warn is now a deprecated method. It will also make sure any logging uses lazy logging by passing string format arguments as function parameters.
2016-12-22LICENSE: Allow dual licensing GPL-3 or Apache 2.0Jon Grimm
This has been a recurring ask and we had initially just made the change to the cloud-init 2.0 codebase. As the current thinking is we'll just continue to enhance the current codebase, its desirable to relicense to match what we'd intended as part of the 2.0 plan here. - put a brief description of license in LICENSE file - put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0 - simplify the per-file header to reference LICENSE - tox: ignore H102 (Apache License Header check) Add license header to files that ship. Reformat headers, make sure everything has vi: at end of file. Non-shipping files do not need the copyright header, but at the moment tests/ have it.
2016-12-11CloudSigma: Fix bug where datasource was not loaded in local search.Scott Moser
CloudSigma would not get any datasources loaded during cloud-init local. Thus, when the network datasource was removed, *no* CloudSigma datasources would be loaded. LP: #1648380
2016-08-12DigitalOcean: use the v1.json endpointBen Howard
Per [1], DigitalOcean provides the metadata in multiple formats. The JSON document is the preferred endpoint. Changes: - Switch to the v1.json meta-data endpoint - Identify droplet identity from SMBIOS - Only poll for metadata when the instance is confirmed to be a droplet - Removal of hard-coded mirrors Additionally, centralize the gates on running 'dmidecode' on arm arches, and update tests to address. [1] https://developers.digitalocean.com/documentation/metadata/
2016-06-02re-add the 'Net' classes for datasourcesScott Moser
When the .pkl file is loaded, the module that it is loaded from must have the same symbol. Ie, if booted once and got DataSourceConfigDriveNet then upgraded and rebooted, then next boot would show Can't get attribute 'DataSourceConfigDriveNet'
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-12Fix up a ton of flake8 issuesJoshua Harlow
2016-04-12SmartOS, CloudSigma: fix error when dmi data is not availbleScott Moser
In Cloudsigma, the datasource would warn if no product id was availble. SmartOS would log exception. This fixes both of those, changing the warning to a debug message. LP: #1569469
2015-03-04Fix invalid format string in CloudSigma logging.Daniel Watkins
2015-01-14Drop reliance on dmidecode executable.Ben Howard
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-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-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-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-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-12Add CloudSigma data sourceKiril Vladimiroff