~lkundrak/cloud-init/+git/dispatcher-dir:lr/cla

Last commit made on 2022-02-21
Get this branch:
git clone -b lr/cla https://git.launchpad.net/~lkundrak/cloud-init/+git/dispatcher-dir

Branch merges

Branch information

Recent commits

3abdb02... by Lubomir Rintel

Sign away what's left of Lubomir Rintel's soul

With blood.

c1e4c99... by Brett Holman <email address hidden>

Include missing subcommand in manpage (#1279)

8999978... by Brett Holman <email address hidden>

Clean up artifacts from pytest, packaging, release with make clean (#1277)

c1a2047... by Chris Patterson <email address hidden>

sources/azure: ensure retries on IMDS request failure (#1271)

There are two issues with IMDS retries:

1. IMDS_VER_WANT will never be attempted if retries=0, such as
when fetching network metadata with infinite=True.

2. get_imds_data_with_api_fallback() will attempt one request with
IMDS_VER_WANT. If the connection fails due to a timeout, connection
issue, or error code other than 400, an empty dictionary will be
returned without attempting the requested number of retries.

This PR:

- Updates get_imds_data_with_api_fallback() to invoke
get_metadata_from_imds() with the specified retries and infinite
parameters.

- Updates retry_on_url_exc to take a configurable set of HTTP error
codes and exception types to retry on.

- Add IMDS_RETRY_CODES set to retry with when fetching data from IMDS:

  - 404 not found (yet)
  - 410 gone / unavailable (yet)
  - 429 rate-limited/throttled
  - 500 server error

- Replace default callback with imds_readurl_exception_callback,
which configures retry_on_url_exc() with these error codes and
instances.

- Add new pytests for IMDS to eventually replace the unittest
equivalents and improve existing coverage.

Signed-off-by: Chris Patterson <email address hidden>

f4404af... by Chris Patterson <email address hidden>

sources/azure: removed unused savable PPS paths (#1268)

If the VM is rebooted during provisioning, the PPS type will be
determined to be UNKNOWN and will poll for reprovision data.

Given that we will never enter _wait_for_all_nics_ready() in any
other condition than a fresh source instance in Savable PPS, we can
safely remove the now-unused code paths.

Signed-off-by: Chris Patterson <email address hidden>

b3d9acd... by James Falcon

integration tests: fix Azure failures (#1269)

8537237... by Brett Holman <email address hidden>

Release 22.1 (#1267)

Bump the version in cloudinit/version.py to 22.1 and
update ChangeLog.

LP: #1960939

101a62f... by Chris Patterson <email address hidden>

sources/azure: report ready in local phase (#1265)

Pre-provisioned instances report ready early in the local phase and
again in the non-local phase, during setup(). Non-PPS only reports
ready during non-local phase.

Update the process to report ready during the local phase for all
cases. Only attempt to do so if networking is up to prevent stalling
boot. We've already waited at least 20 minutes for DHCP if we're
provisioning, or 5 minutes for DHCP on normal boot requesting updated
network configuration.

- Extend _report_ready() with pubkey_info and raise exception
  on error to consolidate reporting done in _negotiate() and
  _report_ready().

- Remove setup(), moving relevant logic into crawl_metadata().

- Move remaining _negotiate() logic into _cleanup_markers() and
  _determine_wireserver_pubkey_info().

These changes effectively fix two issues that were present:

(1) _negotiated is incorrectly set to True

When failing to report ready. _negotiate() squashed the exception and
the return value was not checked. This was probably masked due to the
forced removal of obj.pkl on Ubuntu instances, but would be preferable
once we start persisting it to prevent unnecessary re-negotiation.

(2) provisioning media is not ejected for non-PPS

_negotiate() did not pass iso_dev parameter when reporting ready. The
host will ensure this operation takes place, but it is preferable to
eject /dev/sr0 from within the guest when we're done with it.

Lastly, this removes any need for lease file parsing as the wireserver
addressed is tracked for ephemeral DHCP. A follow-up PR will remove
this now-unused logic.

Signed-off-by: Chris Patterson <email address hidden>

32fcbb5... by Chris Patterson <email address hidden>

sources/azure: validate IMDS network configuration metadata (#1257)

Due to race conditions and caching, IMDS may return stale or incomplete
metadata. Add some validation to detect these scenarios and report
appropriate telemetry.

Introduce normalize_mac_address() to allow for comparison of mac
addresses, replacing that found inline in:
_generate_network_config_from_imds_metadata()

Add validation of final fetch of IMDS metadata.

Signed-off-by: Chris Patterson <email address hidden>

1d3ddaf... by James Falcon

docs: Add more details to runcmd docs (#1266)