Project

General

Profile

Actions

Bug #8574

closed

Bug #8321: File edit methods return a kept class even when they repaired the file

File edit methods return a kept class even when they repaired the file

Added by Benoît PECCATTE over 8 years ago. Updated over 2 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

According to https://github.com/Normation/ncf/pull/357/files#r63663063:

Even if we edit a file, and the repaired class is set, because the file already exists, CFEngine thinks the promise is kept, therefore defining both result classes. Reason is most of them create the file if not existing, but if the file is already there, part of this promise is kept, hence the kept result

We should look into a workaround to avoid this confusing and nasty kept class. If it comes from the "create => true" part of the promise, maybe just separate this into two promises, and report only on the second? If not, how about a checksum before and after the file edit promise, and if the checksum differs, then force the repaired class, if not force the kept class?

Actions #1

Updated by Alexis Mousset over 8 years ago

  • Category set to Generic methods
Actions #2

Updated by François ARMAND over 7 years ago

  • Status changed from New to Rejected

I'm closing that one because we can't do anything, even if we go all the way to try to patch cfengine. So beside the workaround in place, little can be done.

Actions #3

Updated by Alexis Mousset over 2 years ago

  • Target version changed from master to ncf-1.2
  • Priority set to 0
Actions #4

Updated by Alexis Mousset over 2 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods to Generic methods
Actions

Also available in: Atom PDF