From f974ffc950235e55274a3abf4bc360af4557d5c8 Mon Sep 17 00:00:00 2001 From: luke Date: Mon, 31 Jul 2006 22:25:59 +0000 Subject: Fixing the master server so that it always uses the Facter hostname, not the cert or IP hostname. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1433 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/server/master.rb | 8 ++++---- lib/puppet/util.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/puppet') diff --git a/lib/puppet/server/master.rb b/lib/puppet/server/master.rb index 72f7e7abf..8de8c080d 100644 --- a/lib/puppet/server/master.rb +++ b/lib/puppet/server/master.rb @@ -97,6 +97,7 @@ class Server # XXX this should definitely be done in the protocol, somehow case format when "marshal": + Puppet.warning "You should upgrade your client. 'Marshal' will not be supported much longer." begin facts = Marshal::load(CGI.unescape(facts)) rescue => detail @@ -119,10 +120,9 @@ class Server end end - unless client - client = facts["hostname"] - clientip = facts["ipaddress"] - end + # Always use the hostname from Facter. + client = facts["hostname"] + clientip = facts["ipaddress"] # Add any server-side facts to our server. addfacts(facts) diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb index b3ad8ec39..03ef93d21 100644 --- a/lib/puppet/util.rb +++ b/lib/puppet/util.rb @@ -342,7 +342,7 @@ module Util end # Only benchmark if our log level is high enough - if Puppet::Log.sendlevel?(level) + if level != :none and Puppet::Log.sendlevel?(level) result = nil seconds = Benchmark.realtime { yield -- cgit