-
Notifications
You must be signed in to change notification settings - Fork 77
CFE-3275: Documented where report_diffs stores its cached copies #3764
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
Open
nickanderson
wants to merge
1
commit into
cfengine:master
Choose a base branch
from
nickanderson:CFE-3275/master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -745,6 +745,13 @@ system files, you should keep a single repository for them and use CFEngine to | |
| synchronize changes from the repository source. Repositories should not be | ||
| used to attempt to capture random changes of the system. | ||
|
|
||
| To produce a diff, the agent keeps its own copy of each monitored file to | ||
| compare the next run against. These copies are kept in a tree under | ||
| `$(sys.statedir)/change_details` that mirrors the path of the monitored file, | ||
| so the copy of `/etc/ssh/sshd_config` is | ||
| `/var/cfengine/state/change_details/etc/ssh/sshd_config`. The location is not | ||
| configurable, and `repository` does not change it. | ||
|
|
||
| **Limitations:** | ||
| Diffs will not be reported for files that are larger than 80MB in size. | ||
| Diffs will not be reported if the number of lines between the first and last change exceed 4500. | ||
|
|
@@ -761,6 +768,12 @@ body changes example | |
| } | ||
| ``` | ||
|
|
||
| **History:** Before 3.29.0 the copies were kept next to the monitored file as | ||
| `<file>_cfchanges`, or under `repository` if one was configured. On the first | ||
| run after an upgrade the copy is moved from either location to | ||
| `$(sys.statedir)/change_details`, so no baseline is lost and nothing is left | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so during the upgrade to 3.29.0+ file changes will be moved to change_details from any specified default_repository and default_repository no longer specifies where files are placed? |
||
| behind. | ||
|
|
||
| #### silence | ||
|
|
||
| **Description:** The `silence` attribute lists the categories of file change | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is
repositoryhere? is that a variable somewhere? Do you mean that https://docs.cfengine.com/docs/lts/reference/components/cf-agent/#default_repository does not do what it says and change the default repository location from /var/cfengine/state/change_details to whatever is specified?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curiously the docs say the file is underscored instead of directories created in the repository