~mskalka/cloud-init:zfs-package-fix

Last commit made on 2018-10-24
Get this branch:
git clone -b zfs-package-fix https://git.launchpad.net/~mskalka/cloud-init
Only Michael Skalka can upload to this branch. If you are Michael Skalka please log in for upload directions.

Branch merges

Branch information

Name:
zfs-package-fix
Repository:
lp:~mskalka/cloud-init

Recent commits

a3dfbe7... by Michael Skalka

fix zfs package name in lxd module

e0084a5... by Robert Schweikert

systemd: On SUSE ensure cloud-init.service runs before wicked

With db50bc0d9 the sysconfig renderer was enabled for
openSUSE and SUSE Linux Enterprise. This requires that
cloud-init.service starts before wicked.

LP: #1799709

4ea64f1... by Robert Schweikert

update detection of openSUSE variants

openSUSE has changed the way the distribution is identified in
os-release. Add support detecting for openSUSE Leap 42.3, Leap 15
and TumbleWeed.

Reference: boo#1111427

1d5e9ae... by Chad Smith

azure: Add apply_network_config option to disable network from IMDS

Azure generates network configuration from the IMDS service and removes
any preexisting hotplug network scripts which exist in Azure cloud images.
Add a datasource configuration option which allows for writing a default
network configuration which sets up dhcp on eth0 and leave the hotplug
handling to the cloud-image scripts.

To disable network-config from Azure IMDS, add the following to
/etc/cloud/cloud.cfg.d/99-azure-no-imds-network.cfg:
datasource:
  Azure:
    apply_network_config: False

LP: #1798424

635fec3... by Katie McLaughlin

Correct spelling in an error message (udevadm).

Fix a typo in a RuntimeError path. (udevamd -> udevadm).

4652b19... by Chad Smith

tests: meta_data key changed to meta-data in ec2 instance-data.json

LP: #1797231

9f88125... by Chad Smith

tests: fix kvm integration test to assert flexible config-disk path

Make integration test for flexible using regexp in case disk changes.

LP: #1797199

6ee8a2c... by Chad Smith

tools: Add cloud-id command line utility

Add a quick cloud lookup utility in order to more easily determine
the cloud on which an instance is running.

The utility parses standardized attributes from
/run/cloud-init/instance-data.json to print the canonical cloud-id
for the instance. It uses known region maps if necessary to determine
on which specific cloud the instance is running.

Examples:
aws, aws-gov, aws-china, rackspace, azure-china, lxd, openstack, unknown

f0bc02d... by Chad Smith

instance-data: Add standard keys platform and subplatform. Refactor ec2.

Add the following instance-data.json standardized keys:
* v1._beta_keys: List any v1 keys in beta development,
  e.g. ['subplatform'].
* v1.public_ssh_keys: List of any cloud-provided ssh keys for the
  instance.
* v1.platform: String representing the cloud platform api supporting the
  datasource. For example: 'ec2' for aws, aliyun and brightbox cloud
  names.
* v1.subplatform: String with more details about the source of the
  metadata consumed. For example, metadata uri, config drive device path
  or seed directory.

To support the new platform and subplatform standardized instance-data,
DataSource and its subclasses grew platform and subplatform attributes.
The platform attribute defaults to the lowercase string datasource name at
self.dsname. This method is overridden in NoCloud, Ec2 and ConfigDrive
datasources.

The subplatform attribute calls a _get_subplatform method which will
return a string containing a simple slug for subplatform type such as
metadata, seed-dir or config-drive followed by a detailed uri, device or
directory path where the datasource consumed its configuration.

As part of this work, DatasourceEC2 methods _get_data and _crawl_metadata
have been refactored for a few reasons:
- crawl_metadata is now a read-only operation, persisting no attributes on
  the datasource instance and returns a dictionary of consumed metadata.
- crawl_metadata now closely represents the raw stucture of the ec2
  metadata consumed, so that end-users can leverage public ec2 metadata
  documentation where possible.
- crawl_metadata adds a '_metadata_api_version' key to the crawled
  ds.metadata to advertise what version of EC2's api was consumed by
  cloud-init.
- _get_data now does all the processing of crawl_metadata and saves
  datasource instance attributes userdata_raw, metadata etc.

Additional drive-bys:
* unit test rework for test_altcloud and test_azure to simplify mocks
  and make use of existing util and test_helpers functions.

00e36d3... by Scott Moser

net: ignore nics that have "zero" mac address.

Previously we explicitly excluded mac address '00:00:00:00:00:00'.
But then some nics (tunl0 and sit0) ended up having a mac address like
'00:00:00:00'.

The change here just ignores all 00[:00[:00...]].

LP: #1796917