On the server - [puppetmasterd] reports = tagmail,store In my tagmail.conf file "all: user@example.com" works fine. "all, !test_class: user@example.com" still reports "test_class." Does this mean it''s not possible to exclude a class (tag) from the "all" designation? Or is this a bug? When I try "err: user@example.com" I get no reports when I use an intentionally broken test class that produces an "err." [host1]# puppetd -t --tags test notice: Ignoring cache err: Could not retrieve catalog: Could not parse for environment development: Syntax error at ''>''; expected ''}'' at /etc/puppet/manifests/classes/test.pp:3 Am I not getting a report because the puppetd process aborts due to the parse error? This is precisely the type of error I''d want to see. Or have I not configured reports correctly? I''m using version 0.24.1. Thanks for any help. Kent
On Jan 31, 2008, at 6:32 AM, Kenton Brede wrote:> On the server - > > [puppetmasterd] > reports = tagmail,store > > In my tagmail.conf file "all: user@example.com" works fine. > > "all, !test_class: user@example.com" still reports "test_class." > Does this mean it''s not possible to exclude a class (tag) from > the "all" designation? Or is this a bug?Hmm, looks like this is a bug -- I pass all messages every time if you specify ''all''.> > When I try "err: user@example.com" I get no reports when I use > an intentionally broken test class that produces an "err." > > [host1]# puppetd -t --tags test > > notice: Ignoring cache > err: Could not retrieve catalog: Could not parse for environment > development: > Syntax error at ''>''; expected ''}'' at /etc/puppet/manifests/classes/ > test.pp:3 > > Am I not getting a report because the puppetd process aborts due to > the > parse error? This is precisely the type of error I''d want to see. Or > have I not > configured reports correctly?The problem is that the report you''re getting is a transaction report, and the failure you''re experiencing happens before the transaction instance even exists. I agree it''s a problem, but I haven''t figured out a way to solve it yet. Admittedly, I haven''t worked on it as hard as I might have... -- Always read stuff that will make you look good if you die in the middle of it. -- P. J. O''Rourke --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Jan 30, 2008 5:02 PM, Luke Kanies <luke@madstop.com> wrote:> On Jan 31, 2008, at 6:32 AM, Kenton Brede wrote: > > > On the server - > > > > [puppetmasterd] > > reports = tagmail,store > > > > In my tagmail.conf file "all: user@example.com" works fine. > > > > "all, !test_class: user@example.com" still reports "test_class." > > Does this mean it''s not possible to exclude a class (tag) from > > the "all" designation? Or is this a bug? > > Hmm, looks like this is a bug -- I pass all messages every time if you > specify ''all''.I looked into this some more....... Here''s the class I''m using that isn''t excluded by "!trim_reports." class trim_reports { tidy { "/var/lib/puppet/reports": recurse => true, backup => false, type => ctime, age => ''5d''; } } I did some testing and found the class name (trim_reports) does not appear to be picked up as a tag. message: Tidying, older than 432000 seconds objectsource: true source: //Node[puppet.example.com]/trim_reports/Tidy[/var/lib/puppet/reports/puppet.example.com/200801290034.yaml]/ensure tags: - :tidy - :ensure After adding "tag => trim_reports" to the class the tag was picked up and excluded from the email properly. message: Tidying, older than 432000 seconds objectsource: true source: //Node[puppet.example.com]/trim_reports/Tidy[/var/lib/puppet/reports/puppet.example.com/200801290038.yaml]/ensure tags: - :tidy - :trim_reports - :ensure Kent