diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-11-10 22:22:43 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-11-10 22:22:43 -0500 |
commit | 15f3d2e53437e18f50c037694e6db174c9d5cf8f (patch) | |
tree | c4f414058c6322626b9eeca41bfd4582da17db24 /cloudinit/config/cc_set_hostname.py | |
parent | dbeb73f174ccc3b992a8488b7a72cf35c685f139 (diff) | |
parent | cec15471c0fc7008cad607da222dd3c177e764b6 (diff) | |
download | vyos-cloud-init-15f3d2e53437e18f50c037694e6db174c9d5cf8f.tar.gz vyos-cloud-init-15f3d2e53437e18f50c037694e6db174c9d5cf8f.zip |
sync with trunk
Diffstat (limited to 'cloudinit/config/cc_set_hostname.py')
-rw-r--r-- | cloudinit/config/cc_set_hostname.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cloudinit/config/cc_set_hostname.py b/cloudinit/config/cc_set_hostname.py index b0f27ebf..2b32fc94 100644 --- a/cloudinit/config/cc_set_hostname.py +++ b/cloudinit/config/cc_set_hostname.py @@ -27,9 +27,11 @@ def handle(name, cfg, cloud, log, _args): " not setting the hostname in module %s"), name) return - (hostname, _fqdn) = util.get_hostname_fqdn(cfg, cloud) + (hostname, fqdn) = util.get_hostname_fqdn(cfg, cloud) try: - log.debug("Setting hostname to %s", hostname) - cloud.distro.set_hostname(hostname) + log.debug("Setting the hostname to %s (%s)", fqdn, hostname) + cloud.distro.set_hostname(hostname, fqdn) except Exception: - util.logexc(log, "Failed to set hostname to %s", hostname) + util.logexc(log, "Failed to set the hostname to %s (%s)", + fqdn, hostname) + raise |