~chad.smith/cloud-init:bug/1805201-non-root-collect-logs

Last commit made on 2018-11-26
Get this branch:
git clone -b bug/1805201-non-root-collect-logs https://git.launchpad.net/~chad.smith/cloud-init
Only Chad Smith can upload to this branch. If you are Chad Smith please log in for upload directions.

Branch merges

Branch information

Name:
bug/1805201-non-root-collect-logs
Repository:
lp:~chad.smith/cloud-init

Recent commits

861b888... by Chad Smith

logs: collect-logs ignore instance-data-sensitive.json on non-root user

Since /run/cloud-init/instance-data-sensitive.json is root read-only,
ignore this file if non-root user runs collect-logs.

If --include-userdata is provided on the command line, exit in error
if non-root user attempts this operation.

LP: #1805201

8f812a1... by Chad Smith

azure: _poll_imds only retry on 404. Fail on Timeout

Upon URL timeout, _poll_imds is expected to re-dhcp to get updated
IP configuration. We don't want to indefinitely retry because the
instance likely has invalid IP configuration.

LP: #1803598

a3812a4... by =?utf-8?q?Igor_Gali=C4=87?= <email address hidden>

resizefs: Prefix discovered devpath with '/dev/' when path does not exist

In some environments, like FreeBSD, gpart can return the device basename
instead of the full path. If this discovered devpath does not exist and
is missing the '/dev/' prefix, add that prefix in an attempt to find the
device.

6062595... by Chad Smith

azure: retry imds polling on requests.Timeout

There is an infrequent race when the booting instance can hit the IMDS
service before it is fully available. This results in a
requests.ConnectTimeout being raised.
Azure's retry_callback logic now retries on either 404s or Timeouts.

LP:1800223

6f95120... by Jason Zions <email address hidden>

azure: Accept variation in error msg from mount for ntfs volumes

If Azure detects an ntfs filesystem type during mount attempt, it should
still report the resource device as reformattable. There are slight
differences in error message format on RedHat and SuSE. This patch
simplifies the expected error match to work on both distributions.

LP: #1799338

d910ecd... by Aswin Rajamannar

azure: fix regression introduced when persisting ephemeral dhcp lease

In commitish 9073951 azure datasource tried to leverage stale DHCP
information obtained from EphemeralDHCPv4 context manager to report
updated provisioning status to the fabric earlier in the boot process.

Unfortunately the stale ephemeral network configuration had already been
torn down in preparation to bring up IMDS network config so the report
attempt failed on timeout.

This branch introduces obtain_lease and clean_network public methods on
EphemeralDHCPv4 to allow for setup and teardown of ephemeral network
configuration without using a context manager. Azure datasource now uses
this to persist ephemeral network configuration across multiple contexts
during provisioning to avoid multiple DHCP roundtrips.

3b332c9... by Chad Smith

azure: add udev rules to create cloud-init Gen2 disk name symlinks

Cloud-init delivers udev rules on Azure to create the following symlinks:
- /dev/disk/cloud/azure_root
- /dev/disk/cloud/azure_root-part#
- /dev/disk/cloud/azure_resource
- /dev/disk/cloud/azure_resource-part#

Cloud-init cc_disk_setup expects presence of these dev links in order to
setup the mounted ephemeral disks. Gen1 instances udev rules match based
only a DEVICE_ID attribute that no longer exists on Gen2 instances.
Supplement existing Gen1 rules with matches on specitic SCSI target/lun
path 0:0:0 and 0:0:1 and generate links for azure_root and azure_resource
respectively.

LP: #1797480

093f968... by Chad Smith

tests: ec2 mock missing httpretty user-data and instance-identity routes

58476e7... by Chad Smith

azure: remove /etc/netplan/90-hotplug-azure.yaml when net from IMDS

There was a typo in the seeded filename s/azure-hotplug/hotplug-azure/.

9073951... by Aswin Rajamannar

azure: report ready to fabric after reprovision and reduce logging

When reusing a preprovisioned VM, report ready to Azure fabric as soon as
we get the reprovision data and the goal state so that we are not delayed
by the cloud-init stage switch, saving 2-3 seconds. Also reduce logging
when polling IMDS for reprovision data.

LP: #1799594