diff options
| author | Scott Moser <smoser@ubuntu.com> | 2012-11-12 09:34:34 -0500 |
|---|---|---|
| committer | Scott Moser <smoser@ubuntu.com> | 2012-11-12 09:34:34 -0500 |
| commit | 9de2f909415ad5a5ca4ad3584c73c0e643ba6079 (patch) | |
| tree | 39e176f79fedf638d50d3044435021a31b93d6f7 /cloudinit/config/cc_update_hostname.py | |
| parent | b0f6c7bfa94a5ba302debdc16a175cb0017f9634 (diff) | |
| parent | 71ba36704132ff8597dfc0e45b34e0c4424e239f (diff) | |
| download | vyos-cloud-init-9de2f909415ad5a5ca4ad3584c73c0e643ba6079.tar.gz vyos-cloud-init-9de2f909415ad5a5ca4ad3584c73c0e643ba6079.zip | |
merge from trunk
Diffstat (limited to 'cloudinit/config/cc_update_hostname.py')
| -rw-r--r-- | cloudinit/config/cc_update_hostname.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cloudinit/config/cc_update_hostname.py b/cloudinit/config/cc_update_hostname.py index 1d6679ea..52225cd8 100644 --- a/cloudinit/config/cc_update_hostname.py +++ b/cloudinit/config/cc_update_hostname.py @@ -32,10 +32,12 @@ def handle(name, cfg, cloud, log, _args): " not updating the hostname in module %s"), name) return - (hostname, _fqdn) = util.get_hostname_fqdn(cfg, cloud) + (hostname, fqdn) = util.get_hostname_fqdn(cfg, cloud) try: prev_fn = os.path.join(cloud.get_cpath('data'), "previous-hostname") - cloud.distro.update_hostname(hostname, prev_fn) + log.debug("Updating hostname to %s (%s)", fqdn, hostname) + cloud.distro.update_hostname(hostname, fqdn, prev_fn) except Exception: - util.logexc(log, "Failed to set the hostname to %s", hostname) + util.logexc(log, "Failed to update the hostname to %s (%s)", + fqdn, hostname) raise |
