hostname for Xenial bare metal comes up as "ubuntu"
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:/
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/
2017-03-30 21:52:54,712 - handlers.py[DEBUG]: start: init-network/
2017-03-30 21:52:54,712 - util.py[DEBUG]: Writing to /var/lib/
2017-03-30 21:52:54,713 - helpers.py[DEBUG]: Running config-set_hostname using lock (<FileLock using file '/var/lib/
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_
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/
log from /var/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: +++++++
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.
2017-03-30 21:50:49,137 - url_helper.
2017-03-30 21:50:50,139 - url_helper.
I think this problem is because of this line: /github. com/openstack/ diskimage- builder/ blob/master/ diskimage_ builder/ elements/ debootstrap/ install. d/10-debian- networking# L25
https:/