Bug 1372269

Summary: Builder does not set hostname properly for Debian 8 (Jessie)
Product: [Community] Virtualization Tools Reporter: Lukas Zapletal <lzap>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dcleal, ptoscano, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-02 22:16:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Zapletal 2016-09-01 09:53:08 UTC
# virt-spawn debian-8 --hostname jessie.local.lan
...

# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 unassigned-hostname.unassigned-domain jessie.local.lan
...

# hostname -f
unassigned-hostname.unassigned-domain

But expected is:

# hostname -f
jessie.local.lan

The thing is that order matters in hosts, the FQDN should always be first on the line:

127.0.1.1 jessie.local.lan jessie alias2 alias3

Comment 1 Richard W.M. Jones 2016-09-01 13:02:09 UTC
Patch posted:
https://www.redhat.com/archives/libguestfs/2016-September/msg00006.html

Comment 3 Pino Toscano 2016-09-22 16:00:22 UTC
*** Bug 1251499 has been marked as a duplicate of this bug. ***