When installing Ubuntu Server using Subiquity (i.e. using the
ubuntu-18.04-live-server-amd64.iso installer image), the user is
prompted to enter a hostname for the new installation (along with
username/password info, etc.)

At the very end of the Subquity run, it writes this info into
var/lib/cloud/seed/nocloud-net/user-data within the installation target
filesystem (e.g.

======
root@bionic:/var/lib/cloud# head -6 seed/nocloud-net/user-data 
#cloud-config
growpart: {mode: 'off'}
hostname: bionic
locale: en_US.UTF-8
resize_rootfs: false
users:
======
)

When the newly-installed system is booted for the first time, this file
causes cloud-init finish up the configuration of the new instance --
include setting the new system's hostname to the specified value as part
of that initial boot.

However, cloud-init on Bionic (e.g. 19.2-36-g059d049c-0ubuntu2~18.04.1)
calls the cc_set_hostname module upon every boot (from within the
cmd/main.py:main_init() function, thus overriding the normal "per-
instance" frequency for the module)...

...and because the "hostname" cloud-config parameter is found to be set,
the cc_set_hostname module will always re-write /etc/hostname back to
the originally-entered hostname at that point --  unexpectedly undoing
the user's manual change to the file.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1764172

Title:
  Unable to change hostname from the one specified during Bionic server
  installation

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/1764172/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to