~mdorman-m/cloud-init:sys-io-errors

Last commit made on 2016-10-24
Get this branch:
git clone -b sys-io-errors https://git.launchpad.net/~mdorman-m/cloud-init
Only Mike Dorman can upload to this branch. If you are Mike Dorman please log in for upload directions.

Branch merges

Branch information

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

Recent commits

57e17f4... by Mike Dorman

Add stub sys_net_int for read_net_int calls

Simplifies reading NIC status from sysfs.

LP #1625766

76415f5... by Joshua Harlow

Rewrite to not use sys_dev_info

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

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

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

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

30d0adb... by Paul Meyer

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

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

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

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

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.