Project

General

Profile

Actions

Bug #23959

closed

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

Added by Alexis Mousset 12 months ago. Updated about 1 month ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
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

Actions #1

Updated by Vincent MEMBRÉ about 2 months ago

  • Target version set to 8.1.8
Actions #2

Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from New to In progress
  • Assignee set to Vincent MEMBRÉ
Actions #3

Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/5981
Actions #5

Updated by Anonymous about 2 months ago

  • Status changed from Pending technical review to Pending release
Actions #6

Updated by François ARMAND about 2 months ago

  • Fix check changed from To do to Checked

Tested:
- create technique.json, add/commit
- rudder server reload-techniques
- rm technique.json, add/commit
- rudder server reload-techinques

The technique is correctly seen as updated, not deleted as before.

Actions #7

Updated by Vincent MEMBRÉ about 1 month ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.1.8 and 8.2.1 which were released today.

Actions

Also available in: Atom PDF