hostname for Xenial bare metal comes up as "ubuntu"

Bug #1681600 reported by Tom Luong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
New
Undecided
Unassigned

Bug Description

I was able to build an Ubuntu Xenial image using DiB 2.2 after some hacking. Please refer to https://bugs.launchpad.net/diskimage-builder/+bug/1627402

However, something is broken with cloud-init within DiB. The hostname comes up at "ubuntu."

Dmesg shows "[ 45.279032] systemd[1]: Set hostname to <ubuntu>."

log from /var/log/cloud-init.log:
2017-03-30 21:52:54,712 - handlers.py[DEBUG]: start: init-network/config-set_hostname: running config-set_hostname with frequency once-per-instance
2017-03-30 21:52:54,712 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/iid-datasource-none/sem/config_set_hostname - wb: [420] 25 bytes
2017-03-30 21:52:54,713 - helpers.py[DEBUG]: Running config-set_hostname using lock (<FileLock using file '/var/lib/cloud/instances/iid-datasource-none/sem/config_set_hostname'>)
2017-03-30 21:52:54,713 - util.py[DEBUG]: Reading from /etc/hosts (quiet=False)
2017-03-30 21:52:54,713 - util.py[DEBUG]: Read 221 bytes from /etc/hosts
2017-03-30 21:52:54,713 - util.py[DEBUG]: Reading from /etc/hosts (quiet=False)
2017-03-30 21:52:54,713 - util.py[DEBUG]: Read 221 bytes from /etc/hosts
2017-03-30 21:52:54,713 - cc_set_hostname.py[DEBUG]: Setting the hostname to ubuntu (ubuntu)
2017-03-30 21:52:54,713 - util.py[DEBUG]: Reading from /etc/hostname (quiet=False)
2017-03-30 21:52:54,713 - util.py[DEBUG]: Read 7 bytes from /etc/hostname
2017-03-30 21:52:54,713 - util.py[DEBUG]: Writing to /etc/hostname - wb: [420] 7 bytes
2017-03-30 21:52:54,714 - __init__.py[DEBUG]: Non-persistently setting the system hostname to ubuntu
2017-03-30 21:52:54,714 - util.py[DEBUG]: Running command ['hostname', 'ubuntu'] with allowed return codes [0] (shell=False, capture=True)
2017-03-30 21:52:54,716 - handlers.py[DEBUG]: finish: init-network/config-set_hostname: SUCCESS: config-set_hostname ran successfully

log from /var/log/cloud-init-output.log:
Cloud-init v. 0.7.9 running 'init-local' at Thu, 30 Mar 2017 21:50:44 +0000. Up 41.78 seconds.
Cloud-init v. 0.7.9 running 'init' at Thu, 30 Mar 2017 21:50:48 +0000. Up 45.23 seconds.
ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
ci-info: +--------+-------+-----------+-----------+-------+-------------------+
ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
ci-info: +--------+-------+-----------+-----------+-------+-------------------+
ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | . | . |
ci-info: | lo | True | ::1/128 | . | host | . |
ci-info: | ens2f0 | False | . | . | . | 8c:dc:d4:0e:68:20 |
ci-info: | ens2f1 | False | . | . | . | 8c:dc:d4:0e:68:24 |
ci-info: +--------+-------+-----------+-----------+-------+-------------------+
2017-03-30 21:50:48,134 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [0/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f899f65c358>: Failed to establish a new connection: [Errno 101] Network is unreachable',))]
2017-03-30 21:50:49,137 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [1/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f899f65cf98>: Failed to establish a new connection: [Errno 101] Network is unreachable',))]
2017-03-30 21:50:50,139 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [2/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f899f669588>: Failed to establish a new connection: [Errno 101] Network is unreachable',))]

Revision history for this message
Diogenes (splash-gmail) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.