add warning to identify which entities have 1+ aliases with the same mount accessor (#28054)

* add warning to identity which entities have 1+ aliases with the same mount accessor

* remove redundant log
This commit is contained in:
Ellie
2024-09-12 14:26:09 -05:00
committed by GitHub
parent 978b3aee52
commit 84c58f66bb

View File

@@ -459,6 +459,10 @@ LOOP:
mountAccessors := getAccessorsOnDuplicateAliases(entity.Aliases)
if len(mountAccessors) > 0 {
i.logger.Warn("Entity has multiple aliases on the same mount(s)", "entity_id", entity.ID, "mount_accessors", mountAccessors)
}
for _, accessor := range mountAccessors {
if _, ok := duplicatedAccessors[accessor]; !ok {
duplicatedAccessors[accessor] = struct{}{}
@@ -498,10 +502,6 @@ LOOP:
accessorCounter++
}
if len(duplicatedAccessorsList) > 0 {
i.logger.Warn("One or more entities have multiple aliases on the same mount(s), remove duplicates to avoid ACL templating issues", "mount_accessors", duplicatedAccessorsList)
}
if i.logger.IsInfo() {
i.logger.Info("entities restored")
}