Actions
Bug #10838
closedFile content (Key/value pair) reports for all entries, even if only one changes
Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Techniques
Target version:
-
Pull Request:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
43
Name check:
Fix check:
Regression:
Description
When you have one instance of "File content (key/value)" applied to the same file, it reports "repaired" for all managed keys, even if only one was changed.
Test:
Ensure k1=v1
, k2=v2
and k3=v3
are present in /tmp/testfile
:
# rudder agent run -u -q Rudder agent 4.1.3.release (CFEngine Core 3.10.0) Node uuid: 22627a92-f07e-4f8d-8bc2-6e0d2f19b669 ok: Rudder agent promises were updated. Start execution with config [20170602-085821-bc9417f8] M| State Technique Component Key Message E| repaired Common Update Policy, tools or configuration library were updated or agent service restarted E| repaired Manage keys-values file File /tmp/testfile The key -> value k3 = v3 was repaired E| repaired Manage keys-values file File /tmp/testfile The key -> value k1 = v1 was repaired E| repaired Manage keys-values file File /tmp/testfile The key -> value k2 = v2 was repaired [...] # cat /tmp/testfile k3=v3 k1=v1 k2=v2
Then add a fourth key=value pair, and update+run:
# rudder agent run -u -q Rudder agent 4.1.3.release (CFEngine Core 3.10.0) Node uuid: 22627a92-f07e-4f8d-8bc2-6e0d2f19b669 ok: Rudder agent promises were updated. Start execution with config [20170602-090359-93d09b1e] M| State Technique Component Key Message E| repaired Common Update Policy, tools or configuration library were updated or agent service restarted E| repaired Manage keys-values file File /tmp/testfile The key -> value k3 = v3 was repaired E| repaired Manage keys-values file File /tmp/testfile The key -> value k4 = v4 was repaired E| repaired Manage keys-values file File /tmp/testfile The key -> value k1 = v1 was repaired E| repaired Manage keys-values file File /tmp/testfile The key -> value k2 = v2 was repaired ## Summary ##################################################################### 39 components verified in 7 directives => 39 components in Enforce mode -> 31 compliant -> 5 repaired -> 3 not-applicable execution time: 1.87s ################################################################################ # cat /tmp/testfile k3=v3 k1=v1 k2=v2 k4=v4
Expected is only a repaired message about k4=v4
, but instead one gets messages for all promised key=value pairs.
Actions