Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic storage provider add aliases #4307

Merged
merged 5 commits into from
Nov 1, 2023

Conversation

javfg
Copy link
Contributor

@javfg javfg commented Nov 1, 2023

This PR solves the problem we found yesterday where it is impossible to resolve storage ids like: eoshome-a, as those are aliases of real storage ids like eoshome-i01.

We add a new section in the registry config:

[grpc.services.storageregistry.drivers.dynamic.aliases]
"eoshome-[dlntz]" = "eosuser-i00"
"eoshome-[agjkw]" = "eosuser-i01"
"eoshome-[horsy]" = "eosuser-i02"
"eoshome-[bemvx]" = "eosuser-i03"
"eoshome-[cfipqu]" = "eosuser-i04"
"newproject-[aegjkqvy]" = "eosproject-i00"
"newproject-[bfhlnopsw]" = "eosproject-i01"
"newproject-[cdimrtuxz]" = "eosproject-i02"

And when the storage registry is passed a storage_id to find its providers, it will ensure if the given storage_id is an alias, it will be resolved.

Fixes #4303

@javfg javfg requested a review from a team as a code owner November 1, 2023 13:39
@gmgigi96 gmgigi96 merged commit 4ec0eb3 into cs3org:master Nov 1, 2023
24 checks passed
@cs3org cs3org deleted a comment from update-docs bot Nov 1, 2023
@@ -195,7 +192,6 @@ func (b *reg) FindProviders(ctx context.Context, ref *provider.Reference) ([]*re
}
}

l.Debug().Msgf(">>>>>> match: %+v %+v", match, shardedMatches)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javfg can we keep this as Debug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable routing by aliased ResourceId in dynamic storage registry driver
3 participants