~raharper/cloud-init:nocloud-boottime-improvements

Last commit made on 2016-09-29
Get this branch:
git clone -b nocloud-boottime-improvements https://git.launchpad.net/~raharper/cloud-init
Only Ryan Harper can upload to this branch. If you are Ryan Harper please log in for upload directions.

Branch merges

Branch information

Name:
nocloud-boottime-improvements
Repository:
lp:~raharper/cloud-init

Recent commits

c484c3d... by Ryan Harper on 2016-09-26

config: don't run disk/filesystem configs if we're in a container

cd08a32... by Ryan Harper on 2016-09-26

NoCloud: Don't attempt to find seed block device when running in a container

bb3fd05... by Ryan Harper on 2016-09-29

util: reduce number of blkid execs in NoCloud

The NoCloud datasource execs blkid at least 4 times during boot
to find a possible datasource. Introduce a blkid method which
collects blkid output data and returns it in a dictionary.
Combine with the use of cached_sub to reduce number of required
exects.

Re-implement find_devs_with around blkid dict. Drop support for tag
filtering as it makes things more complicated, nothing currently
uses it, and if someone does want to, they can use blkid() directly
and parse/filter the data.

4e8dad0... by Ryan Harper on 2016-09-29

util: introduce cached_subp method for caching exec'ed commands

Allow caching of:
  - dpkg --print-architecture
  - CONTAINER_HELPERS for is_container
  - blkid

0439d8a... by Robert Schweikert on 2016-09-15

Decode unicode types in decode_binary

The test in decode_binary for six.text_type was incorrect as that includes
unicode type in Python 2 which should actually be decoded.

When the type is string_types we now properly check only for basestring and
str in Python 2 and Python 3 respectively and return the given blob without
making an attempt to decode.

1b71b47... by Joshua Harlow on 2016-09-20

systemd: Ensure that cloud-init-local happens before NetworkManager

30d0adb... by Paul Meyer on 2016-08-25

Allow ephemeral drive to be unpartitioned

If device has no partition table, the first line of output from `sgdisk
-p <device>` will be "Creating new GPT entries.", instead of something
like "Disk /dev/sdb: 266338304 sectors, 127.0 GiB".

Also, protect against localized output by adjusting subp calls that
parse sgdisk output to set LANG=C.

40a400e... by Scott Moser on 2016-09-21

subp: add 'update_env' argument

In order for a caller to use 'env' argument of subp, they
will realistically do:
  env = os.environ.copy()
  env['FOO'] = 'BZR'
  subp(cmd, env=env)

This shortens that to be:
  subp(cmd, update_env={'FOO': 'BZR'})

Add tests, and update growpart tests to use mock when playing with
os.environ.

970dbd1... by LaMont Jones on 2016-09-21

net: support reading ipv6 dhcp config from initramfs

This adds support for understanding 'dhcp6' as a protocol
that can be written into /run/net-IFACE.cfg files by the initramfs.

The end result is supporting ipv6 dhcp from initramfs boot
all the way into iscsi root.

LP: #1621615, #1621507

80f5ec4... by Scott Moser on 2016-09-19

Adjust mounts and disk configuration for systemd.

The end result of all of these changes is to get mounts managed by
cloud-init to occur only after cloud-init.service is done. We need to do
that so that filesystems that are set up by cloud-init (in disk_setup)
do not get mounted by stale entries in /etc/fstab before
the setup occurs.

This can occur in 2 ways:
 a.) new instance with old /etc/fstab
 b.) same instance where disk needs adjusting (Azure resize will re-format
     the ephemeral disk).

The list of changes here is:
 - move mounts and disk_setup module to cloud-init.service rather
   than config. cloud-init.service runs earlier in boot so it
   can get those mount points done earlier.
 - on systemd add 'x-systemd.requires=cloud-init.service' to fstab options
 - cloud-init-local.service: add Before=basic.target
 - cloud-init.service:
   - extend After, Before, and Wants to multiple lines rather than one
     long line.
   - sort consistently with cloud-init-local.service
   - add DefaultDependencies=no
   - add Before=default.target
   - add Conflicts=shutdown.target

LP: #1611074