Project

General

Profile

Actions

Bug #23959

open

When removing files from a technique, it might get disabled unexpectedly

Added by Alexis Mousset 4 months ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Web - Config management
Target version:
-
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

After a partial migration to 8.0rc, we had a an issue on technique editor techniques. They were migrated to yml, and the new file were committed, but the json file we only deleted on disk but not in the git repo. To fix the issue, we made a manual commit to remove the json files for the techniques, and it resulted in disabling all these techniques at the next automated technique reload.

This is due to a simplistic logic in technique changes reader, which does not check file names and only relies on change type (https://github.com/Normation/rudder/blob/6281da8a4c4cd0bd36587a5d4deb362e30c4ccc2/webapp/sources/rudder/rudder-core/src/main/scala/com/normation/cfclerk/services/impl/GitTechniqueReader.scala#L279).

Hence a commit affecting a technique and containing only deletions is considered as a technique deletion, and results in disabling it, even if the deleted file is not the metadata or current policy file

No data to display

Actions

Also available in: Atom PDF