-
Notifications
You must be signed in to change notification settings - Fork 303
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
Backup option breaks concat #359
Conversation
|
I agree. Fragments should not be backed up and at one point that was the behavior of this module. |
|
Looking at the code in branch master, I think the same patch needs to be applied there (don't want to stumble upon the same bug when hitting the 2.x releases) |
|
@j-vizcaino Actually, it looks like 1.2.x is ahead of master. Sigh. @hunner , @mhaskel , @cmurphy - is 1.2.x supposed to be forward merged into master or fixes cherry picked from master into that branch? Currently, 1.2.x has the 1.2.4 release it in while metadata.json in master still claims 1.2.3. |
|
@jhoblitt at this point all dev should be happing against master, just fyi. 1.2.x is just a release branch and 2.0.x is largely just there for posterity. |
|
@j-vizcaino @jhoblitt the change to fragment backups is detailed in this PR. By essentially reverting this behavior, static-compilation will now break. |
|
@bmjen What do you mean by static-compilation ? RSpec tests are all green. Dunno about beaker tests though... |
|
@j-vizcaino check out PR #288 and the comments in the referenced Jira ticket. |
|
@bmjen I don't see why the backup parameter has anything to do with the helper script not being deployed... it seems pretty strange. Anyway, activating backup for the fragments leads to a severe regression that causes updated fragments to appear twice (one: the new fragment, two: the older fragment) in the final file. The final file is crippled and unusable. That can't be the answer the problem mentionned in the Jira ticket. As far as I know, this patch has been active on 4-5 different hosts for a week and encountered no problem so far. RSpec tests seems to confirm that also. Puppet version is 3.7.5 open-source. |
|
@j-vizcaino the title is misleading. The root cause of the problem can be read towards the bottom of the comments list.
|
Excluding the merge/revert of #359 on the 1.2.x branch from mergeback into master.
The backup option, provided to the
concatresource is used to backup the final target file before overwritting it.Problem is: the backup option is used for the concat fragments file resources and, even worse, the fragments directory.
It means that, when
backupis enabled (say ".bak") and a fragment changes, the file is first backed up inside the fragment dir, then removed (directory has purge, recurse set to true), but backed up again because theFile[/var/lib/puppet/concat/_target_file]also hasbackup => ".bak"!The final concatenated file results in the fragment appearing twice !
Pull request fixes this issue.
I've been able to update unit test, but I can't run the acceptance ones. Maybe they need to be updated as well.
Please consider this before the 1.2.4 release, I think this is a really serious bug.
Thank you