Bug #15590
closedBug #2613: Problem when updating a category name for Technique Management in /var/rudder
Renaming/moving technique category fails in several way
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.
Updated by François ARMAND about 5 years ago
- Status changed from New to In progress
Updated by François ARMAND about 5 years ago
- Parent task changed from #15575 to #2613
Updated by François ARMAND about 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)
Updated by François ARMAND about 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
Updated by François ARMAND about 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|d633db409f67894fd2d929b565e0bb7c4dedfa86.
Updated by François ARMAND about 5 years ago
- Fix check changed from To do to Error - Blocking
Updated by François ARMAND about 5 years ago
- Fix check changed from Error - Blocking to Error - Fixed
Updated by François ARMAND about 5 years ago
- Fix check changed from Error - Fixed to Error - Blocking
Updated by François ARMAND about 5 years ago
- Fix check changed from Error - Blocking to Error - Fixed
Updated by Vincent MEMBRÉ about 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.13 which was released today.