[Bug 1052664] Re: 12.10 cloud-init injects comment into /etc/hostname

Scott Moser smoser at ubuntu.com
Wed Sep 19 15:23:12 UTC 2012


and, in fact, that *is* ok:
$ cat /etc/hostname; echo ; echo ==
# Created by cloud-init
domU-12-31-39-02-10-6D
==

$ sudo hostname --file /etc/hostname; echo $?; echo "hostname=$(hostname)"; echo ===
0
hostname=domU-12-31-39-02-10-6D
===
$ sudo hostname -b -F /etc/hostname; echo $?; echo "hostname=$(hostname)"; echo ===
0
hostname=domU-12-31-39-02-10-6D
===
$ sudo hostname -F /etc/hostname; echo $?; echo "hostname=$(hostname)"; echo ===
0
hostname=domU-12-31-39-02-10-6D
===


So something else must be reading that and setting the hostname.

cloud-init log shows:
2012-09-19 14:41:37,523 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-7289b008/sem/config-set_hostname - wb: [420] 19 bytes
2012-09-19 14:41:37,531 - helpers.py[DEBUG]: Running config-set_hostname using lock (<FileLock using file '/var/lib/cloud/instances/i-7289b008/sem/config-set_hostname'>)
2012-09-19 14:41:37,531 - cc_set_hostname.py[DEBUG]: Setting hostname to domU-12-31-39-02-10-6D
2012-09-19 14:41:37,531 - util.py[DEBUG]: Writing to /etc/hostname - wb: [420] 46 bytes
2012-09-19 14:41:37,536 - debian.py[DEBUG]: Setting hostname to domU-12-31-39-02-10-6D
2012-09-19 14:41:37,536 - util.py[DEBUG]: Running command ['hostname', 'domU-12-31-39-02-10-6D'] with allowed return codes [0] (shell=False, capture=True)

so it sure looks like *it* is calling hostname corectly.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1052664

Title:
  12.10 cloud-init injects comment into /etc/hostname

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1052664/+subscriptions



More information about the Ubuntu-server-bugs mailing list