# Trouble with Simple Report Handler

**URL:** <https://discourse.chef.io/t/trouble-with-simple-report-handler/2937>\
**Category:** Chef Infra (archive)\
**Created:** [July 20, 2012, 1:12am UTC](https://discourse.chef.io/t/trouble-with-simple-report-handler/2937 "2012-07-20T01:12:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Petzel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/david_petzel/32/38_2.png) [@David\_Petzel](https://discourse.chef.io/u/David_Petzel)\
**Post date:** [July 20, 2012, 1:12am UTC](https://discourse.chef.io/t/trouble-with-simple-report-handler/2937/1 "2012-07-20T01:12:15Z")

</div>

Hello, I’m trying to write my first report handler, and I’ve been through the  
WIKI and some of jtimbermans blog posts. I’ve got everything working in that  
the handler gets registered and runs just fine.

The issue I am having is that when I try to display the list of  
updated\_resources, the handler is always in the list. Just to make sure I  
wasn’t doing something dumb, added a community handler, resulting in two  
handlers in my run list. After doing that the updated\_resource list always  
contains 2 items (both handlers). I seem to be having this exact issue:  
[http://tickets.opscode.com/browse/COOK-831](http://tickets.opscode.com/browse/COOK-831)

I’m testing on 10.12 running on a Centos 5.8 machine. Has anyone else run into  
this, or have any suggestions on what I might be doing wrong? My goal is that  
on a run where nothing changes, the updated\_resources list should contain 0  
items.

Thanks

---

<div class="post-metadata">

**Author:** ![Bryan\_Brandau](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_brandau/32/636_2.png) [@Bryan\_Brandau](https://discourse.chef.io/u/Bryan_Brandau)\
**Post date:** [July 20, 2012, 2:26am UTC](https://discourse.chef.io/t/trouble-with-simple-report-handler/2937/2 "2012-07-20T02:26:24Z")

</div>

You're not doing anything wrong. The report handlers have to reload on  
each run. You can see that on line 36 of the LWRP.  
[https://github.com/opscode-cookbooks/chef\_handler/blob/master/providers/default.rb](https://github.com/opscode-cookbooks/chef_handler/blob/master/providers/default.rb)

On Thu, Jul 19, 2012 at 8:12 PM, [davidpetzel@gmail.com](mailto:davidpetzel@gmail.com) wrote:

> Hello, I'm trying to write my first report handler, and I've been through  
> the  
> WIKI and some of jtimbermans blog posts. I've got everything working in  
> that  
> the handler gets registered and runs just fine.
> 
> The issue I am having is that when I try to display the list of  
> updated\_resources, the handler is always in the list. Just to make sure I  
> wasn't doing something dumb, added a community handler, resulting in two  
> handlers in my run list. After doing that the updated\_resource list always  
> contains 2 items (both handlers). I seem to be having this exact issue:  
> [http://tickets.opscode.com/browse/COOK-831](http://tickets.opscode.com/browse/COOK-831)
> 
> I'm testing on 10.12 running on a Centos 5.8 machine. Has anyone else run  
> into  
> this, or have any suggestions on what I might be doing wrong? My goal is  
> that  
> on a run where nothing changes, the updated\_resources list should contain 0  
> items.
> 
> Thanks

---

<div class="post-metadata">

**Author:** ![Bryan\_Brandau](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_brandau/32/636_2.png) [@Bryan\_Brandau](https://discourse.chef.io/u/Bryan_Brandau)\
**Post date:** [July 20, 2012, 2:29am UTC](https://discourse.chef.io/t/trouble-with-simple-report-handler/2937/3 "2012-07-20T02:29:03Z")

</div>

Just another tidbit. If you load it from the client.rb, I'm fairly certain  
it doesn't do this(if I'm remembering correctly). If you're keeping an  
updated resources metric from each chef run, just decrement it by 1.

On Thu, Jul 19, 2012 at 9:26 PM, Bryan Brandau [agent462@gmail.com](mailto:agent462@gmail.com) wrote:

> You're not doing anything wrong. The report handlers have to reload on  
> each run. You can see that on line 36 of the LWRP.
> 
> [https://github.com/opscode-cookbooks/chef\_handler/blob/master/providers/default.rb](https://github.com/opscode-cookbooks/chef_handler/blob/master/providers/default.rb)
> 
> On Thu, Jul 19, 2012 at 8:12 PM, [davidpetzel@gmail.com](mailto:davidpetzel@gmail.com) wrote:
> 
> > Hello, I'm trying to write my first report handler, and I've been through  
> > the  
> > WIKI and some of jtimbermans blog posts. I've got everything working in  
> > that  
> > the handler gets registered and runs just fine.
> > 
> > The issue I am having is that when I try to display the list of  
> > updated\_resources, the handler is always in the list. Just to make sure I  
> > wasn't doing something dumb, added a community handler, resulting in two  
> > handlers in my run list. After doing that the updated\_resource list always  
> > contains 2 items (both handlers). I seem to be having this exact issue:  
> > [http://tickets.opscode.com/browse/COOK-831](http://tickets.opscode.com/browse/COOK-831)
> > 
> > I'm testing on 10.12 running on a Centos 5.8 machine. Has anyone else run  
> > into  
> > this, or have any suggestions on what I might be doing wrong? My goal is  
> > that  
> > on a run where nothing changes, the updated\_resources list should contain  
> > 0  
> > items.
> > 
> > Thanks
