hiera hash to create_resources bombing - looking for how to troubleshoot

88 views
Skip to first unread message

Dan White

unread,
May 28, 2014, 3:24:12 PM5/28/14
to Puppet Users Mailing List
I found this reported bug:
https://tickets.puppetlabs.com/browse/PUP-1100

Any clue how to debug it ?
This hit me when moving from Puppet 3.5.1 on RHEL 5 to Puppet 3.6.0 on RHEL 6
The defined type that it is barfing on is moderately complicated.
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”  (Bill Waterson: Calvin & Hobbes)

Clayton O'Neill

unread,
May 28, 2014, 6:56:42 PM5/28/14
to puppet...@googlegroups.com
I've run into this a few times and I've found that looking at the server logs, or running the puppet master with --trace usually gives me enough information to work out where the error is being generated.


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1a3da45c-307a-473f-9b6d-d3652eefef01%40me.com.
For more options, visit https://groups.google.com/d/optout.

Spencer Krum

unread,
May 28, 2014, 7:55:40 PM5/28/14
to puppet...@googlegroups.com
Creating a single instance of the defined type using the puppet syntax should help you see the errors.



For more options, visit https://groups.google.com/d/optout.



--
Spencer Krum
(619)-980-7820

Dan White

unread,
May 28, 2014, 9:04:07 PM5/28/14
to Puppet Users Mailing List
Thanks, gentlemen, for the suggestions.
I will try both tomorrow.

For the single instance, should I do it explicitly in the dot-pp file or should I do it thru hiera ?  If I do not get a response in time, I will try both ways.

Looking forward to Puppet Camp in DC next week.


For more options, visit https://groups.google.com/d/optout.
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” 
Bill Waterson (Calvin & Hobbes)

Spencer Krum

unread,
May 29, 2014, 3:05:32 AM5/29/14
to puppet...@googlegroups.com
I would do it in a .pp file. Removing as many variables as possible is a good thing.



For more options, visit https://groups.google.com/d/optout.



--
Spencer Krum
(619)-980-7820

Dan White

unread,
May 29, 2014, 8:37:29 AM5/29/14
to puppet...@googlegroups.com
Found it !
A stray case change in an exec resource ( command --> Command )

Many thanks.
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”  (Bill Waterson: Calvin & Hobbes)

Corey Osman

unread,
Sep 26, 2014, 12:50:28 PM9/26/14
to puppet...@googlegroups.com
I created a puppet function to help with debugging things the contents of variables.  I am going to see if this can be added to std lib.  However for now, just put this in your module code under lib/puppet/parser/functions.  You will want to have at least one rspec unit test for speedy results, otherwise you will need to search a bunch of logs for the value during your puppet run.

I can't say enough how useful this is when used with a unit test (rspec-puppet)

usage:  dump_args($somevar1, $somevar2, $somevar3, ...)  (anywhere in your puppet code for debugging only)


I see that you already solved it, but keep this in mind for later as knowing which variables are not being populated correctly is extremely useful since variable contents are difficult to see.

Corey
Reply all
Reply to author
Forward
0 new messages