Project

General

Profile

Actions

Bug #23959

closed

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

Bug #23959: When removing files from a technique, it might get disabled unexpectedly

Added by Alexis Mousset over 2 years ago. Updated over 1 year 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

Updated by Vincent MEMBRÉ over 1 year ago Actions #1

  • Target version set to 8.1.8

Updated by Vincent MEMBRÉ over 1 year ago Actions #2

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

Updated by Vincent MEMBRÉ over 1 year ago Actions #3

  • 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

Updated by Anonymous over 1 year ago Actions #5

  • Status changed from Pending technical review to Pending release

Updated by François ARMAND over 1 year ago Actions #6

  • 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.

Updated by Vincent MEMBRÉ over 1 year ago Actions #7

  • 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: PDF Atom