Ask Your Question

Why does Puppet write a "wrong" hostname to his logfiles?

asked 2013-08-05 05:04:11 -0600

gunzl1ng3r gravatar image

updated 2013-08-06 05:12:23 -0600

Hi all,

I'm having a little trouble with the way Puppet logs his output.

My problem is, that it seems to check /etc/hosts for the IP it is running on and uses the first name after the IP for logging purposes.

This behaviour is kind of problematic for me, since we're using Kerberos in one of our projects which forces us to add the FQDN used by Kerberos to /etc/hosts on our app-Servers. For better understanding I added some examples.T hat's how the files would look on two of our app-servers and one of ... (more)

edit retag flag offensive close merge delete


I'm doing a quick fire from the hip here; if you're comfortable with Ruby, you could modify the fqdn/hostname facts to behave the way you expect.

Ancillas gravatar imageAncillas ( 2013-08-05 11:32:10 -0600 )edit

Thanks for the response, but the facts do behave as expected - the hostname fact produced by facter shows the wanted name "project-server-app01" - and though I might work myself through the ...(more)

gunzl1ng3r gravatar imagegunzl1ng3r ( 2013-08-06 04:44:44 -0600 )edit

As a workaround, is it possible to update your /etc/hosts files with the Kerberos FQDN placed only at the end of the line and the desired hostname at the ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-08-06 21:34:04 -0600 )edit

You can also export the environment variables FACTER_fqdn and FACTER_hostname to the Puppet environment to force them to values that are suitable for your logging purposes, assuming the Puppet logger ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-08-06 21:35:20 -0600 )edit

The facts should be pulling from the 'hostname' command while Puppet itself will be pulling the configuration from what is set in /etc/puppet/puppet.conf. Use the command 'puppet ...(more)

Trevor Vaughan gravatar imageTrevor Vaughan ( 2013-08-07 21:18:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-01-15 21:32:21 -0600

rjc gravatar image

If what you have described is accurate, then using node_name = facter in your puppet.conf should do what you want.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-08-05 05:04:11 -0600

Seen: 524 times

Last updated: Jan 15 '14