SCIENTIFIC-LINUX-USERS Archives

March 2016

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Paddy Doyle <[log in to unmask]>
Reply To:
Paddy Doyle <[log in to unmask]>
Date:
Tue, 15 Mar 2016 12:32:18 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (56 lines)
Hi Loris,

On Tue, Mar 15, 2016 at 11:43:55AM +0100, Loris Bennett wrote:

> Hi,
> 
> I'm using ansible to set up two servers and have run into the problem
> that on one server 'hostname' returns the just the name of the machine,
> but on the other I get the FQDN:
> 
> # hostname -s; hostname -d; hostname -f; hostname 
> tadmin01
> test.cluster
> tadmin01.test.cluster
> tadmin01
> 
> # hostname -s; hostname -d; hostname -f; hostname
> tadmin02
> test.cluster
> tadmin02.test.cluster
> tadmin02.test.cluster
> 
> The following files are identical on both servers
> 
> /etc/hosts
> /etc/resolv.conf
> 
> The files
> 
> /etc/sysconfig/network
> 
> differs just in the following way:
> 
> < HOSTNAME=tadmin01
> ---
> > HOSTNAME=tadmin02
> 
> What other files could have an influence on what 'hostname' returns?

Is caching an issue? E.g. with sssd or nscd? That gave us some trouble with
ansible iirc.

We ended up using an explicit ansible rule to set the FQDN in
/etc/sysconfig/network just to make sure that every node was consistent. And
then if necessary use "hostname -s" or "hostname -f" as required.

Cheers,
Paddy

-- 
Paddy Doyle
Trinity Centre for High Performance Computing,
Lloyd Building, Trinity College Dublin, Dublin 2, Ireland.
Phone: +353-1-896-3725
http://www.tchpc.tcd.ie/

ATOM RSS1 RSS2