Debugging manifests with Future Parser

214 views
Skip to first unread message

Jason Knudsen

unread,
May 20, 2014, 3:53:39 PM5/20/14
to puppet...@googlegroups.com
Hey team,

Testing the waters with the new Future Parser functionality. 

I've enabled it in [main] and [master] with parser = future, in my puppet.conf, and am running puppet v3.5.1. Earlier versions of puppet (namely, 3.4.2) worked fine with this setting enabled and the exact same modules. I know a lot of changes went into 3.5.0 and I'm trying to track down why it's failing..

Puppet runs look like this:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Found 4 errors. Giving up in /opt/puppet/modules/nagios/manifests/init.pp on node <hostname>
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

With --debug and --verbose it fails similarly without any additional information. This is a big module so it's hard to determine exactly what's failing.

Any advice on how to debug the parser itself, or get additional output as to what those 4 errors could be?

Thanks,
Jason

Christopher Wood

unread,
May 20, 2014, 4:05:33 PM5/20/14
to puppet...@googlegroups.com
If you run your puppetmaster in the foreground with debug enabled it might tell you more. (You'll have to stop the usual daemon first, and run it as the usual user not root.)

puppet master --debug --no-daemonize 2>&1 | tee /var/tmp/pm1.log

Also use --config in there if you need it, of course.
> --
> 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 [1]puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:puppet-users...@googlegroups.com
> 2. https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout

Jason Knudsen

unread,
May 20, 2014, 4:20:37 PM5/20/14
to puppet...@googlegroups.com, christop...@pobox.com
Thanks for the tip, worked like a charm. Turns out I had some variables with an uppercase first letter.

Got past that, but now I'm also dealing with something else unexpected.

Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, In Puppet::Pops::Types::PResourceType : Can not use a Hash where a String is expected at /opt/puppet/modules/nagios/manifests/init.pp:306:5 on node <hostname>
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Basically, in the Nagios module we loop through a hash of servers we pull from our ENC's API:

serverLoop { $enc_api::servers: }

Has the behavior altered for define's?

Jason

Christopher Wood

unread,
May 20, 2014, 4:42:04 PM5/20/14
to puppet...@googlegroups.com
Sorry, I've stayed at 3.4.3 so that the exciting things can happen to other people for a while.

Were I debugging this, I'd check my data to make sure that everything was the same as from 3.4.2 and then try to reproduce using the simplest pp file I could (then maybe file a bug).
> >    email to [1][1]puppet-users...@googlegroups.com.
> >    To view this discussion on the web visit
> >  
>  [2][2]https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com.
> >    For more options, visit [3][3]https://groups.google.com/d/optout.
> >
> > References
> >
> >    Visible links
> >    1. mailto:[4]puppet-users...@googlegroups.com
> >    2.
> [5]https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com?utm_medium=email&utm_source=footer
> >    3. [6]https://groups.google.com/d/optout
>
> --
> 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 [7]puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [8]https://groups.google.com/d/msgid/puppet-users/cef444e1-3c74-4e75-b1ef-e23d54b21088%40googlegroups.com.
> For more options, visit [9]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. javascript:
> 2. https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com
> 3. https://groups.google.com/d/optout
> 4. javascript:
> 5. https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com?utm_medium=email&utm_source=footer
> 6. https://groups.google.com/d/optout
> 7. mailto:puppet-users...@googlegroups.com
> 8. https://groups.google.com/d/msgid/puppet-users/cef444e1-3c74-4e75-b1ef-e23d54b21088%40googlegroups.com?utm_medium=email&utm_source=footer
> 9. https://groups.google.com/d/optout

Jason Knudsen

unread,
May 20, 2014, 5:04:39 PM5/20/14
to puppet...@googlegroups.com, christop...@pobox.com
Hah, indeed. 3.5.0 has introduced some fun changes ;-) Thanks for your help!
>      >    1. mailto:[4]puppet-users+unsub...@googlegroups.com
>      >    2.
>      [5]https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com?utm_medium=email&utm_source=footer
>      >    3. [6]https://groups.google.com/d/optout
>
>    --
>    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 [7]puppet-users...@googlegroups.com.
>    To view this discussion on the web visit
>    [8]https://groups.google.com/d/msgid/puppet-users/cef444e1-3c74-4e75-b1ef-e23d54b21088%40googlegroups.com.
>    For more options, visit [9]https://groups.google.com/d/optout.
>
> References
>
>    Visible links
>    1. javascript:
>    2. https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com
>    3. https://groups.google.com/d/optout
>    4. javascript:
>    5. https://groups.google.com/d/msgid/puppet-users/00afc037-6239-4678-b17d-cd3720d1ce63%40googlegroups.com?utm_medium=email&utm_source=footer
>    6. https://groups.google.com/d/optout
Reply all
Reply to author
Forward
0 new messages