Support container zones during resolve and create operations #6
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/restic#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Container ID values are unique across the storage network. Container names are unique across domain zone they are registered in. By default, container names are registered in default "root" zone
.container
. Right now all create and resolve operation are operating in this default zone.We should support setting a custom zone. I see two ways how we can do it:
Usually FrostFS application parse container names with
.
symbol. Now this is restricted symbol in container names, so we can split zone and container name. See how s3 gateway parses configured container IDif err := id.DecodeString(containerString); err != nil {
i := strings.Index(containerString, ".")
if i < 0 {
return cid.ID{}, fmt.Errorf("invalid container address: %s", containerString)
}
if id, err = a.bucketResolver.Resolve(ctx, containerString[i+1:], containerString[:i]); err != nil {
return cid.ID{}, fmt.Errorf("resolve container address %s: %w", containerString, err)
}
}
Meant for RClone: TrueCloudLab/rclone#5
Closed.