<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/sources/DataSourceCloudStack.py, branch rolling</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2021-12-16T02:16:38+00:00</updated>
<entry>
<title>Adopt Black and isort (SC-700) (#1157)</title>
<updated>2021-12-16T02:16:38+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-16T02:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf'/>
<id>urn:sha1:bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf</id>
<content type='text'>
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
</content>
</entry>
<entry>
<title>CloudStack: fix data-server DNS resolution (#1004)</title>
<updated>2021-10-18T16:26:48+00:00</updated>
<author>
<name>Olivier Lemasle</name>
<email>o.lemasle@gmail.com</email>
</author>
<published>2021-10-18T16:26:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=62c2a56e053dd70638ef3421ffbfbc0b81356691'/>
<id>urn:sha1:62c2a56e053dd70638ef3421ffbfbc0b81356691</id>
<content type='text'>
CloudStack DNS resolution should be done against 
the DNS search domain (with the final dot, DNS
resolution does not work with e.g. Fedora 34)

LP: #1942232</content>
</entry>
<entry>
<title>Move subp into its own module. (#416)</title>
<updated>2020-06-08T16:49:12+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@brickies.net</email>
</author>
<published>2020-06-08T16:49:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3c551f6ebc12f7729a2755c89b19b9000e27cc88'/>
<id>urn:sha1:3c551f6ebc12f7729a2755c89b19b9000e27cc88</id>
<content type='text'>
This was painful, but it finishes a TODO from cloudinit/subp.py.

It moves the following from util to subp:
  ProcessExecutionError
  subp
  which
  target_path

I moved subp_blob_in_tempfile into cc_chef, which is its only caller.
That saved us from having to deal with it using write_file
and temp_utils from subp (which does not import any cloudinit things now).

It is arguable that 'target_path' could be moved to a 'path_utils' or
something, but in order to use it from subp and also from utils,
we had to get it out of utils.</content>
</entry>
<entry>
<title>ec2: Add support for AWS IMDS v2 (session-oriented) (#55)</title>
<updated>2019-11-23T03:05:44+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2019-11-23T03:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4bc399e0cd0b7e9177f948aecd49f6b8323ff30b'/>
<id>urn:sha1:4bc399e0cd0b7e9177f948aecd49f6b8323ff30b</id>
<content type='text'>
* ec2: Add support for AWS IMDS v2 (session-oriented)

AWS now supports a new version of fetching Instance Metadata[1].

Update cloud-init's ec2 utility functions and update ec2 derived
datasources accordingly.  For DataSourceEc2 (versus ec2-look-alikes)
cloud-init will issue the PUT request to obtain an API token for
the maximum lifetime and then all subsequent interactions with the
IMDS will include the token in the header.

If the API token endpoint is unreachable on Ec2 platform, log a
warning and fallback to using IMDS v1 and which does not use
session tokens when communicating with the Instance metadata
service. 

We handle read errors, typically seen if the IMDS is beyond one 
etwork hop (IMDSv2 responses have a ttl=1), by setting the api token
to a disabled value and then using IMDSv1 paths.

To support token-based headers, ec2_utils functions were updated
to support custom headers_cb and exception_cb callback functions
so Ec2 could store, or refresh API tokens in the event of token
becoming stale.

[1] https://docs.aws.amazon.com/AWSEC2/latest/ \
UserGuide/ec2-instance-metadata.html \
#instance-metadata-v2-how-it-works</content>
</entry>
<entry>
<title>add data-server dns entry as new metadata server detection</title>
<updated>2019-11-12T20:42:41+00:00</updated>
<author>
<name>Joshua Hügli</name>
<email>joshua@trafficteam.ch</email>
</author>
<published>2019-11-12T20:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=9662a8791e53bac40a3a37aa3f5bee3076f7d447'/>
<id>urn:sha1:9662a8791e53bac40a3a37aa3f5bee3076f7d447</id>
<content type='text'>
</content>
</entry>
<entry>
<title>replace remaining occurrences of LOG.warn</title>
<updated>2019-05-08T15:14:31+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>daniel.watkins@canonical.com</email>
</author>
<published>2019-05-08T15:14:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=9aa97cfc73b31dc548a240e5f4bd1ef41861cc4d'/>
<id>urn:sha1:9aa97cfc73b31dc548a240e5f4bd1ef41861cc4d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>openstack: Allow discovery in init-local using dhclient in a sandbox.</title>
<updated>2018-05-23T22:08:43+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-05-23T22:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=cd1de5f47ab6b82f2c6fd61a5f6681f33b3e5705'/>
<id>urn:sha1:cd1de5f47ab6b82f2c6fd61a5f6681f33b3e5705</id>
<content type='text'>
Network has not yet been configured in the init-local stage so the
openstack datasource will use dhcp-client to temporarily obtain an ipv4
address and query the metadata service at http://169.254.169.254 to get
network_data.json configuration. If present, the datasource will return
network_config version 1 config based on that network_data.json content.
Previously OpenStack datasource only setup dhcp on the fallback interface
so this represents a change in behavior to react to the full config
provided by openstack.

Also significant to OpenStack is the separation of a _crawl_data operation
from get_data(). crawl_data walks the available metadata services and
returns a dict of discovered content. get_data consumes the crawled_data,
 caches it in the datasource and reacts to that data.
/run/cloud-init/instance-data.json now published network_data.json or
ec2_metadata key if that data is present on any datasource.

The main reasons for the separation of crawl from get_data:
 * Enable performance metrics of cloud-init's metadata crawls on each
 * Enable cloud-init modules and scripts to query and consume metadata
   content which may have updated/changed after cloud-init's initial cache
   during instance boot. (Think hotplug)

Also generalize common logic to base DataSource class/module:
 * Move to a common UNSET variable up into base datasource module fix EC2,
   ConfigDrive, OpenStack, SmartOS to use the global.
 * Drop get_url_settings from Ec2, CloudStack and OpenStack and generalize
   DataSource.get_url_params(). Allow subclasses to override url_max_wait,
   url_timeout and url_retries params.
 * Rename get_network_metadata bool to perform_dhcp_setup as it designates
   whether EphemeralDHCPv4 setup is required before crawling metadata.

LP: #1749717
</content>
</entry>
<entry>
<title>Datasources: Formalize DataSource get_data and related properties.</title>
<updated>2017-12-05T23:42:35+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2017-12-05T23:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0cf6db3617e0cebeb89c4809396f84360827e96c'/>
<id>urn:sha1:0cf6db3617e0cebeb89c4809396f84360827e96c</id>
<content type='text'>
Each DataSource subclass must define its own get_data method. This branch
formalizes our DataSource class to require that subclasses define an
explicit dsname for sourcing cloud-config datasource configuration.
Subclasses must also override the _get_data method or a
NotImplementedError is raised.

The branch also writes /run/cloud-init/instance-data.json. This file
contains all meta-data, user-data and vendor-data and a standardized set
of metadata keys in a json blob which other utilities with root-access
could make use of. Because some meta-data or user-data is potentially
sensitive the file is only readable by root.

Generally most metadata content types should be json serializable. If
specific keys or values are not serializable, those specific values will
be base64encoded and the key path will be listed under the top-level key
'base64-encoded-keys' in instance-data.json. If json writing fails due to
other TypeErrors or UnicodeDecodeErrors, a warning log will be emitted to
/var/log/cloud-init.log and no instance-data.json will be created.
</content>
</entry>
<entry>
<title>Azure, CloudStack: Support reading dhcp options from systemd-networkd.</title>
<updated>2017-10-03T12:59:43+00:00</updated>
<author>
<name>Dimitri John Ledkov</name>
<email>xnox@ubuntu.com</email>
</author>
<published>2017-09-30T04:00:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=9d2a87dc386b7aed1a8243d599676e78ed358749'/>
<id>urn:sha1:9d2a87dc386b7aed1a8243d599676e78ed358749</id>
<content type='text'>
Systems that used systemd-networkd's dhcp client would not be able to get
information on the Azure endpoint (placed in Option 245) or the CloudStack
server (in 'server_address').

The change here supports reading these files in /run/systemd/netif/leases.
The files declare that "This is private data. Do not parse.", but at this
point we do not have another option.

LP: #1718029
</content>
</entry>
<entry>
<title>CloudStack: consider dhclient lease files named with a hyphen.</title>
<updated>2017-09-15T19:38:56+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@brickies.net</email>
</author>
<published>2017-09-15T19:37:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=da1db792b2721d94ef85df8c136e78012c49c6e5'/>
<id>urn:sha1:da1db792b2721d94ef85df8c136e78012c49c6e5</id>
<content type='text'>
A regression in 'get_latest_lease' made it ignore files starting with
'dhclient-' rather than just 'dhclient.'. The fix here is to allow those
files to be considered.

There is a lot more we could do here to better ensure that we pick the
most recent lease, but this change fixes the regression.

LP: #1717147
</content>
</entry>
</feed>
