lp:~craigtracey/cloud-init/update-etc-hosts

Created by Craig Tracey and last modified
Get this branch:
bzr branch lp:~craigtracey/cloud-init/update-etc-hosts
Only Craig Tracey can upload to this branch. If you are Craig Tracey please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Craig Tracey
Project:
cloud-init
Status:
Merged

Recent revisions

762. By ctracey <email address hidden>

Fix broken cc_update_etc_hosts (LP: #1100036)

Right now, all distros but ubuntu will fail to manage /etc/hosts. This
is due to the fact that the templates are named:
- hosts.ubuntu.tmpl
- hosts.redhat.tmpl

The config handler is specifically looking for a template with the
given distro name.

This change addresses this issue and is contingent upon support of
'osfamilies' as implemented in LP: #1100029
(lp:~craigtracey/cloud-init/osfamilies)

761. By ctracey <email address hidden>

cleanup a pep8 failure

accidentally removed a line between two functions.

760. By ctracey <email address hidden>

add support for operating system families

often it is convenient to classify a distro as being part of an
operating system family. for instance, file templates may be
identical for both debian and ubuntu, but to support this under
the current templating code, one would need multiple templates for the
same code.

similarly, configuration handlers often fall into the same bucket: the
configuraton is known to work/has been tested on a particular family
of operating systems. right now this is handled with a declaration
like:

distros = ['fedora', 'rhel']

this fix seeks to address both of these issues. it allows for the
simplification of the above line to:

osfamilies = ['redhat']

and provides a mechanism for operating system family templates.

759. By Joshua Harlow

tests: Add a context manager function in test helpers.

This function can be used to ensure that mocker objects
are restored and verified during usage if exceptions are
thrown while the mock object is being used.

Ensure it is used in the config drive test when multiple
mock objects are being created and restored.

758. By Vlastimil Holer

Allow 'sr0' to be specified as a device for mounts

Previously cloud-config to get a '/dev/sr0' entry written to /etc/fstab
would have had to have the full /dev/sr0. This change allows cloud-config
to reference it without the '/dev/' prefix. Like:
 | mounts:
 | - [ sr0, /media/sr0 ]

757. By Gerard Dethier

DataSourceCloudStack: fallback to default route if no virtual router found

Changes in revision 753 broke cloud-init on ubuntu, as it has a different
dhclient directory than Fedora where the change was developed and tested.

This change does 2 things:
 * searches multiple directories (including /var/lib/dhcp) for the lease
   files.
 * adds a fallback to the old code path of choosing the default route
   as the virtual router if there were no virtual routers found in the
   lease files.

756. By Scott Moser

fix 'lock_password' for cloud-config user setup

This simiplifies the logic, by just making it independent of 'system'.

755. By Joshua Harlow

fix redaction of password field in log (LP: #1096417)

We were trying to avoid the user's password being written to the log, but that
was looking for the wrong option.

754. By Scott Moser

add ChangeLog entry for previous commit

753. By Gerard Dethier

DataSourceCloudStack: use virtual router rather than default route

In CloudStack's documentation, it is stated that meta/user-data can be
retrieved from CloudStack's Virtual Router [1].

However, cloud-init retrieves these information from default gateway. VR
and default gateway may be the same machine (i.e. have the same address)
in some cases, but that is not be always true (actually, in my case, it is
not).

This change searches the lease files in /var/lib/dhclient to pick out
the dhcp-server-identifier.

It admittedly does make this specific to dhclient.

--
[1] http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Admin_Guide/user-data-and-meta-data.html).

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:~cloud-init-dev/cloud-init/trunk
This branch contains Public information 
Everyone can see this information.

Subscribers