~dylan.perry/cloud-init:fix-yum-config-array-quoting

Last commit made on 2017-04-10
Get this branch:
git clone -b fix-yum-config-array-quoting https://git.launchpad.net/~dylan.perry/cloud-init
Only Dylan Perry can upload to this branch. If you are Dylan Perry please log in for upload directions.

Branch merges

Branch information

Name:
fix-yum-config-array-quoting
Repository:
lp:~dylan.perry/cloud-init

Recent commits

6540f21... by Dylan Perry

Python 3 support using configparser

Use the native Python 3 configparser library where possible, or fallback
to ConfigParser

26a3532... by Dylan Perry

Fix yum repo configuration containing array values

* Remove broken bitly link
* Re-implement handler with ConfigParser
* Add additional test case to handle array values

ConfigObj doesn't handle array values in a way that's compatible with
yum. ConfigParser does by default, so use that instead.

32b21ee... by Scott Moser

ds-identify: do not write None twice to datasource_list.

If the only the None datasource was listed in datasource_list, then
ds-identify would write a cloud.cfg witih:
 datasource_list: [None, None]

The fix is to just append None if the list only has None.

0e2030c... by Steve Langasek

support resizing partition and rootfs on system booted without initramfs.

When booted without an initramfs, the root device will be /dev/root, not a
named device. There is partial support for this when resizing filesystems,
but not for growing partitions, without which it doesn't do much good. Move
the /dev/root resolution code to util.py and use it from cc_growpart.py.

Also, booting without an initramfs only works with a root= argument that's
either a kernel device name (which is unstable) or a partition UUID. Handle
the case of root=PARTUUID=value, not just LABEL and UUID.

LP: #1677376

e80dbb8... by Scott Moser

apt_configure: run only when needed.

Do not bother configuring apt if no 'apt' config is provided and either:
 a.) running on snappy
 b.) there is no 'apt' command (possibly a different distro)

If apt config is provided in either of the above situations, then config
will continue.

LP: #1675185

dab9d6e... by Scott Moser

OpenStack: identify OpenStack by product 'OpenStack Compute'.

OpenStack clouds installed with RedHat RDO have the nova product
configured in /etc/nova/release to be 'OpenStack Compute' rather than
upstream nova default of 'OpenStack Nova'.

This was first reported on Finnish provider Nebula (http://nebula.fi).

LP: #1675349

328fe5a... by Scott Moser

GCE: Search GCE in ds-identify, consider serial number in check.

While documentation indicates that the smbios product name should
contain 'Google Compute Engine', experimentation and bug reports
indicate that is not always the case. The change here is to change
the check for GCE to also consider a serial number that starts with
'GoogleCompute-'.

Also, ds-identify was not currently searching for GCE if no config of
datasource_list was found. Most images have a datasource_list defined.
So update the list to include GCE.

LP: #1674861

2163297... by Tore

Add support for setting hashed passwords

This change will add support for hashed passwords in cc_set_passwords.
It checks if a password is a hash with by checking that it matches
in fairly safe way, and also that the password does not have a ":" in it.

chpasswd needs to know if the password is hashed or not, so two lists
is created so chpasswd is feed with the correct one.

LP: #1570325

4a2b2f8... by Jonathan Ballet <email address hidden>

Fix filesystem creation when using "partition: auto"

Accordingly to the documentation:

    The ``partition`` option may also be set to ``auto``, in which this
    module will search for the existance of a filesystem matching the
    ``label``, ``type`` and ``device`` of the ``fs_setup`` entry and
    will skip creating the filesystem if one is found.

However, using this "auto" flag always recreates the partition no matter
if it has been done before or not.

This commit fixes a bug in which the "partition" attribute was always
set to None although in some cases it should not.

LP: #1634678

443095f... by Scott Moser

ConfigDrive: support reading config drive data from /config-drive.

This is thie cloud-init part of a fix to allow nova-lxd to provide
config drive data. The other part will be done in nova-lxd.

The agreement here is that nova-lxd will copy the contents of the
config drive to /config-drive in the container.

LP: #1673411