Actions
Bug #19081
opennode.rb failing with servers with large amount of facts (ips?)
Status:
New
Priority:
Normal
Assignee:
-
Category:
Foreman modules
Target version:
-
Description
Hey,
I recently had some boxes come under my management that have a super large amount of IPs on them, like, 500-600 individual ip addresses bound to them.
Foreman seems to ingest these facts really really slowly when /etc/puppet/node.rb is run. I end up getting a timeout after waiting around for 60 seconds:
[root@foreman ~]# /etc/puppet/node.rb host1.hostname.com Could not send facts to Foreman: Net::ReadTimeout
My solution was to raise this like so:
--- /etc/puppet/node.rb 2017-03-29 16:53:12.755852699 -0500 +++ /etc/puppet/node.rb.new 2017-03-29 16:47:06.660634862 -0500 @@ -107,6 +107,7 @@ def initialize_http(uri) res = Net::HTTP.new(uri.host, uri.port) res.use_ssl = uri.scheme == 'https' + res.read_timeout = 180 if res.use_ssl? if SETTINGS[:ssl_ca] && !SETTINGS[:ssl_ca].empty? res.ca_file = SETTINGS[:ssl_ca]
I know this is inelegant, first of all it should probably use SETTINGS[:enc_read_timeout] or something easier to configure, but closer to the issue, I'm not sure why it takes so long for Foreman to ingest these facts. I tried tracing through the code but wasn't really successful in figuring it out.
Actions