~smoser/cloud-init:master

Last commit made on 2018-01-25
Get this branch:
git clone -b master https://git.launchpad.net/~smoser/cloud-init
Only Scott Moser can upload to this branch. If you are Scott Moser please log in for upload directions.

Branch merges

Branch information

Name:
master
Repository:
lp:~smoser/cloud-init

Recent commits

bccee93... by Scott Moser

HACKING.rst: mention setting user name and email via git config.

Just include mention of setting user name and email when first
setting up git.

c03bdd3... by Douglas Jordan

Azure VM Preprovisioning support.

This change will enable azure vms to report provisioning has completed
twice, first to tell the fabric it has completed then a second time to
enable customer settings. The datasource for the second provisioning is
the Instance Metadata Service (IMDS),and the VM will poll indefinitely for
the new ovf-env.xml from IMDS.

This branch introduces EphemeralDHCPv4 which encapsulates common logic
used by both DataSourceEc2 an DataSourceAzure for temporary DHCP
interactions without side-effects.

LP: #1734991

30597f2... by Scott Moser

tools/read-version: Fix read-version when in a git worktree.

read-version --json would report bad data when working in a worktree.
This is just because in a worktree, .git is not a directory, but
rather a metadata file that points to the another path.
  $ git worktree ../mytree
  $ cat ../mytree/.git
  gitdir: /path/to/cloud-init/.git/worktrees/mytree
  $ rm -Rf ../mytree; git worktree prune

df182de... by aRkadeFR <email address hidden>

docs: Fix typos in docs and one debug message.

Fix obvious typos. Replace 'for for' with a 'for'.

b28ab78... by Robert Schweikert

btrfs: support resizing if root is mounted ro.

Resize of btrfs fails if the mount point for the file system we are trying
to resize, i.e. the root of the filesystem is read only. With this change
we use a known (currently snapper specific) rw location to work around a
flaw that blocks resizing of the ro filesystem.

LP: #1734787

8a94214... by Akihiko Ota

OpenNebula: Improve network configuration support.

Network configuration in OpenNebula would only work if the host correctly
guessed the names of the devices in the guest. OpenNebula provided data
in its context.sh like 'ETH0_NETWORK', but if the guest named devices
differently then results were not predictable. This would occur with
Predictable Network Interface Names. To address this,
newer versions (of OpenNebula provide the mac address ETH0_MAC.
This function is present in 4.14 and documented officially in 5.0 docs.

This provides support for reading the mac addresses from the context.sh.
It also fixes cases where context.sh provided a field (ETH0_NETWORK
or ETH0_MASK) with a empty string. Previously the empty string would
be used rather than falling back to the default.

LP: #1719157, #1716397, #1736750

32a6a17... by Scott Moser

tests: Fix EC2 Platform to return console output as bytes.

The EC2 test platform uses boto, and boto decodes console output
with decode('utf-8', 'replace). It is known that Ubuntu consoles
contain non-utf8 characters, making this call lossy.

The change here is to patch the boto session to include a OutputBytes
entry in the console_output response, and then to utilize that in
console_log.

More information on problem and solution at:
   https://github.com/boto/botocore/issues/1351

ccbe7f6... by Scott Moser

tests: Fix attempted use of /run in a test case.

The previous commit added a test that would attempt to create and use
/run/cloud-init/. This just modifies it to use a temp dir instead.

2d781c6... by Max Illfelder

GCE: Improvements and changes to ssh key behavior for default user.

The behavior changes and improvements include:
- Only import keys into the default user that contain the name of the
  default user ('ubuntu', or 'centos') or that contain 'cloudinit'.
- Use instance or project level keys based on GCE convention.
- Respect expiration time when keys are set.
  Do not import expired keys.
- Support ssh-keys in project level metadata (the GCE default).

As part of this change, we also update the request header when talking
to the metadata server based on the documentation:
https://cloud.google.com/compute/docs/storing-retrieving-metadata#querying

LP: #1670456, #1707033, #1707037, #1707039

183d578... by Scott Moser

subp: make ProcessExecutionError have expected types in stderr, stdout.

When subp raised a ProcessExecutionError, that exception's stderr and
stdout might end up being the string '-' rather than bytes.

This mean that:
   try:
       subp(mycommand, decode=False)
   except ProcessExecutionError as e:
       pass

Would have 'e.stdout' set to '-' while the caller would expect bytes.

Also reduce the try/except block in subp to a specifically the two lines
that may raise an OSError.