~harlowja/cloud-init:sys-io-errors

Last commit made on 2016-12-02
Get this branch:
git clone -b sys-io-errors https://git.launchpad.net/~harlowja/cloud-init
Only Joshua Harlow can upload to this branch. If you are Joshua Harlow please log in for upload directions.

Branch merges

Branch information

Name:
sys-io-errors
Repository:
lp:~harlowja/cloud-init

Recent commits

6b8f196... by Joshua Harlow on 2016-09-15

Replace usage of sys_netdev_info with read_sys_net

I've seen cases of unable to read from files as
well as the existing os errors so catch io error
and skip by using the smarter read_sys_net instead.

6d1edc3... by Scott Moser on 2016-09-28

ntp: move to run after apt configuration

since ntp module may try to install packages, it needs to run after
apt is configured.

LP: #1628337

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

f94b16c... by Robert Schweikert on 2016-09-15

dmidecode: run dmidecode only on i?86 or x86_64 arch.

Dmidecode is not going to run successfully on anything other than an
x86 or x86_64, just avoid running it anywhere else.

3705bb5... by Scott Moser on 2016-09-15

systemd: put cloud-init.target After multi-user.target

When we moved cloud-final.service to run After multi-user.target it
caused a dependency loop (as cloud-init.target was still implied to be
Before multi-user.target).

journalctl would either show:
  cloud-init.target: Breaking ordering cycle by deleting job
     cloud-final.service/start
or
  multi-user.target: Breaking ordering cycle by deleting job
     cloud-init.target/start

The fix here is to clearly state that cloud-init.target is also
  After multi-user.target

LP: #1623868