[Openstack] Swift quota per keystone user
Kévin Bernard-Allies
kbernard-allies at bajoo.fr
Tue Apr 28 08:17:53 UTC 2015
Thanks for your response,
Let's take an example:
I have two user, Alice and Bob.
Alice has access to tenant #1 and #2 (and so, to the Swift accounts
AUTH_1 and AUTH2).
Bob has access to tenant #2 and #3.
I want to prevents Alice and Bob to upload more data than a limit (let's
says 1To per user). The tenant #2 should count for both Alice and
Bob.So, if tenant #1 has 700 Go, tenant #2 has 500 Go and tenant #3 has
200 Go, then Alice has hit the quota (700Go+500Go > 1To), but Bob can
still upload (500Go + 200Go < 1To).
Currently, I have one Swift account for one container, but I do that
only because it's seems the easiest way. I'm open to any architecture.
Le 27-04-2015 19:11, Kuo Hugo a écrit :
> Hi Kevin,
>
> Are you doing multiple user per tenant(Swift account) ?
> or
> Are you doing per tenant (Swift account) per user ?
>
> Does account-quota middleware help ?
> https://github.com/openstack/swift/blob/master/swift/common/middleware/account_quotas.py [2]
>
> I don't really understand " I creates a new tenant for each new shared container, and I add the users with a 'member' role. So, an user can list all tenants which he has access."
>
> Perhaps you can give some specific examples.
>
> Thanks // Hugo
>
> 2015-04-27 21:17 GMT+08:00 Kévin Bernard-Allies <kbernard-allies at bajoo.fr>:
>
>> Hi,
>>
>> I want to set quotas associated to keystone users.
>>
>> In my configuration, an user can create swift containers, and share them with other users.
>> For now, I creates a new tenant for each new shared container, and I add the users with a 'member' role. So, an user can list all tenants which he has access.
>> I want to limit the total space an user can use, counting all containers which he has access.
>>
>> Unfortunately, I've seen nothing who can help me to do that.
>>
>> A solution could be to create a Swift middleware, that will ask Keystone the list of tenants the user belongs to, find the containers corresponding, and sum their sizes. Even with caching, I think this will have bad performances.
>>
>> Another solution could be to use the Swift StatD logging, although I'm not usre of what I can do with it.
>>
>> Has anyone an use case similar to mine ? What are your solutions ?
>> What solution would be the easiest to implement ?
>>
>> thanks
>>
>> _______________________________________________
>> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack [1]
>> Post to : openstack at lists.openstack.org
>> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack [1]
Links:
------
[1] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
[2]
https://github.com/openstack/swift/blob/master/swift/common/middleware/account_quotas.py
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150428/9a150e6d/attachment.html>
More information about the Openstack
mailing list