summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-06-14 13:53:56 -0500
committerLuke Kanies <luke@madstop.com>2008-06-14 13:53:56 -0500
commit6a61198f9293674a4bf0aa75bfbca10e20f64d20 (patch)
tree0b1b6c4ffe6e69c3c9d3e9650620e3afbd486f18 /lib/puppet/network/handler
parenteaa6eabc680cb6264594e30fd6a56e3e36765269 (diff)
parent7b2c310e18b214424ae082e6ed2354a07b708c6f (diff)
downloadpuppet-6a61198f9293674a4bf0aa75bfbca10e20f64d20.tar.gz
puppet-6a61198f9293674a4bf0aa75bfbca10e20f64d20.tar.xz
puppet-6a61198f9293674a4bf0aa75bfbca10e20f64d20.zip
Merge branch '0.24.x'
Also added the fixes to make the certhandler tests pass even when certs exist; I'll deal with the conflict later. Conflicts: CHANGELOG bin/puppetd lib/puppet/network/http/handler.rb lib/puppet/network/http/mongrel/rest.rb spec/integration/indirector/rest.rb spec/integration/network/server/mongrel.rb spec/integration/network/server/webrick.rb spec/unit/network/http/webrick.rb
Diffstat (limited to 'lib/puppet/network/handler')
-rw-r--r--lib/puppet/network/handler/master.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb
index 851ccc7b2..a050b089b 100644
--- a/lib/puppet/network/handler/master.rb
+++ b/lib/puppet/network/handler/master.rb
@@ -56,7 +56,8 @@ class Puppet::Network::Handler
# Call our various handlers; this handler is getting deprecated.
def getconfig(facts, format = "marshal", client = nil, clientip = nil)
facts = decode_facts(facts)
- client, clientip = clientname(client, clientip, facts)
+
+ client ||= facts["hostname"]
# Pass the facts to the fact handler
Puppet::Node::Facts.new(client, facts).save unless local?
@@ -66,27 +67,6 @@ class Puppet::Network::Handler
return translate(catalog.extract)
end
- private
-
- # Manipulate the client name as appropriate.
- def clientname(name, ip, facts)
- # Always use the hostname from Facter.
- client = facts["hostname"]
- clientip = facts["ipaddress"]
- if Puppet[:node_name] == 'cert'
- if name
- client = name
- facts["fqdn"] = client
- facts["hostname"], facts["domain"] = client.split('.', 2)
- end
- if ip
- clientip = ip
- end
- end
-
- return client, clientip
- end
-
#
def decode_facts(facts)
if @local