One of the nice features of using the Tidy resource to prune a directory hierarchy in puppet is that any File resources you create within that tree will not be touched. However, the tidy resource *will* log that it is tidying them. This is not good. I like puppet to log any changes it makes so that logwatch can pick them up - puppet should only need to make changes if the state of the node is not as described. Unfortunately, with the Tidy logging as it is, where I want to tidy any files not managed by puppet I either have to set the loglevel for the tidy resource so that it doesn''t log *anything* or suffer spurious log messages and explicitly filter them out on the logwatch side. I think it would be reasonable of puppet not to log the tidying of files which are not actually tidied. Do people agree? In which case I''ll file a bug report. Or have I missed a clean way of resolving this? -- Bruce A problem shared brings the consolation that someone else is now feeling as miserable as you. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, Oct 06, 2010 at 02:06:29PM +0100, Bruce Richardson wrote:> I think it would be reasonable of puppet not to log the tidying of files > which are not actually tidied. Do people agree? In which case I''ll > file a bug report. Or have I missed a clean way of resolving this?In fact, I''m finding that I can''t do anything to change the loglevel on any tidy resource. This is using Puppet 0.25.5. I don''t see any closed or open bugs on this topic in Redmine - can anybody else check and see if this is an issue or has been resolved in 2.6 ? -- Bruce Remember you''re a Womble. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Oct 6, 2010, at 6:06 AM, Bruce Richardson wrote:> One of the nice features of using the Tidy resource to prune a directory > hierarchy in puppet is that any File resources you create within that > tree will not be touched. However, the tidy resource *will* log that it > is tidying them. This is not good. I like puppet to log any changes it > makes so that logwatch can pick them up - puppet should only need to > make changes if the state of the node is not as described. > Unfortunately, with the Tidy logging as it is, where I want to tidy any > files not managed by puppet I either have to set the loglevel for the > tidy resource so that it doesn''t log *anything* or suffer spurious log > messages and explicitly filter them out on the logwatch side. > > I think it would be reasonable of puppet not to log the tidying of files > which are not actually tidied. Do people agree? In which case I''ll > file a bug report. Or have I missed a clean way of resolving this?I didn''t quite understand what you said. I hope this general rule helps: If puppet is logging something about a resource every run AND not changing anything AND not failing, I think you should file a bug. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, Oct 06, 2010 at 09:18:07AM -0700, Patrick wrote:> > > I didn''t quite understand what you said.Here''s an example manifest that demonstrates both problems: file { ''/tmp/shared'': ensure => ''directory'' } file { ''/tmp/shared/notice'': ensure => ''file'' } file { ''/tmp/shared/verbose'': ensure => ''file'', loglevel => ''verbose'' } tidy { ''/tmp/shared'': recurse => true, loglevel => ''verbose'' } The first issue is about loglevel; at puppet''s default logging level, only the creation of the first two resources should be logged. In fact, the actions of the first two and the final (tidy) are logged, because tidy is ignoring loglevel. The second issue is that puppet is logging actions that do not take place. The tidy resource should delete all files in /tmp/shared *apart* from the ones created in the manifest. This is expected behaviour and this is what it does. It''s a handy way of making sure that a directory tree contains *only* the files you mean to be there. However, the imaginary deletion of those files is being logged. And because it is imaginary, and the files remain in place, it''s logged on *every* run.>I hope this general rule helps: > > If puppet is logging something about a resource every run AND not > changing anything AND not failing, I think you should file a bug.Done. -- Bruce Explota!: miles de lemmings no pueden estar equivocados. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.