Bug #16700
closed
Garbled generated policies in 6.0
Added by Nicolas CHARLES almost 5 years ago.
Updated over 4 years ago.
Category:
Web - Config management
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
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
It seems that generation append
to existing policy.new
files in place of replacing them.
- Status changed from New to In progress
- Assignee set to François ARMAND
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".
- 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
- Status changed from Pending technical review to Pending release
- Fix check changed from To do to Checked
- Subject changed from garbled generated policies in 6.0 to Garbled generated policies in 6.0
- Name check changed from To do to Reviewed
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.0.3 which was released today.
Also available in: Atom
PDF