Francis Pereira
2013-Mar-19 13:29 UTC
[Puppet Users] Verbose debugging of template variable binding ?
I seem to have made some error in my template but cant seem find a way to debug it except for removing (deleting) parts of the template file and figuring out where there is a mistake. On my puppetmaster with --debug I get the following error debug: template[/etc/puppet/manifests/lib/redis/templates/redis.conf.erb]: Bound template variables for /etc/puppet/manifests/lib/redis/templates/redis.conf.erb in 0.00 seconds On the client I get err: Could not retrieve catalog from remote server: No content type in http response; cannot parse. I am certain that there is something wrong in my template. How do I debug binding of template variables ? Is there a verbose mode that would tell me where the binding breaks ? The template is available at https://github.com/7terminals/puppet-redis/blob/master/templates/redis.conf.erband the full module is hosted at https://github.com/7terminals/puppet-redis/ Ironically, when running in standalone mode i.e puppet apply tests/ini.pp this module/template seems to work. ~Francis -- 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.
Felix Frank
2013-Mar-19 14:11 UTC
Re: [Puppet Users] Verbose debugging of template variable binding ?
On 03/19/2013 02:29 PM, Francis Pereira wrote:> On my puppetmaster with --debug I get the following error > debug: > template[/etc/puppet/manifests/lib/redis/templates/redis.conf.erb]: > Bound template variables for > /etc/puppet/manifests/lib/redis/templates/redis.conf.erb in 0.00 secondsHmm, that doesn''t look like an error at all. It seems to be just another debug message. Are you sure the template is what''s causing breakage? Regards, Felix -- 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.
Francis Pereira
2013-Mar-19 14:41 UTC
Re: [Puppet Users] Verbose debugging of template variable binding ?
That''s the last line I get on the master. After that the client run stops. ~Francis On Mar 19, 2013, at 7:42 PM, Felix Frank <felix.frank@alumni.tu-berlin.de> wrote:> On 03/19/2013 02:29 PM, Francis Pereira wrote: >> On my puppetmaster with --debug I get the following error >> debug: >> template[/etc/puppet/manifests/lib/redis/templates/redis.conf.erb]: >> Bound template variables for >> /etc/puppet/manifests/lib/redis/templates/redis.conf.erb in 0.00 seconds > > Hmm, that doesn''t look like an error at all. It seems to be just another > debug message. > > Are you sure the template is what''s causing breakage? > > Regards, > Felix > > -- > 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.
Felix Frank
2013-Mar-19 14:49 UTC
Re: [Puppet Users] Verbose debugging of template variable binding ?
All right, so - what happens if you remove that resource from the manifest, or remove the content => parameter from the resource? (Do use --noop on the agent side). Felix On 03/19/2013 03:41 PM, Francis Pereira wrote:> That''s the last line I get on the master. After that the client run stops. > > ~Francis > > On Mar 19, 2013, at 7:42 PM, Felix Frank > <felix.frank@alumni.tu-berlin.de> wrote: > >> > On 03/19/2013 02:29 PM, Francis Pereira wrote: >>> >> On my puppetmaster with --debug I get the following error >>> >> debug: >>> >> template[/etc/puppet/manifests/lib/redis/templates/redis.conf.erb]: >>> >> Bound template variables for >>> >> /etc/puppet/manifests/lib/redis/templates/redis.conf.erb in 0.00 seconds-- 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.
Francis Pereira
2013-Mar-19 15:26 UTC
Re: [Puppet Users] Verbose debugging of template variable binding ?
Works as expected when the content parameter is # ~Francis On Mar 19, 2013, at 8:19 PM, Felix Frank <felix.frank@alumni.tu-berlin.de> wrote:> All right, so - what happens if you remove that resource from the > manifest, or remove the content => parameter from the resource? > (Do use --noop on the agent side). > > Felix > > On 03/19/2013 03:41 PM, Francis Pereira wrote: >> That''s the last line I get on the master. After that the client run stops. >> >> ~Francis >> >> On Mar 19, 2013, at 7:42 PM, Felix Frank >> <felix.frank@alumni.tu-berlin.de> wrote: >> >>>> On 03/19/2013 02:29 PM, Francis Pereira wrote: >>>>>> On my puppetmaster with --debug I get the following error >>>>>> debug: >>>>>> template[/etc/puppet/manifests/lib/redis/templates/redis.conf.erb]: >>>>>> Bound template variables for >>>>>> /etc/puppet/manifests/lib/redis/templates/redis.conf.erb in 0.00 seconds > > -- > 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.
Felix Frank
2013-Mar-19 15:31 UTC
Re: [Puppet Users] Verbose debugging of template variable binding ?
Hmm, I''m about stumped then. Sorry. Regards, Felix On 03/19/2013 04:26 PM, Francis Pereira wrote:> Works as expected when the content parameter is # > > > > ~Francis-- 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.
Ellison Marks
2013-Mar-19 17:34 UTC
[Puppet Users] Re: Verbose debugging of template variable binding ?
If it''s working using the declaration from your tests directory, but not from your master, then it stands to reason that either something is wrong with the way you''re calling it on the master or something is wrong in your master setup that is causing a communication error. Could you post how you''re calling it from your master? On Tuesday, March 19, 2013 6:29:12 AM UTC-7, Francis Pereira wrote:> > I seem to have made some error in my template but cant seem find a way to > debug it except for removing (deleting) parts of the template file and > figuring out where there is a mistake. > > On my puppetmaster with --debug I get the following error > debug: template[/etc/puppet/manifests/lib/redis/templates/redis.conf.erb]: > Bound template variables for > /etc/puppet/manifests/lib/redis/templates/redis.conf.erb in 0.00 seconds > > On the client I get > err: Could not retrieve catalog from remote server: No content type in > http response; cannot parse. > > I am certain that there is something wrong in my template. How do I debug > binding of template variables ? Is there a verbose mode that would tell me > where the binding breaks ? > > The template is available at > https://github.com/7terminals/puppet-redis/blob/master/templates/redis.conf.erband the full module is hosted at > https://github.com/7terminals/puppet-redis/ > > Ironically, when running in standalone mode i.e puppet apply tests/ini.pp > this module/template seems to work. > > > ~Francis > >-- 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.
Francis Pereira
2013-Mar-20 06:09 UTC
Re: [Puppet Users] Re: Verbose debugging of template variable binding ?
Figured it out - by removing the line ''daemonize <%= daemonize %>'' from the template, the template works as expected. Looks like the variable whose name is deamonize ( <%= daemonize %>) for some reason does not play nice in a template. Can someone shed some light on reserved variables in templates ~Francis On Tue, Mar 19, 2013 at 11:04 PM, Ellison Marks <gtyaoi@gmail.com> wrote:> If it''s working using the declaration from your tests directory, but not > from your master, then it stands to reason that either something is wrong > with the way you''re calling it on the master or something is wrong in your > master setup that is causing a communication error. Could you post how > you''re calling it from your master? > > > On Tuesday, March 19, 2013 6:29:12 AM UTC-7, Francis Pereira wrote: >> >> I seem to have made some error in my template but cant seem find a way to >> debug it except for removing (deleting) parts of the template file and >> figuring out where there is a mistake. >> >> On my puppetmaster with --debug I get the following error >> debug: template[/etc/puppet/**manifests/lib/redis/templates/**redis.conf.erb]: >> Bound template variables for /etc/puppet/manifests/lib/**redis/templates/redis.conf.erb >> in 0.00 seconds >> >> On the client I get >> err: Could not retrieve catalog from remote server: No content type in >> http response; cannot parse. >> >> I am certain that there is something wrong in my template. How do I debug >> binding of template variables ? Is there a verbose mode that would tell me >> where the binding breaks ? >> >> The template is available at https://github.com/7terminals/** >> puppet-redis/blob/master/**templates/redis.conf.erb<https://github.com/7terminals/puppet-redis/blob/master/templates/redis.conf.erb>and the full module is hosted at >> https://github.com/7terminals/**puppet-redis/<https://github.com/7terminals/puppet-redis/> >> >> Ironically, when running in standalone mode i.e puppet apply tests/ini.pp >> this module/template seems to work. >> >> >> ~Francis >> >> -- > 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.
Francis Pereira
2013-Mar-20 07:09 UTC
Re: [Puppet Users] Re: Verbose debugging of template variable binding ?
Looks like this is related to https://projects.puppetlabs.com/issues/9901 I have changed ''daemonize <%= daemonize %>'' to ''daemonize <%= @daemonize %>'' and it seems to work. The variable daemonize seems to collide with Ruby method names as docuimented here http://docs.puppetlabs.com/guides/templating.html Helpful error messages would be nice in these cases ~Francis On Wed, Mar 20, 2013 at 11:39 AM, Francis Pereira < francispereira@7terminals.com> wrote:> Figured it out - by removing the line ''daemonize <%= daemonize %>'' from > the template, the template works as expected. Looks like the variable whose > name is deamonize ( <%= daemonize %>) for some reason does not play nice > in a template. Can someone shed some light on reserved variables in > templates > > > ~Francis > > > On Tue, Mar 19, 2013 at 11:04 PM, Ellison Marks <gtyaoi@gmail.com> wrote: > >> If it''s working using the declaration from your tests directory, but not >> from your master, then it stands to reason that either something is wrong >> with the way you''re calling it on the master or something is wrong in your >> master setup that is causing a communication error. Could you post how >> you''re calling it from your master? >> >> >> On Tuesday, March 19, 2013 6:29:12 AM UTC-7, Francis Pereira wrote: >>> >>> I seem to have made some error in my template but cant seem find a way >>> to debug it except for removing (deleting) parts of the template file and >>> figuring out where there is a mistake. >>> >>> On my puppetmaster with --debug I get the following error >>> debug: template[/etc/puppet/**manifests/lib/redis/templates/**redis.conf.erb]: >>> Bound template variables for /etc/puppet/manifests/lib/**redis/templates/redis.conf.erb >>> in 0.00 seconds >>> >>> On the client I get >>> err: Could not retrieve catalog from remote server: No content type in >>> http response; cannot parse. >>> >>> I am certain that there is something wrong in my template. How do I >>> debug binding of template variables ? Is there a verbose mode that would >>> tell me where the binding breaks ? >>> >>> The template is available at https://github.com/7terminals/** >>> puppet-redis/blob/master/**templates/redis.conf.erb<https://github.com/7terminals/puppet-redis/blob/master/templates/redis.conf.erb>and the full module is hosted at >>> https://github.com/7terminals/**puppet-redis/<https://github.com/7terminals/puppet-redis/> >>> >>> Ironically, when running in standalone mode i.e puppet apply >>> tests/ini.pp this module/template seems to work. >>> >>> >>> ~Francis >>> >>> -- >> 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.
Felix Frank
2013-Mar-20 09:02 UTC
Re: [Puppet Users] Re: Verbose debugging of template variable binding ?
On 03/20/2013 08:09 AM, Francis Pereira wrote:> Looks like this is related > to https://projects.puppetlabs.com/issues/9901 I have changed ''daemonize > <%= daemonize %>'' to ''daemonize <%= @daemonize %>'' and it seems to work. > > The variable daemonize seems to collide with Ruby method names as > docuimented here http://docs.puppetlabs.com/guides/templating.htmlGood find!> Helpful error messages would be nice in these casesHumm, difficult - the problem originates in the bowels of the erb engine I presume. Calling a daemonize method is not even strictly illegal, so there is likely no exception to catch and process. Perhaps it can be made illegal. I''ll take a look at that bug report some time. Cheers, Felix -- 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.