add/support enabled_tenants and disabled_tenants feature in storegateway#5186
add/support enabled_tenants and disabled_tenants feature in storegateway#5186moki1202 wants to merge 2 commits into
Conversation
|
@friedrichg Do I need to create a new function to filter out users that are not allowed? |
|
@friedrichg Is there a function/map that stores all the incoming users in the bucket? I tried finding it in the |
|
@moki1202 filterUsers function is already in the right places cortex/pkg/storegateway/bucket_stores.go Line 212 in 47733dd Concentrate making changes on https://github.com/cortexproject/cortex/blob/master/pkg/storegateway/sharding_strategy.go |
understood! I'll try this. |
b38ba42 to
6054659
Compare
6054659 to
a8bd542
Compare
a8bd542 to
1e179ec
Compare
Signed-off-by: Shashank <shashanksingh819@gmail.com>
1e179ec to
a18fcd9
Compare
Signed-off-by: Shashank <shashanksingh819@gmail.com>
a18fcd9 to
204f95c
Compare
|
@friedrichg I've tried a lot but I am struggling while updating the tests. Can you please help me out here? I would just ask for your help in updating the defaultShardingStrategy tests. I'll try doing the other ones after. |
| subRing := GetShuffleShardingSubring(s.r, userID, s.limits) | ||
|
|
||
| //filter out users not owned by this shard. | ||
| if !s.allowedTenants.IsAllowed(userID) { |
There was a problem hiding this comment.
No, we need the GetShuffleShardingSubring on the filtered users, otherwise we might end up with store-gateways running without users
| "127.0.0.2": {block2, block4}, | ||
| }, | ||
| }, | ||
| "two ACTIVE instances in the ring with replication factor = 1 and one tenant disabled": { |
There was a problem hiding this comment.
Unfortunately, this function does not test FilterUsers, it tests FilterBlocks. So this is not the right place
|
Thanks, partially included in #5638 |
Signed-off-by: Shashank shashanksingh819@gmail.com
What this PR does: Now adds/supports
enabled_tenantsanddisabled_tenantsin packagestoregatewayFixes #5133
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]PR still in progress.