-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version 2.0.0 reporting resources updated #138
Comments
It seems to be coming from enabling/disabling report and exception handlers. |
yup, i confirmed it's
the original issue that brought up the idea of the handler mentioned that resources were being reported as 'converged'. i'm not super familiar with chef and resources...is resources being reported as converged and resources being reported as updated the same thing? i'm not quite sure how to get around these updated resources |
Yes, in this context they are the same thing. The default report and exception handlers run at the end of the execution phase (converge) and the report handler sends back the updated_resources object which is a list of resources that were marked as updated as a result of the chef-client run. |
@jeremymv2 Any ideas how we can get around that? I was thinking that Chef Handler are covering that properly |
Taking a deeper look. Looks like it's the inspec resource and the handler that account for the two updates.
|
@vjeffrey figured, those events happen:
Not sure how we can prevent them |
It's coming from the |
@jeremymv2 so we just remove those and it should be fine? |
I think one option may be to replicate what the |
@jeremymv2 not sure I got that |
In theory I think it boils down to adding this to a library file:
In essence, that's what's going on here: https://github.com/chef-cookbooks/chef_handler/blob/master/libraries/helpers.rb#L26 |
So that works.. @chris-rock
Notice no "chef_handler" cookbook is loaded and 0/6 resources were updated below.
I'm going to ping @lamont-granquist though to make sure I'm not overlooking anything. |
@jeremymv2 Awesome! Looking forward to have a PR? |
Yes - working on changing the inspec resource as well since it was also reporting as updated. |
thank youuuuu!!!! |
Solved via #142 |
Cookbook version
2.0.0
Chef-client version
12.15.19
Platform Details
ubuntu 14.04
Scenario:
version 2.0.0 uses chef-handler in attempt to not report resources being updated, however each subsequent chef-client converge is reporting resources updated.
Steps to Reproduce:
use wrapper cookbook with these attributes:
Expected Result:
Chef-client runs should report 0/x resources updated at the end of the report handlers phase.
Actual Result:
I'm seeing 2 resources updated on each chef-client converge.
The text was updated successfully, but these errors were encountered: