Bug #16700
closedGarbled generated policies in 6.0
Description
Policy generation failed in 6.0, after https://issues.rudder.io/issues/16699
content is completly garbled
bundle agent cleanForceInventoryFlagFile { files: "${g.rudder_base}/etc/force_inventory" delete => tidy, ifvarclass => "inventory_sent"; # if the force inventory file was present, and we successfully sent an inventory, clean up the flag file } icurl} --no-verify --put --authentication ${g.davuser}:${g.davpw} --file"; "download_command_suffix" string => "--url ${download_endpoint}"; classes: any::
insert_lines: "${file_edit_header}" location => start, insert_type => "preserve_block"; } "${str}" not_matching => "true"; insert_lines: "${str}"; }
Files
Updated by Nicolas CHARLES almost 5 years ago
- File promises.cf promises.cf added
Updated by Nicolas CHARLES almost 5 years ago
Removing the files fixes the issue
Adding random text at the end of the file breaks again
to reproduce:
cp -ar inputs inputs.new
[root@server cfengine-community]# cd inputs.new/
[root@server inputs.new]# vim promises.cf
Add some text at the end
policy generation fails
Updated by François ARMAND almost 5 years ago
It seems that generation append
to existing policy.new
files in place of replacing them.
Updated by François ARMAND almost 5 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by François ARMAND almost 5 years ago
Actually, it only happens when the corrupted file is LONGER than the newly writen file. So, it's like there is "replace" which is done in place of an "overwrite".
Updated by François ARMAND almost 5 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder/pull/2762
Updated by François ARMAND almost 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|6a72f2fb16af615c8809b2d79d4dafaf15ace95b.
Updated by François ARMAND almost 5 years ago
- Fix check changed from To do to Checked
Updated by Alexis Mousset almost 5 years ago
- Subject changed from garbled generated policies in 6.0 to Garbled generated policies in 6.0
- Name check changed from To do to Reviewed
Updated by Vincent MEMBRÉ almost 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.0.3 which was released today.