debian image built with diskimage-builder sets instance's hostname to 'debian'

Bug #1388755 reported by Alessandro on 2014-11-03
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
diskimage-builder
Undecided
Unassigned
tripleo
High
Ghe Rivero

Bug Description

After following the instructions as in bug 1384103 I can build a debian image with diskimage-builder.
However, when starting a virtual machine the hostname is set by default to 'debian'.

This is I think due to the following file

more /etc/cloud/cloud.cfg.d/01_hostname.cfg
hostname: debian

which is created by script

/home/ubuntu/diskimage-builder/elements/debian/root.d/08-debootstrap

91 # specify a hostname so that cloud-init does not default to (None)
92 sudo sh -c "echo 'hostname: debian' > ${TARGET_ROOT}/etc/cloud/cloud.cfg.d/01_hostname.cfg"

After commenting out line 92, the virtual machine gets created with the correct hostname (the instance name that is passed to cloud init by openstack).

Regards,

Alessandro

Clint Byrum (clint-fewbar) wrote :

Hi Alessandro. That is indeed a problem. I would have thought cloud-init would override that hostname. Anyway, that was copied from the scripts that the semi-official AWS images are created with, but we should probably just drop 'debian' in /etc/hostname and then cloud-init will overwrite it once it has a data source.

Changed in tripleo:
status: New → Triaged
importance: Undecided → High
Ghe Rivero (ghe.rivero) on 2014-11-10
Changed in tripleo:
assignee: nobody → Ghe Rivero (ghe.rivero)

This bug was reported against an old version of TripleO, and may no longer be valid.

Since it was reported before the start of the liberty cycle (and our oldest stable
branch is stable/liberty), I'm marking this incomplete.

Please reopen this (change the status from incomplete) if the bug is still valid
on a current supported (stable/liberty, stable/mitaka or trunk) version of TripleO,
thanks!

Changed in tripleo:
status: Triaged → Incomplete
Ben Nemec (bnemec) on 2017-06-13
Changed in tripleo:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers