lp:~craigtracey/cloud-init/update-etc-hosts
- Get this branch:
- bzr branch lp:~craigtracey/cloud-init/update-etc-hosts
Branch merges
- Joshua Harlow (community): Needs Fixing
-
Diff: 170 lines (+55/-30)8 files modifiedcloudinit/config/__init__.py (+3/-1)
cloudinit/config/cc_update_etc_hosts.py (+3/-2)
cloudinit/distros/__init__.py (+15/-0)
cloudinit/distros/debian.py (+1/-0)
cloudinit/distros/rhel.py (+1/-0)
cloudinit/stages.py (+7/-2)
templates/hosts.debian.tmpl (+25/-0)
templates/hosts.ubuntu.tmpl (+0/-25)
Related bugs
Bug #1100036: update_etc_hosts broken for all distros but ubuntu | Medium | Fix Released |
Related blueprints
Branch information
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.tmplThe 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
-
DataSourceCloud
Stack: 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. - 753. By Gerard Dethier
-
DataSourceCloud
Stack: 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.
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