Actions
Bug #24537
closedRegex in file replace line must not match the string used as replacement
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No
Description
If the regex match the string used as replacement, the method will fail to replace the line
2024-03-18T23:58:06+00:00 error: Promised replacement 'DNS1=1.1.1.1' on line 'DNS1=123.4.23.4' for pattern 'DNS1(.*)' is not convergent while editing '/tmp/ifcfg-eth0' (regular expression matches the replacement string) 2024-03-18T23:58:06+00:00 error: Promise belongs to bundle 'regex_replace' in file '/var/rudder/ncf/common/20_cfe_basics/cfengine/files.cf' near line 328 2024-03-18T23:58:06+00:00 error: Comment is 'Search and replace string' 2024-03-18T23:58:06+00:00 error: Errors encountered when actuating replace_patterns promise 'DNS1(.*)'
The documentation of the method does not mention this behavior, and it is not clear why the method is not working.
Updated by Elaad FURREEDAN 8 months ago
- Status changed from In progress to Pending technical review
- Assignee changed from Elaad FURREEDAN to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/ncf/pull/1420
Updated by Anonymous 8 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset ncf|e1ef9119552af2b987d15ad0e57b3328486c4658.
Updated by Vincent MEMBRÉ 6 months ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.3.14, 8.0.8 and 8.1.1 which were released today.
Actions