<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/sources/helpers/azure.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>2022-02-12T04:40:45+00:00</updated>
<entry>
<title>sources/azure: address mypy/pyright typing complaints (#1245)</title>
<updated>2022-02-12T04:40:45+00:00</updated>
<author>
<name>Chris Patterson</name>
<email>cpatterson@microsoft.com</email>
</author>
<published>2022-02-12T04:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0b41b359a70bbbf3a648862a9b849d60b9ff6c3b'/>
<id>urn:sha1:0b41b359a70bbbf3a648862a9b849d60b9ff6c3b</id>
<content type='text'>
Raise runtime errors for unhandled cases which would cause other
exceptions.  Ignore types for a few cases where a non-trivial
refactor would be required to prevent the warning.

Signed-off-by: Chris Patterson &lt;cpatterson@microsoft.com&gt;</content>
</entry>
<entry>
<title>sources/azure: refactor ssh key handling (#1248)</title>
<updated>2022-02-10T20:03:10+00:00</updated>
<author>
<name>Chris Patterson</name>
<email>cpatterson@microsoft.com</email>
</author>
<published>2022-02-10T20:03:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=50de985bc4e47dff1a8fc52abb7679032bb40cae'/>
<id>urn:sha1:50de985bc4e47dff1a8fc52abb7679032bb40cae</id>
<content type='text'>
Split _get_public_ssh_keys_and_source() into
_get_public_keys_from_imds() and _get_public_keys_from_ovf().

Set _get_public_keys_from_imds() to take a parameter of the
IMDS metadata rather than assuming it is already set in
self.metadata.  This will allow us to move negotation into
local phase where self.metadata may not be set yet.  Update this
method to raise KeyError if IMDS metadata is missing/malformed,
and ValueError if SSH key format is not supported.  Update
get_public_ssh_keys() to catch these errors and fall back to the
OVF/Wireserver keys as needed.

To improve clarity, update register_with_azure_and_fetch_data()
to return the list of SSH keys, rather than bundling them into
a dictionary for updating against the metadata dictionary.

There should be no change in behavior with this refactor.

Signed-off-by: Chris Patterson &lt;cpatterson@microsoft.com&gt;</content>
</entry>
<entry>
<title>sources/azure: drop debug print (#1249)</title>
<updated>2022-02-07T16:17:38+00:00</updated>
<author>
<name>Chris Patterson</name>
<email>cpatterson@microsoft.com</email>
</author>
<published>2022-02-07T16:17:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=339c3b0977363afcf160c564cbf446c4093525fb'/>
<id>urn:sha1:339c3b0977363afcf160c564cbf446c4093525fb</id>
<content type='text'>
Remove debug print that snuck in on a previous fixup.

Signed-off-by: Chris Patterson &lt;cpatterson@microsoft.com&gt;</content>
</entry>
<entry>
<title>sources/azure: consolidate ephemeral DHCP configuration (#1229)</title>
<updated>2022-02-04T20:16:21+00:00</updated>
<author>
<name>Chris Patterson</name>
<email>cpatterson@microsoft.com</email>
</author>
<published>2022-02-04T20:16:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=826783d83f55b78336cdb9e16ea39a1038618b03'/>
<id>urn:sha1:826783d83f55b78336cdb9e16ea39a1038618b03</id>
<content type='text'>
Introduce:

-  _setup_ephemeral_networking() to bring up networking.
  If no iface is specified, it will use net.find_fallback_nic()
  which is consistent with the previous usage of fallback_interface.
  This method now tracks the encoded address of the wireserver
  with a new property `_wireserver_endpoint`.  Introduce a
  timeout parameter to allow for retrying for a specified amount
  of time.

- _teardown_ephemeral_networking() to bring down networking.

- _is_ephemeral_networking_up() to check status.

Ephemeral networking is now:

- Brought up prior to checking IMDS.

- Torn down following metadata crawl.

- For Savable PPS, torn down prior to waiting for NIC detach.
  The link must be torn down in advance or we will see errors
  from cleaning up network after the interface is unplugged.

- For Running PPS, torn down after waiting for media switch.
  The link must be up for media switch to be detected.

- For all PPS, after network switch is complete, networking is
  brought back up to poll for reprovision data and report ready.
  It will be torn down after metadata crawl is complete like
  non-PPS paths.

Additionally:

- Remove EphemeralDHCPv4WithReporting variant in favor of directly
using EphemeralDHCPv4.  The reporting was only for __enter__ usage
which is no longer a used path.  Continue to use dhcp_log_cb
callback.

Signed-off-by: Chris Patterson &lt;cpatterson@microsoft.com&gt;</content>
</entry>
<entry>
<title>sources/azure: consolidate DHCP variants to EphemeralDHCPv4WithReporting (#1190)</title>
<updated>2022-01-18T19:17:56+00:00</updated>
<author>
<name>Chris Patterson</name>
<email>cpatterson@microsoft.com</email>
</author>
<published>2022-01-18T19:17:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=032a7f219e9c70b1314d75da96cd380364c416be'/>
<id>urn:sha1:032a7f219e9c70b1314d75da96cd380364c416be</id>
<content type='text'>
- Update EphemeralDHCPv4WithReporting to subclass EphemeralDHCPv4 for
  consistency (non-functional change).

- Replace all usage of EphemeralDHCPv4 with EphemeralDHCPv4WithReporting.

- Converging to one DHCP class exposed an issue with ExitStack patches
  being mixed with decorators.  Specifically, it appeared that tests
  that did not enable azure.EphemeralDHCPv4WithReporting mocks had it
  applied anyways from previous tests.

  Presumably ExitStack was overwriting the actual value with the
  mock provided by the decorator?  For now, remove some mock patches
  that trigger failures, but future work should move towards a
  consistent approach to prevent undetected effects.

Signed-off-by: Chris Patterson &lt;cpatterson@microsoft.com&gt;</content>
</entry>
<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>generate contents for ovf-env.xml when provisioning via IMDS (#959)</title>
<updated>2021-08-05T19:41:10+00:00</updated>
<author>
<name>Anh Vo</name>
<email>anhvo@microsoft.com</email>
</author>
<published>2021-08-05T19:41:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=8f42eb547ddf3202268e1e37a300ba8b2e89cbd2'/>
<id>urn:sha1:8f42eb547ddf3202268e1e37a300ba8b2e89cbd2</id>
<content type='text'>
Azure Linux Agent (WaLinuxAgent) waits for the ovf-env.xml file 
to be written by cloud-init when cloud-init provisions the VM. This 
file is written whenever cloud-init reads its contents from the 
provisioning ISO. 
With this change, when there is no provisioning ISO, 
DataSourceAzure will generate the ovf-env.xml file based on the 
metadata obtained from Azure IMDS.</content>
</entry>
<entry>
<title>Azure: eject the provisioning iso before reporting ready (#861)</title>
<updated>2021-04-23T14:18:05+00:00</updated>
<author>
<name>Anh Vo</name>
<email>anhvo@microsoft.com</email>
</author>
<published>2021-04-23T14:18:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d5cca27a56145a5eb3d2ebad6749989b2fb7dcd3'/>
<id>urn:sha1:d5cca27a56145a5eb3d2ebad6749989b2fb7dcd3</id>
<content type='text'>
Due to hyper-v implementations, iso ejection is more efficient if performed
from within the guest. The code will attempt to perform a best-effort ejection.
Failure during ejection will not prevent reporting ready from happening. If iso
ejection is successful, later iso ejection from the platform will be a no-op.
In the event the iso ejection from the guest fails, iso ejection will still happen at
the platform level.</content>
</entry>
<entry>
<title>Azure helper: Ensure Azure http handler sleeps between retries (#842)</title>
<updated>2021-03-25T14:20:10+00:00</updated>
<author>
<name>Johnson Shi</name>
<email>Johnson.Shi@microsoft.com</email>
</author>
<published>2021-03-25T14:20:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=6ae1145f5e980a47ac2b1ff3afa228a5da3f6e70'/>
<id>urn:sha1:6ae1145f5e980a47ac2b1ff3afa228a5da3f6e70</id>
<content type='text'>
Ensure that the Azure helper's http handler sleeps a fixed duration
between retry failure attempts. The http handler will sleep a fixed
duration between failed attempts regardless of whether the attempt
failed due to (1) request timing out or (2) instant failure (no
timeout).

Due to certain platform issues, the http request to the Azure endpoint
may instantly fail without reaching the http timeout duration. Without
sleeping a fixed duration in between retry attempts, the http handler
will loop through the max retry attempts quickly. This causes the
communication between cloud-init and the Azure platform to be less
resilient due to the short total duration if there is no sleep in
between retries.</content>
</entry>
<entry>
<title>DataSourceAzure: push dmesg log to KVP (#670)</title>
<updated>2020-11-19T18:38:27+00:00</updated>
<author>
<name>Anh Vo</name>
<email>anhvo@microsoft.com</email>
</author>
<published>2020-11-19T18:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=73e704e3690611625e3cda060a7a6a81492af9d2'/>
<id>urn:sha1:73e704e3690611625e3cda060a7a6a81492af9d2</id>
<content type='text'>
Pushing dmesg log to KVP to help troubleshoot VM boot issues</content>
</entry>
</feed>
