~yasha.bubnov/cloud-init:master

Last commit made on 2017-06-29
Get this branch:
git clone -b master https://git.launchpad.net/~yasha.bubnov/cloud-init
Only Yasha Bubnov can upload to this branch. If you are Yasha Bubnov please log in for upload directions.

Branch merges

Branch information

Name:
master
Repository:
lp:~yasha.bubnov/cloud-init

Recent commits

4d9f24f... by Scott Moser

read_dmi_data: always return None when inside a container.

This fixes stacktrace and warning message that would be printed
to the log if running inside a container and read_dmi_data tried
to access a key that was not present.

In a container, the /sys/class/dmi/id data is not relevant to the
but to the host. Additionally an unpriviledged container might see
strange behavior:
   # cd /sys/class/dmi/id/
   # id -u
   0
   # ls -l chassis_serial
   -r-------- 1 nobody nogroup 4096 Jun 29 16:49 chassis_serial
   # cat chassis_serial
   cat: /sys/class/dmi/id/chassis_serial: Permission denied

The solution here is to just always return None when running in a
container.

LP: #1701325

17bad42... by Scott Moser

requirements.txt: remove trailing white space.

The 'jsonschema' line had trailing white space. Remove it.

ebc9ecb... by Ryan Harper

Azure: Add network-config, Refactor net layer to handle duplicate macs.

On systems with network devices with duplicate mac addresses, cloud-init
will fail to rename the devices according to the specified network
configuration. Refactor net layer to search by device driver and device
id if available. Azure systems may have duplicate mac addresses by
design.

Update Azure datasource to run at init-local time and let Azure datasource
generate a fallback networking config to handle advanced networking
configurations.

Lastly, add a 'setup' method to the datasources that is called before
userdata/vendordata is processed but after networking is up. That is
used here on Azure to interact with the 'fabric'.

10e5195... by Joshua Powers

Tests: Simplify the check on ssh-import-id

I want to be able to add additional SSH keys to my account, therefore I
should not be limiting these tests to look for one specific key. Instead
we confirm that the comment in authorized_users has the specified users.

f052955... by Joshua Powers

tests: update ntp tests after sntp added

Recent change to ntp in artful has added the sntp package whenever
ntp is installed. The tests, rather poorly, did a dpkg -l instead
of checking with `which`. This fixes the ntp tests to all use
`which` over expecting a certain number of lines using dpkg and
as a result make the tests OS independent.

ecb408a... by Scott Moser

FreeBSD: Make freebsd a variant, fix unittests and tools/build-on-freebsd.

 - Simplify the logic of 'variant' in util.system_info
   much of the data from
   https://github.com/hpcugent/easybuild/wiki/OS_flavor_name_version
 - fix get_resource_disk_on_freebsd when running on a system without
   an Azure resource disk.
 - fix tools/build-on-freebsd to replace oauth with oauthlib and add
   bash which is a dependency for tests.
 - update a fiew places that were checking for freebsd but not using
   the util.is_FreeBSD()

9ccb8f5... by Scott Moser

FreeBSD: fix test failure

The previous commit caused test failure.
This separates out _check_freebsd_cdrom and mocks it in a test
rather than patching open.

ea0a534... by Hongjiang Zhang

FreeBSD: replace ifdown/ifup with "ifconfig down" and "ifconfig up".

Fix the issue caused by different commands on Linux and FreeBSD. On Linux,
we used ifdown and ifup to enable and disable a NIC, but on FreeBSD, the
counterpart is "ifconfig down" and "ifconfig up".

LP: #1697815

8a06a12... by Hongjiang Zhang

FreeBSD: fix cdrom mounting failure if /mnt/cdrom/secure did not exist.

The current method is to attempt to mount the cdrom (/dev/cd0), if it is
successful, /dev/cd0 is configured, otherwise, it is not configured. The
problem is it forgets to check whether the mounting destination folder is
created or not. As a result, mounting attempt failed even if cdrom is
ready.

LP: #1696295

977c4cf... by Andrew Jorgensen

main: Don't use templater to format the welcome message

Some versions of Cheetah returned everything as unicode by default (not
utf-8 or ascii) and some varieties of syslog would choke on unicode.
Jinja2 is probably fine, but Python's format() is perfectly adequate for
a short message like the welcome message.

Reviewed-by: Tom Kirchner <email address hidden>
Reviewed-by: Ben Cressey <email address hidden>