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

Fix issue with interval being removed because of chef-client cookbook cleanup #191

Merged
merged 1 commit into from Jan 5, 2017

Conversation

Projects
None yet
3 participants
@brentm5
Contributor

brentm5 commented Jan 4, 2017

Description

This solves an issue where the chef-client cookbook cleanup step removes the report_timing.json file from the cache. Upon looking into chef client you can see the following:

https://github.com/chef/chef/blob/master/lib/chef/cookbook/synchronizer.rb#L184-L195
https://github.com/chef/chef/blob/master/lib/chef/policy_builder/expand_node_object.rb#L219-L223

And upon setting the logs to info and running chef client you can see the following:

[2017-01-04T23:01:25+00:00] INFO: Removing cookbooks/audit/report_timing.json from the cache; it is no longer needed by chef-client.

This resolves the issue by putting the file in the chef cache directory specified by chef-client under a compliance folder.

Issues Resolved

N/A

Check List

@brentm5 brentm5 changed the title from Fix issue with interval being loaded from cookbook path to Fix issue with interval being removed because of chef-client cookbook cleanup Jan 4, 2017

@chris-rock

This comment has been minimized.

Collaborator

chris-rock commented Jan 5, 2017

We can ignore the automate_test. We made this test optional. It cannot get green for external PRs. This is fixed in #192

@chris-rock

This comment has been minimized.

Collaborator

chris-rock commented Jan 5, 2017

Looks great to me. cc @jeremymv2

Fix issue with interval being loaded from cookbook path
Signed-off-by: Montague, Brent <brent@bmontague.com>
@brentm5

This comment has been minimized.

Contributor

brentm5 commented Jan 5, 2017

Went ahead and rebased off of master to get those changes.

@jeremymv2

This comment has been minimized.

Contributor

jeremymv2 commented Jan 5, 2017

@brentm5 Good catch! I like the improvement utilizing Chef::FileCache.create_cache_path

@chris-rock 👍

@chris-rock

This comment has been minimized.

Collaborator

chris-rock commented Jan 5, 2017

Thank you @brentm5 for finding that issue!

@chris-rock chris-rock merged commit 71148ad into chef-cookbooks:master Jan 5, 2017

2 checks passed

DCO This commit has a DCO Signed-off-by
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment