~bbaude/cloud-init:rh_sub_rm_first

Last commit made on 2016-10-27
Get this branch:
git clone -b rh_sub_rm_first https://git.launchpad.net/~bbaude/cloud-init
Only Brent Baude can upload to this branch. If you are Brent Baude please log in for upload directions.

Branch merges

Branch information

Name:
rh_sub_rm_first
Repository:
lp:~bbaude/cloud-init

Recent commits

98bde58... by Brent Baude

cloudinit/config/cc_rh_subscription.py: Remove repos before adding

A user has pointed out that upon set up of a machine, users typically
remove repos (sometimes all of them) and then add repos in. This does
make sense for a typical user.

f7a5756... by Ryan Harper

cc_users_groups: fix remaing call to ds.normalize_user_groups

Previous commit f0747c4b4cf073273e11d383f0354257be7276ed relocated
normalize_users_groups to ug_util module, but missed modifying
the cc_users_groups config module. Apply the location change to fix.

29348af... by Scott Moser

disk-config: udev settle after partitioning in gpt format.

The function exec_mkpart_gpt was simply not waiting for udev events
to flush after calling sgdisk. The corresponding function
exec_mkpart_mbr already did.

This should fix a transient failure where mkfs would fail with
'not a block device'.

LP: #1626243

1e55f41... by Scott Moser

unittests: do not read system /etc/cloud/cloud.cfg.d

Many of the unit tests in test_data would inadvertantly read the
system's /etc/cloud/cloud.cfg and /etc/cloud/cloud.cfg.d.
This was first noticed on a system deployed by MAAS, where
files in /etc/cloud/cloud.cfg.d/ are root read-only.

This changes those tests to actually make use of
FilesystemMockingTestCase functionality and adds 'reRoot()' to that
class which is easier to use for at least this use case.

LP: #1635350

f6ae1f9... by Wesley Wiedenmeier

Add documentation for logging features.

Update the summary of rsyslog module and add logging.rst to docs.

d853456... by Ryan Harper

Add support for snap create-user on Ubuntu Core images.

Ubuntu Core images use the `snap create-user` to add users to an
Ubuntu Core system. Add support for creating snap users by adding
a key to the users dictionary.
  users:
    - name: bob
      snapuser: <email address hidden>

Or via the 'snappy' dictionary:
  snappy:
    email: <email address hidden>

Users may also create a snap user without contacting the SSO by
providing a 'system-user' assertion by importing them into snapd.

Additionally, Ubuntu Core systems have a read-only /etc/passwd such that
the normal useradd/groupadd commands do not function without an additional
flag, '--extrausers', which redirects the pwd to /var/lib/extrausers.

Move the system_is_snappy() check from cc_snappy module to util for
re-use and then update the Distro class to append '--extrausers' if
the system is Ubuntu Core.

ba0adb9... by Jim Gorz <email address hidden>

Fix sshd restarts for rhel distros.

Set the default value for 'ssh_svcname' in rhel distros.
This means that it no longer needs to be set in system_info config.

9972d24... by Scott Moser

OpenNebula: replace 'ip' parsing with cloudinit.net usage.

Replace the parsing of 'ip' to get a link and mac address list
in OpenNebula's datasource with usage of cloudinit.net.

This makes test cases there not depend on 'ip' availability
and also uses common code.

e873007... by Scott Moser

Fix python2.6 things found running in centos 6.

This gets the tests running in centos 6.
  * ProcessExecutionError: remove setting of .message
    Nothing in cloud-init seems to use .message anywhere, so
    it does not seem necessary.
    The reason to change it is that on 2.6 it spits out:
    cloudinit/util.py:286: DeprecationWarning: BaseException.message
 * tox.ini: add a centos6 environment
   the tox versions listed here replicate a centos6 install with
   packages from EPEL.
   You will still need a python2.6 to run this env so we do not
   enable it by default.

f0747c4... by Joshua Harlow

Move user/group functions to new ug_util file

The amount of code to do user and group normalization
and extraction deserves its own file so move the code
that does this to a new file and update references to the
old location.

This removes some of the funkyness done in config modules
to avoid namespace and attribute clashes as well.