Cloud-init overwriting hostname given to kernel on baremetal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When PXE'ing, the hostname for the system is set via a kernel parameter. However, once installation has finished, and cloud-init starts doing is configuration based on a determined meta-data/user-data file it changes the hostname to ubuntuhost without respecting what was given to the kernel.
The kernel config for PXE is as follows:
default linux
prompt 0
timeout 1
label linux
kernel /images/
ipappend 2
append initrd=
The user data includes:
#cloud-config
apt-update: true
apt-upgrade: true
apt_sources:
- {source: 'ppa:ensemble/ppa'}
machine-data: {ensemble-
packages: [bzr, tmux, python-setuptools, python-twisted, python-argparse, python-txaws,
python-zookeeper, bzr, default-
runcmd: [export ENSEMBLE_
install -y python-txzookeeper, sudo mkdir -p /usr/lib/ensemble, 'cd /usr/lib/ensemble
&& sudo /usr/bin/bzr co lp:~fwereade/ensemble/cobbler-complete-fixes ensemble',
cd /usr/lib/
sudo mkdir -p /var/log/ensemble, 'ensemble-admin initialize --instance-
--admin-
ENSEMBLE_
--pidfile=
python -m ensemble.
--pidfile=
ssh_authorized_
ubuntu@blabla
I had to manually add the following for cloud-init to correctly set the hostname:
manage_etc_hosts: True
hostname: <hostname>
Related branches
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → Medium |
I believe this should be fixed in revno 434 (http:// bazaar. launchpad. net/~cloud- init-dev/ cloud-init/ trunk/revision/ 434)