Nam Nguyen
2013-May-24 04:09 UTC
[Puppet Users] Suppress deprecation warnings because of Referencing Variables
Hey guys, after upgrading Puppet to version 3.2.1 I got lots of warning like this: Warning: Variable access via ''logroot'' is deprecated. Use ''@logroot'' instead. template[/etc/puppet/modules/apache/templates/vhost-default.conf.erb]:24 I used puppet many modules which don''t use @ or $ in front of reference variables, so I will be a pain to fix them all. Is there any way I can suppress (hide | disable) these warnings? NN. -- 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.
jcbollinger
2013-May-24 14:10 UTC
[Puppet Users] Re: Suppress deprecation warnings because of Referencing Variables
On Thursday, May 23, 2013 11:09:51 PM UTC-5, Nam Nguyen wrote:> > Hey guys, > after upgrading Puppet to version 3.2.1 I got lots of warning like this: > > Warning: Variable access via ''logroot'' is deprecated. Use ''@logroot'' > instead. > template[/etc/puppet/modules/apache/templates/vhost-default.conf.erb]:24 > > I used puppet many modules which don''t use @ or $ in front of reference > variables, so I will be a pain to fix them all. > Is there any way I can suppress (hide | disable) these warnings? > >I don''t know about suppressing the warnings, but unless you intend to stop at Puppet 3.2, you really ought to fix them. Deprecation is a prelude to feature removal, so you can expect that your templates will no longer work with some future version of Puppet. You can put off changes until then if you want, but I''d recommend that you do the work now. That will help you avoid making more future work for yourself, by causing new uses of the deprecated style to stand out. John -- 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.
Christopher Rutter
2013-May-24 14:13 UTC
[Puppet Users] Re: Suppress deprecation warnings because of Referencing Variables
I am in the same boat here. For example there are a few puppetlabs modules that currently don''t have a stable release that fixes this: - https://github.com/puppetlabs/puppetlabs-mysql - tag 0.6.1 (pull request <https://github.com/puppetlabs/puppetlabs-mysql/pull/185>) - https://github.com/puppetlabs/puppetlabs-apache - tag 0.6.0 (fixed in master branch) - https://github.com/puppetlabs/puppetlabs-apt - tag 1.1.0 (pull request<https://github.com/puppetlabs/puppetlabs-apt/pull/116> ) And this isn''t even all of them, only the ones that I use... Sure this issue is addressed in the master branch of these modules (or pending pull requests, that I just submitted today) but I don''t feel comfortable running ''master'' in production. Heck, even the documentation<http://docs.puppetlabs.com/guides/templating.html> ("iteration" section and below) breaks down halfway down the page and stops using the ''@''. I feel like this new "warning" might have been a bit premature, then again, I suppose this will force people to fix the problem. -Chris On Friday, May 24, 2013 12:09:51 AM UTC-4, Nam Nguyen wrote:> > Hey guys, > after upgrading Puppet to version 3.2.1 I got lots of warning like this: > > Warning: Variable access via ''logroot'' is deprecated. Use ''@logroot'' > instead. > template[/etc/puppet/modules/apache/templates/vhost-default.conf.erb]:24 > > I used puppet many modules which don''t use @ or $ in front of reference > variables, so I will be a pain to fix them all. > Is there any way I can suppress (hide | disable) these warnings? > > NN. > >-- 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.
Nam Nguyen
2013-May-24 15:39 UTC
[Puppet Users] Re: Suppress deprecation warnings because of Referencing Variables
John, thanks so much for your notice, yes I thought about this too, and, now I think I should spend sometime fixing them rather than suppressing. At first I was frustrated because of so many warning, but now I got it, I dont think I should stop at version < 3.2. NN On Friday, May 24, 2013 9:10:53 PM UTC+7, jcbollinger wrote:> > > > On Thursday, May 23, 2013 11:09:51 PM UTC-5, Nam Nguyen wrote: >> >> Hey guys, >> after upgrading Puppet to version 3.2.1 I got lots of warning like this: >> >> Warning: Variable access via ''logroot'' is deprecated. Use ''@logroot'' >> instead. >> template[/etc/puppet/modules/apache/templates/vhost-default.conf.erb]:24 >> >> I used puppet many modules which don''t use @ or $ in front of reference >> variables, so I will be a pain to fix them all. >> Is there any way I can suppress (hide | disable) these warnings? >> >> > I don''t know about suppressing the warnings, but unless you intend to stop > at Puppet 3.2, you really ought to fix them. Deprecation is a prelude to > feature removal, so you can expect that your templates will no longer work > with some future version of Puppet. You can put off changes until then if > you want, but I''d recommend that you do the work now. That will help you > avoid making more future work for yourself, by causing new uses of the > deprecated style to stand out. > > > John > >-- 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.
Martijn
2013-May-28 08:25 UTC
[Puppet Users] Re: Suppress deprecation warnings because of Referencing Variables
Op vrijdag 24 mei 2013 16:13:49 UTC+2 schreef Christopher Rutter het volgende:> > I feel like this new "warning" might have been a bit premature, then > again, I suppose this will force people to fix the problem. > -Chris > >That''s exactly what a deprecation warning is for. It doesn''t break anything yet, but gets people to take notice. :-) Thankfully, deprecation warnings only show when the puppet master is restarted. Regards, Martijn -- 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.
Eric Sorenson
2013-May-28 19:22 UTC
[Puppet Users] Re: Suppress deprecation warnings because of Referencing Variables
Chris, thanks very much for the pull requests to fix the modules. I''ll work up a fix for the docs; it looks like in particular the second bullet at http://docs.puppetlabs.com/guides/templating.html#referencing-variables needs to reflect the deprecation and, as you note, the second half still uses the bareword. As an aside it''s totally awesome that people are picking up on all the new stuff in the 3.2 release. Keep ''em coming! eric0 On Friday, May 24, 2013 7:13:49 AM UTC-7, Christopher Rutter wrote:> > I am in the same boat here. For example there are a few puppetlabs modules > that currently don''t have a stable release that fixes this: > > - https://github.com/puppetlabs/puppetlabs-mysql - tag 0.6.1 (pull > request <https://github.com/puppetlabs/puppetlabs-mysql/pull/185>) > - https://github.com/puppetlabs/puppetlabs-apache - tag 0.6.0 (fixed > in master branch) > - https://github.com/puppetlabs/puppetlabs-apt - tag 1.1.0 (pull > request <https://github.com/puppetlabs/puppetlabs-apt/pull/116>) > > And this isn''t even all of them, only the ones that I use... > Sure this issue is addressed in the master branch of these modules (or > pending pull requests, that I just submitted today) but I don''t feel > comfortable running ''master'' in production. > > Heck, even the documentation<http://docs.puppetlabs.com/guides/templating.html> ("iteration" > section and below) breaks down halfway down the page and stops using the > ''@''. > I feel like this new "warning" might have been a bit premature, then > again, I suppose this will force people to fix the problem. > -Chris > > > On Friday, May 24, 2013 12:09:51 AM UTC-4, Nam Nguyen wrote: >> >> Hey guys, >> after upgrading Puppet to version 3.2.1 I got lots of warning like this: >> >> Warning: Variable access via ''logroot'' is deprecated. Use ''@logroot'' >> instead. >> template[/etc/puppet/modules/apache/templates/vhost-default.conf.erb]:24 >> >> I used puppet many modules which don''t use @ or $ in front of reference >> variables, so I will be a pain to fix them all. >> Is there any way I can suppress (hide | disable) these warnings? >> >> NN. >> >>-- 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.