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

Bug #1388755 reported by Alessandro
This bug affects 2 people
Affects Status Importance Assigned to Milestone
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


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).



Revision history for this message
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)
Changed in tripleo:
assignee: nobody → Ghe Rivero (ghe.rivero)
Revision history for this message
Steven Hardy (shardy) wrote : potentially eol bug

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,

Changed in tripleo:
status: Triaged → Incomplete
Ben Nemec (bnemec)
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