You can also add handlers to client.rb using the chef-client::config recipe, so it doesn't have to be manual.
I agree with Steve, however, and would like it to always run even if the handler breaks.
By "enable them in the client.rb" I'm assuming you mean using the
'manual install' method as described in the docs [1]
As Steve mentioned it's definitely preferable to manage report
handlers via the LWRP, which is provided by the chef_handler cookbook
[2]. You can more easily enable/disable specific handlers that way
without needing to editing the client.rb
[1] http://docs.opscode.com/essentials_handlers_install.html
[2] https://github.com/opscode-cookbooks/chef_handler
On Fri, Jan 25, 2013 at 10:19 AM, Judd Maltin < "> > wrote:
> Good point. My report handler code will likely go through revisions,
> making it potentially unstable, and possible blocker. Thanks, Steve.
>
> On Fri, Jan 25, 2013 at 1:10 PM, steve . < "> > wrote:
>> There's no reason not to put them in client.rb. I usually use the LWRP just
>> because it's easier to add and remove them via run list.
>>
>> Well, I guess there's no reason except that if you somehow distribute a
>> *broken* handler to all your nodes, you then (IIRC from early ~10.0
>> experimentation) effectively kill their ability to check in until you can
>> roll back the broken handler or the client.rb that calls it.
>>
>> So using the LWRP / recipe / run list method, your nodes are still checking
>> in and getting updated code. If the code says, "Add this handler" and the
>> handler raises a big stinky exception, you modify the cookbook or take the
>> recipe/role that adds the handler out of the run list.
>>
>>
>>
>> On Fri, Jan 25, 2013 at 9:13 AM, Judd Maltin < "> > wrote:
>>>
>>> report handlers question: why NOT enable them in client.rb? I have a
>>> large environment, and I want to ensure that it's run EACH AND EVERY
>>> time.
>>>
>>> --
>>> Judd Maltin
>>> T: 917-882-1270
>>> F: 501-694-7809
>>> what could possibly go wrong?
>>
>>
>
>
>
> --
> Judd Maltin
> T: 917-882-1270
> F: 501-694-7809
> what could possibly go wrong?
Archive powered by MHonArc 2.6.16.