Hi!
I'm investigate usage of start handlers and i see that my test handler run twice on chef-client run. I have:
solo.rb:
----
begin
require '/etc/chef/handlers/test_start_handler1'
start_handlers << Test::MyStartHandler1.new
rescue LoadError
Chef::Log.warn 'Failed to load handler. This should be resolved after a chef run.'
end
---
and handler in '/etc/chef/handlers/test_start_handler1':
---
module Test
class MyStartHandler1 < ::Chef::Handler
def report
puts 'This is start handler : ' + rand(0...100).to_s
end
end
end
----
when i run:
chef-solo --no-color -c /home/solo/solo.rb -j /home/solo/run.json
i see output:
---
Starting Chef Client, version 14.13.11
sh: 1: rpm: not found
This is start handler : 99
This is start handler : 38
resolving cookbooks for run list:
{skip}
So, why start handler run twice?