diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-07-31 22:25:59 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-07-31 22:25:59 +0000 |
commit | f974ffc950235e55274a3abf4bc360af4557d5c8 (patch) | |
tree | a87e84d06c3c53b7667700a102934fc9bc05467c /lib/puppet | |
parent | eb8c6878c37bf32dc2a7079ce1b0b959774d6fde (diff) | |
download | puppet-f974ffc950235e55274a3abf4bc360af4557d5c8.tar.gz puppet-f974ffc950235e55274a3abf4bc360af4557d5c8.tar.xz puppet-f974ffc950235e55274a3abf4bc360af4557d5c8.zip |
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
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/server/master.rb | 8 | ||||
-rw-r--r-- | lib/puppet/util.rb | 2 |
2 files changed, 5 insertions, 5 deletions
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 |