Project

General

Profile

Actions

Bug #15590

closed

Bug #2613: Problem when updating a category name for Technique Management in /var/rudder

Renaming/moving technique category fails in several way

Added by François ARMAND over 5 years ago. Updated over 5 years 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:
Error - Fixed
Regression:

Description

We have several bugs with renaming/moving technique categories:
1/ we can't create/move a technique directly under "techniques" directory, because the active technique repo looks for "/" in place of "Active Techniques".
2/ we can't move a technique directory if is contains techniques.

1/ is trivial, 2 is complex. More details on 2

So, we don't do anything in LDAP for deleted categories that are non empty (if techniques were without directives, they are deleted, so it should not be a problem).
Because if the user has a directive, it most likely didn't wanted to delete it, and it's easier to revert a git delete than a LDAP delete.

But when we change the category ID (ie rename the directory), we actually delete the category with the previous id and create a new one with the new id. If the category has at least one directives somewhere under it.

So we need to detect at least simple directory rename and reply them in LDAP with a "changerdn" command.
A simple directory rename is a FS move where only the directory name changed, not the category "display name" nor the subentries. We will use that (category "display name" and contents) to identify a move.

We could go much farther, as in fact the only problem is the deletion of a directive. As long as all techniques containing directives are moved away from a category, there is no problem deleting it. So we could imagine scenario where a category containing techniques with directive has its directory changed, and "display name" changed, and some techniques moved elsewhere - it would be ok. We will take care of that in a later release.


Subtasks 3 (0 open3 closed)

Bug #15623: Moving a category fails with "missing ldap attribute"ReleasedVincent MEMBRÉActions
Bug #15651: Moving a category from a subcategory to root failsReleasedVincent MEMBRÉActions
Bug #15673: Parent ticket didn't corrected the problem when a category is moved to rootReleasedVincent MEMBRÉActions
Actions #1

Updated by François ARMAND over 5 years ago

  • Status changed from New to In progress
Actions #2

Updated by François ARMAND over 5 years ago

  • Parent task changed from #15575 to #2613
Actions #3

Updated by François ARMAND over 5 years ago

  • Subject changed from Trying to create or move technique category into root directory fails to Renaming/moving technique category fails in several way
  • Description updated (diff)
Actions #4

Updated by François ARMAND over 5 years ago

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

Updated by François ARMAND over 5 years ago

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

Updated by François ARMAND over 5 years ago

  • Fix check changed from To do to Error - Blocking
Actions #7

Updated by François ARMAND over 5 years ago

  • Fix check changed from Error - Blocking to Error - Fixed
Actions #8

Updated by François ARMAND over 5 years ago

  • Fix check changed from Error - Fixed to Error - Blocking
Actions #9

Updated by François ARMAND over 5 years ago

  • Fix check changed from Error - Blocking to Error - Fixed
Actions #10

Updated by Vincent MEMBRÉ over 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.13 which was released today.

Actions

Also available in: Atom PDF