Actions
Bug #17774
closedDuplicate category name error when saving a new user technique
Status:
Released
Priority:
N/A
Assignee:
Category:
Web - Config management
Target version:
Pull Request:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Very Small
Priority:
69
Name check:
To do
Fix check:
To do
Regression:
Description
Coming from a very old rudder, in rudder 6.1 when we try to create a new user technique, we get an error:
[2020-06-17 14:29:26] ERROR com.normation.rudder.services.policies.TechniqueAcceptationUpdater - Error when trying to create to hierarchy of categories into which the new technique should be added: Consistancy: A category with that name already exists in that category: category names must be unique for a given level [2020-06-17 14:29:26] INFO com.normation.rudder.services.policies.TechniqueAcceptationUpdater - Automatically adding technique 'normation_com_wildcard_certificate' in category 'Root of active techniques's library (Active Techniques)' of active techniques library
This seems to be a consequence of #15575 (so from rudder 5.0.13).
The culprit looks like:
def findCategory(sourcesCatNames: List[CategoryInfo], existings: FullActiveTechniqueCategory): (ActiveTechniqueCategoryId, String) = { if(sourcesCatNames.isEmpty ) (existings.id, existings.name) else { val catId = sourcesCatNames.head.id.trim existings.subCategories.find { cat => cat.id.value == catId} match { case None => //create and go deeper createCategories(sourcesCatNames.map(x => CategoryInfo(x.id, x.name, x.description)), (existings.id, existings.name)) case Some(cat) => // continue ! findCategory(sourcesCatNames.tail, cat) } } }
==> we don't check for name existance before attempting to create the new category.
Files
Updated by François ARMAND over 4 years ago
- Subject changed from Duplicate category name erro when saving a new user technique to Duplicate category name error when saving a new user technique
Updated by François ARMAND over 4 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Infrequent - complex configurations | third party integrations
- Effort required set to Very Small
- Priority changed from 0 to 70
It should only happens for people whose active category id are not the default ones, so before very old rudder.
Updated by François ARMAND over 4 years ago
- Status changed from New to In progress
Actions
#4
Updated by François ARMAND over 4 years ago
- File clipboard-202006172159-qldf5.png clipboard-202006172159-qldf5.png added
- File clipboard-202006172200-j1fqr.png clipboard-202006172200-j1fqr.png added
Example of ldap/fs content when it happens:
Updated by François ARMAND over 4 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/3082
Updated by François ARMAND over 4 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|3c146076f352eba57fe6dc9bc2a53ff9a39e546f.
Updated by François ARMAND over 4 years ago
- Related to Bug #17862: error when importing techniques and running reload-techniques in 6.1 added
Updated by Vincent MEMBRÉ over 4 years ago
- Related to Bug #18010: Users techniques are not created under any technique category when customed categories were used added
Updated by Vincent MEMBRÉ over 4 years ago
- Status changed from Pending release to Released
- Priority changed from 70 to 69
This bug has been fixed in Rudder 5.0.18 and 6.1.2 which were released today.
Actions