Closed tarcinil closed 4 years ago
The :init
action on the resource is an execute which supports the returns
option.
Could you test this by adding returns [0,3]
to line 79 of https://github.com/sensu/sensu-go-chef/blob/master/resources/backend.rb and let us know if it solves the error you are seeing?
I don't use your cookbook and I have my own where we enforce idempotency. I can confirm that it resolves the issue in mine.
I am contributing back the things that I have learned about creating my own sensu-go site cookbook.
Awesome, could you submit a PR to resolve this issue?
This is based on a discussion from the sensu-go repo.
Chef Version
Chef 14
Input
Code: https://github.com/sensu/sensu-go-chef/blob/master/resources/backend.rb#L76
Discussion about
sensu-backend init
in https://github.com/sensu/sensu-go/issues/3511Output
I would recommend allowed
returns [0,3]
on this resource.Impact
The resource will stop failing chef runs with an exit code of 3.
Expected Behavior
It should have succeed.
Actual Behavior
It should have failed, because of how sensu-go sends an exit code when the backend in already initialized.
Steps to Reproduce your problem