Node.rb oddness

I've just spent the better part of 2 days trying to figure out some weird
catalog compilation issues I've been having. I think I nailed it down to
node.rb.

When I use the default timeout value of 10, and then manually run 'node.rb
fqdn', it takes just over 10s. All the Global and module parameters I have
in foreman seem to be in the returned output.

If I change the timeout to 20, the run takes 16 seconds. All the Global
and module parameters seem to be in the returned output.

With the former, I have all manner of errors in my puppet logs. Catalogs
failing, etc. With the latter, not so much. Running node.rb by hand
either way doesn't toss any errors at all.

However, If I comment out line 189 (result = read_cache(certname) ) in
node.rb, rerun 'node.rb fqdn' with the original timeout of 10s, I get a
'False' response. Which is one of the things I see in the puppet logs. With
that line uncommented, I get the catalog, presumably from cache and no
error. But I still get a 'False' response in my puppet logs.

Manually running node.rb with a timeout of 20 works fine.

Is that normal and expected behavior? The part about getting no "False"
response?

Thanks,
David

Sounds a bit like the URL in node.rb to Foreman could be incorrect, or
Foreman itself is having issues. I'd double check the settings at the
top, and see if you get any requests in /var/log/foreman/production.log.

You could also try commenting out the error handler (the
begin,rescue…end lines):

https://github.com/theforeman/puppet-foreman/blob/master/templates/external_node_v2.rb.erb#L327-L336

··· On 25/04/14 21:24, David Patterson wrote: > I've just spent the better part of 2 days trying to figure out some > weird catalog compilation issues I've been having. I think I nailed it > down to node.rb. > > When I use the default timeout value of 10, and then manually run > 'node.rb fqdn', it takes just over 10s. All the Global and module > parameters I have in foreman seem to be in the returned output. > > If I change the timeout to 20, the run takes 16 seconds. All the Global > and module parameters seem to be in the returned output. > > With the former, I have all manner of errors in my puppet > logs. Catalogs failing, etc. With the latter, not so much. Running > node.rb by hand either way doesn't toss any errors at all. > > However, If I comment out line 189 (result = read_cache(certname) ) in > node.rb, rerun 'node.rb fqdn' with the original timeout of 10s, I get a > 'False' response. Which is one of the things I see in the puppet logs. > With that line uncommented, I get the catalog, presumably from cache > and no error. But I still get a 'False' response in my puppet logs. > > Manually running node.rb with a timeout of 20 works fine. > > Is that normal and expected behavior? The part about getting no > "False" response?


Dominic Cleal
Red Hat Engineering