Project

General

Profile

Actions

Bug #4371

closed

All techniques should back up all modified/copied files by Rudder

Added by Jonathan CLARKE over 10 years ago. Updated over 10 years ago.

Status:
Released
Priority:
2
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

One of the nice features in CFEngine that Rudder uses is the modified files repository. A copy of any files changed (by an edit or a copy) get placed here.

However, for this to work, all files: promises must use either a copy_from body using "copy_backup => timestamp" or a edit_defaults body using "edit_backup => timestamp". This is not currently the case for all Techniques.

Actions #1

Updated by Jonathan CLARKE over 10 years ago

Note: we already have several bodies available in the rudder_stdlib.cf to help with this:

body edit_defaults rudder_empty_select(select)
{
        empty_file_before_editing => "${select}";
        max_file_size             => "1024000";
        edit_backup               => "timestamp";                                                                                                                       
}

body edit_defaults noempty_backup
{
        empty_file_before_editing => "false";
        edit_backup               => "timestamp";  # we want to keep a track of everything                                                                              
        max_file_size             => "1024000";
}

body edit_defaults empty_backup
{
        empty_file_before_editing => "true";
        edit_backup               => "timestamp";
        max_file_size             => "1024000";
}

And for copy_from, one in cfengine_stdlib.cf:

body copy_from backup_local_cp(from)
# Local copy, keeping a backup of old versions
{
        source      => "$(from)";
        copy_backup => "timestamp";                                                                                                                                     
}
Actions #2

Updated by Jonathan CLARKE over 10 years ago

  • Status changed from 8 to Pending technical review
  • Assignee set to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/271
Actions #3

Updated by Jonathan CLARKE over 10 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset policy-templates:commit:27b7956d67332acccf97ae151c4e5fc971f9df31.

Actions #4

Updated by Nicolas CHARLES over 10 years ago

Applied in changeset policy-templates:commit:8edba533542019761dd99954e7d0b2c6374eef4f.

Actions #5

Updated by Vincent MEMBRÉ over 10 years ago

  • Subject changed from Not all Techniques use "copy_backup => timestamp" and "edit_backup => timestamp" to All techniques should back up all modified/copied files by Rudder
Actions #6

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.6.10 which was released today.
Check out:

Actions

Also available in: Atom PDF