Larry Fast
2013-May-02 20:43 UTC
[Puppet Users] What do YOU do to catch undefined variables
I''m still a puppet newbie and these days I''m struggling with undefined variables. At least once a week I hit an error message like this: Error: Failed to apply catalog: '''' is not qualified and no path was specified. Please qualify the command or specify a path. IMO, the core issue is that Puppet has no mechanism for reporting read attempts on undefined variables. So my question to the community is, what do YOU do to catch undefined variables? If anyone has a first class solution I''d love to hear it. But I''m also happy to consider ANY means to detect undefined variables. I may resort to explicitly listing all my variables and checking them with a custom ruby function. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
David Schmitt
2013-May-03 09:12 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
On 02.05.2013 22:43, Larry Fast wrote:> I''m still a puppet newbie and these days I''m struggling with undefined > variables. At least once a week I hit an error message like this: > Error: Failed to apply catalog: '''' is not qualified and no path > was specified. Please qualify the command or specify a path. > > IMO, the core issue is that Puppet has no mechanism for reporting read > attempts on undefined variables. So my question to the community is, > what do YOU do to catch undefined variables? If anyone has a first > class solution I''d love to hear it. But I''m also happy to consider ANY > means to detect undefined variables. I may resort to explicitly listing > all my variables and checking them with a custom ruby function.Hmm, I''m using geppetto (the puppet eclipse integration from cloudsmith) which catches typos as they happen. I''m very satisfied with it and undefined variables ain''t one of my problems ;-) Regards, David -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Larry Fast
2013-May-03 15:16 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
On Friday, May 3, 2013 2:12:41 AM UTC-7, David Schmitt wrote:> > On 02.05.2013 22:43, Larry Fast wrote: > > I''m still a puppet newbie and these days I''m struggling with undefined > > variables. At least once a week I hit an error message like this: > > Error: Failed to apply catalog: '''' is not qualified and no path > > was specified. Please qualify the command or specify a path. > > > > IMO, the core issue is that Puppet has no mechanism for reporting read > > attempts on undefined variables. So my question to the community is, > > what do YOU do to catch undefined variables? If anyone has a first > > class solution I''d love to hear it. But I''m also happy to consider ANY > > means to detect undefined variables. I may resort to explicitly listing > > all my variables and checking them with a custom ruby function. > > Hmm, I''m using geppetto (the puppet eclipse integration from cloudsmith) > which catches typos as they happen. > > I''m very satisfied with it and undefined variables ain''t one of my > problems ;-) > > > Regards, David > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Larry Fast
2013-May-03 15:18 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
...finger slipped... Thanks David, I started using geppetto as well. Yes, my error count has dropped significantly. The other thing I discovered is that hiera("name") produces a very clear error if the name doesn''t exist. So I moving toward that as well. Cheers larry -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Peter Brown
2013-May-06 22:41 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
On 3 May 2013 06:43, Larry Fast <lfast1234@gmail.com> wrote:> I''m still a puppet newbie and these days I''m struggling with undefined > variables. At least once a week I hit an error message like this: > Error: Failed to apply catalog: '''' is not qualified and no path was > specified. Please qualify the command or specify a path. > > IMO, the core issue is that Puppet has no mechanism for reporting read > attempts on undefined variables. So my question to the community is, what > do YOU do to catch undefined variables? If anyone has a first class > solution I''d love to hear it. But I''m also happy to consider ANY means to > detect undefined variables. I may resort to explicitly listing all my > variables and checking them with a custom ruby function. >I use vim with vim-puppet (and a bunch of other vim plugins). It does syntax highlighting and does syntax and a few other check on saving a file and lets you know if something is amiss. I tried Gepetto but I can''t us that over an ssh connection to a server if I need to. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Nikola Petrov
2013-May-10 15:08 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
+1 The vim plugin is the best you can find if you are already proficient in vim somewhat. I use it in conjuction with https://github.com/SirVer/ultisnips and it can''t be better. I found the eclipse too heavy for my needs(although I use it for java development where it shines) -- Nikola On Tue, May 07, 2013 at 08:41:42AM +1000, Peter Brown wrote:> On 3 May 2013 06:43, Larry Fast <lfast1234@gmail.com> wrote: > > > I''m still a puppet newbie and these days I''m struggling with undefined > > variables. At least once a week I hit an error message like this: > > Error: Failed to apply catalog: '''' is not qualified and no path was > > specified. Please qualify the command or specify a path. > > > > IMO, the core issue is that Puppet has no mechanism for reporting read > > attempts on undefined variables. So my question to the community is, what > > do YOU do to catch undefined variables? If anyone has a first class > > solution I''d love to hear it. But I''m also happy to consider ANY means to > > detect undefined variables. I may resort to explicitly listing all my > > variables and checking them with a custom ruby function. > > > > I use vim with vim-puppet (and a bunch of other vim plugins). > It does syntax highlighting and does syntax and a few other check on saving > a file and lets you know if something is amiss. > > I tried Gepetto but I can''t us that over an ssh connection to a server if I > need to. > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
David Schmitt
2013-May-10 20:43 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
On 10.05.2013 17:08, Nikola Petrov wrote:> +1 > > The vim plugin is the best you can find if you are already proficient > in vim somewhat. I use it in conjuction with > https://github.com/SirVer/ultisnips and it can''t be better. I found the > eclipse too heavy for my needs(although I use it for java development > where it shines) >Please satisfy my curiosity: how many puppet modules and/or .pp files do you currently have? Regards, David -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Pete Brown
2013-May-13 06:04 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
On 11 May 2013 06:43, David Schmitt <david@dasz.at> wrote:> On 10.05.2013 17:08, Nikola Petrov wrote: > >> +1 >> >> The vim plugin is the best you can find if you are already proficient >> in vim somewhat. I use it in conjuction with >> https://github.com/SirVer/**ultisnips<https://github.com/SirVer/ultisnips>and it can''t be better. I found the >> eclipse too heavy for my needs(although I use it for java development >> where it shines) >> >> > Please satisfy my curiosity: how many puppet modules and/or .pp files do > you currently have? >I currently have at least 40 modules in my setup. Closer to 50 if you count the few I am still finishing off or converting. A lot of those I wrote by hand with vim. I have no idea how many .pp files that involves. Probably 50 X 5-7 so probably over 300 .pp files More if you count the few nodes definitions that aren''t in my ENC. I installed geppetto and made a start at trying to work out how to get it setup to replace my vim config but I gave up and just went back to using vim. It also eats a bunch of ram so it didn''t seem worth it just to use for writing something I can do for very little memory footprint with vim.> > Regards, David > > > -- > 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+unsubscribe@**googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/**group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en> > . > For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Nikola Petrov
2013-May-13 14:07 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
I/We currently have 32 modules - some of these are of course third party so they don''t count. One of the modules is for our biggest project which consists of different components and their configuration based on different environment setups. That module currently contains 36 *.pp files. If you think vim can''t scale I can assure you that it can. Lately I''ve been using https://github.com/santana/puppet-cleaner to clean my pp files and while it is still possible with eclipse to do the same it feels so unnatural. Maybe eclipse can give many more features like variable checking in the current scope but I found that you also pay a price for that integration. There is no free lunch. -- Nikola On Fri, May 10, 2013 at 10:43:43PM +0200, David Schmitt wrote:> On 10.05.2013 17:08, Nikola Petrov wrote: > >+1 > > > >The vim plugin is the best you can find if you are already proficient > >in vim somewhat. I use it in conjuction with > >https://github.com/SirVer/ultisnips and it can''t be better. I found the > >eclipse too heavy for my needs(although I use it for java development > >where it shines) > > > > Please satisfy my curiosity: how many puppet modules and/or .pp > files do you currently have? > > > Regards, David > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Jakov Sosic
2013-Jul-07 22:04 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
On 05/10/2013 10:43 PM, David Schmitt wrote:> On 10.05.2013 17:08, Nikola Petrov wrote: >> +1 >> >> The vim plugin is the best you can find if you are already proficient >> in vim somewhat. I use it in conjuction with >> https://github.com/SirVer/ultisnips and it can''t be better. I found the >> eclipse too heavy for my needs(although I use it for java development >> where it shines) >> > > Please satisfy my curiosity: how many puppet modules and/or .pp files do > you currently have?In my case (I also use vim + vim-puppet), ~ 66 modules, ~200+ pp files. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Wil Cooley
2013-Jul-08 16:50 UTC
Re: [Puppet Users] What do YOU do to catch undefined variables
On May 2, 2013 1:45 PM, "Larry Fast" <lfast1234@gmail.com> wrote:> > IMO, the core issue is that Puppet has no mechanism for reporting readattempts on undefined variables. So my question to the community is, what do YOU do to catch undefined variables? If anyone has a first class solution I''d love to hear it. But I''m also happy to consider ANY means to detect undefined variables. I may resort to explicitly listing all my variables and checking them with a custom ruby function.>If you are comfortable with Ruby (or willing & able to learn it), rspec-puppet should catch most or all of these. Wil -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.