Actions
Bug #5003
closedInitial promises on server cause an error to be logged due to duplicate "empty_file_before_editing" setting
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
Running initial promises on a server, I see this message in verbose output:
!! Multiple "empty_file_before_editing" (boolean) constraints break this promise Promise (version not specified) belongs to bundle 'install_rsyslogd' in file '/var/rudder/cfengine-community/inputs/distributePolicy/1.0/rsyslogConf.cf' near line 111 Comment: Copying rsyslog conf
It is due to a duplicate edit_defaults attribute:
policy_server:: "/etc/rsyslog.d/rudder.conf" create => "true", edit_defaults => empty, edit_line => expand_template("${sys.workdir}/inputs/distributePolicy/rsyslog.conf/rudder.conf"), edit_defaults => noempty_backup, classes => cf2_if_else("rudder_rsyslog_conf_copied", "cannot_copy_rudder_rsyslog_conf"), comment => "Copying rsyslog conf";
This was introduced by #4371.
The impact is not that bad: the file actually still gets edited, just not backed up. The rsyslogd service is also restarted if needed, so there is basically no impact apart from the error message.
Actions