Project

General

Profile

Actions

Bug #10153

closed

Calling twice file_ensure_key_value_present_in_ini_section for same file and section doesn't do anything for the second call

Added by Nicolas CHARLES about 7 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
1
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

(at least in CFEngine 3.10)
If we call twice file_ensure_key_value_present_in_ini_section, for same file and same section, it won't do anything, because it calls set_variable_values_ini("file_ensure_key_value_present_in_ini_section.content", "${section}")
Since only the content of "file_ensure_key_value_present_in_ini_section.content" changes, and it doesn't deep evaluates it, it won't run it the second time, and so skip the changes silently (verbose output doesn't even mention it)

We need to check all version impacted

Actions #1

Updated by Nicolas CHARLES about 7 years ago

I tested in Rudder 3.1, and it already happens, so this issue has always been there

Actions #2

Updated by Nicolas CHARLES about 7 years ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #3

Updated by Nicolas CHARLES about 7 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Alexis Mousset
  • Pull Request set to https://github.com/Normation/ncf/pull/527
Actions #4

Updated by Nicolas CHARLES about 7 years ago

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

Applied in changeset commit:20ff7bae0bc809546c357b5f894467f82c992a0e.

Actions #5

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from Pending release to Released
  • Priority set to 0
Actions #6

Updated by Alexis Mousset almost 2 years ago

  • Target version changed from 0.x to ncf-0.x
Actions #7

Updated by Alexis Mousset almost 2 years ago

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

Also available in: Atom PDF