Ask Your Question
1

After upgrade from 3.2.3 to 3.3.2 certcheck fails

asked 2014-09-26 03:09:12 -0500

keefbaker gravatar image

Hi guys,

We've been using http://thatbytes.co.uk/2013/02/27/ins... to pull a trusted hostname through.

Since we updated to 3.3.2 we seem to get this error when running on the clients (which are all windows)

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined local variable or method `host' for Scope(Class[redacted]): Puppet::Parser::Scope at /etc/puppetlabs/puppet/modules/redacted/manifests/init.pp:15 on node Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

Line 15 is where it calls the custom piece of ruby above to get the trusted hostname from the cert.

I can "work-round" by using the hostname fact but I'd really rather not. Does anyone know what change might have caused this to start failing between these two versions?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-09-27 10:06:32 -0500

jonn gravatar image

The certcheck function is relying on some Puppet internals, which have now changed. I think you could use return compiler.node.name instead of return host in the function in order to get the old behaviour back, but that is probably going to be subject to breakage in the future in a similar way.

However, there's now a supported solution for this - trusted facts. Once you've enabled trusted facts, you can then use

$trusted[certname]

in your manifests to get the certname from the node's certificate.

edit flag offensive delete link more

Comments

Thanks Jonn. It looks like it might not be available in PE 3.3.2. I put trusted_node_data=true into my puppet.conf, gave it a restart and then altered the manifest but it seems to think $trusted isn't a hash yet. However until 3.4 comes out it does appear that return complier.node.name has done th

keefbaker gravatar imagekeefbaker ( 2014-09-29 03:54:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-26 03:09:12 -0500

Seen: 91 times

Last updated: Sep 27 '14