Comment 7 for bug 1991261

Revision history for this message
Chad Smith (chad.smith) wrote (last edit ):

<EDIT> The reason for "systemd[1] Hostname set to <ubuntu>" is general systemd behavior and expected when /etc/hostname is present with 'ubuntu', systemd will automatically set this hostname even before cloud-init init --local boot stage is entered.

=== original comment ====
I'm seeing in early boot before cloud-init even start and even before /etc/machine-id is created that systemd is getting involved in setting up the hostname.

Sep 29 18:27:02.142455 ubuntu systemd[1]: Hostname set to <ubuntu>.

Are we providing kernel cmdline params like: systemd.hostname= ?
https://www.freedesktop.org/software/systemd/man/hostname.html#Hostname%20semantics

This might be why cloud-init is tripping over host name setup, and systemd overriding what cloud-init sets up.