Given a chef machine resource like the following:
machine "my-server" do
action :converge_only
end
When this converge happens we sometimes get a chef status of Aborted
on manage.chef.io with no further information. This makes it very difficult to troubleshoot issues with the recipes.
I have the following questions:
- Where is the log on the remote machine?
- Can I specify the local log location for the converge?
- Is there a way to rotate the log? It would be useful to be able to go back to previous chef runs and see the logs.
So to answer my own question, you specify logging in the client.rb. You can append settings to the client.rb via the
chef_config
property in the machine resource. Here's a small example:I'm not sure if specifying this on the
:converge
will do anything. It definitely works on the:setup
.