Public bug reported:
I believe this is the same issue as in this bug here:
https://bugs.launchpad.net/cloud-init/+bug/1662542
root@ubuntu1804:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
cloud-init/bionic,bionic,now 18.2-14-g6d48d265-0ubuntu1 all [installed]
Excerpt form /var/log/cloud-init.log:
2018-05-10 16:11:28,774 - cc_set_hostname.py[DEBUG]: Setting the hostname to
nohostname.novalocal (nohostname)
2018-05-10 16:11:28,774 - util.py[DEBUG]: Running command ['hostnamectl',
'set-hostname', 'nohostname.novalocal'] with allowed return codes [0]
(shell=False, capture=True)
2018-05-10 16:11:28,778 - util.py[WARNING]: Failed to set the hostname to
nohostname.novalocal (nohostname)
2018-05-10 16:11:28,778 - util.py[DEBUG]: Failed to set the hostname to
nohostname.novalocal (nohostname)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_set_hostname.py",
line 75, in handle
cloud.distro.set_hostname(hostname, fqdn)
File "/usr/lib/python3/dist-packages/cloudinit/distros/__init__.py", line
109, in set_hostname
self._write_hostname(writeable_hostname, self.hostname_conf_fn)
File "/usr/lib/python3/dist-packages/cloudinit/distros/rhel.py", line 125, in
_write_hostname
util.subp(['hostnamectl', 'set-hostname', str(hostname)])
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1957, in subp
cmd=args)
cloudinit.util.ProcessExecutionError: Unexpected error while running command.
Command: ['hostnamectl', 'set-hostname', 'nohostname.novalocal']
Exit code: 1
Reason: -
Stdout:
Stderr: Failed to create bus connection: No such file or directory
2018-05-10 16:11:28,783 - main.py[DEBUG]: Failed setting hostname in init-net
stage. Will retry in modules:config stage. Error: Failed to set the hostname to
nohostname.novalocal (nohostname): Unexpected error while running command.
Command: ['hostnamectl', 'set-hostname', 'nohostname.novalocal']
Exit code: 1
Reason: -
Stdout:
Stderr: Failed to create bus connection: No such file or directory.
** Affects: cloud-init (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770451
Title:
hostname not set: Failed to create bus connection: No such file or
directory
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1770451/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs