cloud-init starts as hostname ubuntu with dhcp before setting the real hostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Undecided
|
Unassigned | ||
subiquity |
Expired
|
Undecided
|
Unassigned |
Bug Description
Hi there, noticed a thing when setting up a Raspberry Pi 4 (CM4) with an ubuntu 22.04.1 server image, but I suspect it might affect more.
I used this how-to:
https:/
and it worked the second time. :) Sort of.
The module is a Raspberry Pi Compute Module 4 Rev 1.1, CM4002016, no WLAN, 2GB RAM, 16GB eMMC drive. Omitting the WLAN settings when writing the image with the Pi Imager helped, otherwise the module won't be reachable by network, even if there is a cable on eth0 or via USB eth adapter. That as an aside.
Now to the real issue: Giving all the data includes hostname, user / pass, ssh key. They will be set up correctly. However, when the module boots up the first time with the new image and cloud-init does its thing, it announces itself as hostname "ubuntu" to the DHCP server. Okay, why not, but why? Later on (20 minutes later, after completing sudo apt-get update and sudo apt-get dist-upgrade, and restarting of affected services) it correctly announces and registers with the desired hostname.
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
2022-10-
This is a bit odd, and given that the right hostname was available, I would suspect some order of execution issue.
$ lsb_release -rd
Description: Ubuntu 22.04.1 LTS
Release: 22.04
apt-cache policy cloud-init
cloud-init:
Installed: 22.3.4-
Candidate: 22.3.4-
Version table:
*** 22.3.4-
500 http://
100 /var/lib/
22.
500 http://
22.
500 http://
with best regards
Jens Glathe
Thanks for taking the time to report this bug and helping to make Ubuntu better. We appreciate the difficulties you are facing, but this appears to be a "regular" (non-security) bug. I have unmarked it as a security issue since this bug does not show evidence of allowing attackers to cross privilege boundaries nor directly cause loss of data/privacy. Please feel free to report any other bugs you may find.