Should you mix this into Keystone ? Seems kind of wrong to mix identity manager with Quotas?<br><br><div class="gmail_quote">2012/5/4 Everett Toews <span dir="ltr"><<a href="mailto:everett.toews@cybera.ca" target="_blank">everett.toews@cybera.ca</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since storing the quota data in Keystone is a prereq for do the quotas in Swift, I'm starting there. After digging through the Keystone code a bit I've identified at least one issue with storing the quota data per tenant for the SQL backend.<div>


<br></div><div>In the metadata table both tenant_id and user_id are primary keys. So the question is, *within the current design* how do you store some piece of metadata per tenant only?</div><div><br></div><div><div>Storing the same quota data per user for a tenant doesn't work because of the many-to-many relationship between users and tenants.</div>

</div><div><br></div><div>Another option is to use a static user_id for rows where you want to store metadata per tenant.</div><div>e.g. user_id='per_tenant_metadata', tenant_id='55b6d515e00e48c38e2c92d27dc5c03e', data='{"quota": ...}' (I'll figure out what the JSON looks like later)</div>

<div>
<br></div><div>If you retrieved the quotas via SQL it would look something like,</div><div>select data from metadata where user_id='per_tenant_metadata' and tenant_id='55b6d515e00e48c38e2c92d27dc5c03e';</div>


<div><br></div><div>This works but doesn't feel like the cleanest solution. Any thoughts on this approach?</div><div><br></div><div>Of course, stepping outside the current design would yield more options but I wanted to look for a solution within the current design first.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>Everett</div></font></span><div class="HOEnZb"><div class="h5"><div><br></div><div><div class="gmail_quote">On Tue, May 1, 2012 at 2:04 PM, Everett Toews <span dir="ltr"><<a href="mailto:everett.toews@cybera.ca" target="_blank">everett.toews@cybera.ca</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<div><br></div><div>I led the session [1] on Swift Quotas at the Summit and I'd appreciate some feedback on the updated spec [2] and blueprint [3]. I also have a couple of design level questions.</div><div><br>


</div>
<div>1. Should we store the Swift quota data in Keystone?</div><div><br></div><div>One of the ideas that came out of the session was that we could store the Swift quota data in Keystone. I took a look at Keystone and it appears the best place for this would be in the metada table but it appears to me that it's only accessible via the User Metadata Extension API in Keystone. Is it feasible to store the Swift quota data in Keystone this way? Should we?</div>



<div><br></div><div>On a related note, during the Pluggable Tenant Data session [4] led by Phil Day something similar was being discussed for moving Nova quotas to Keystone.</div><div><br></div><div>2. Where should the code for Swift quotas live?</div>



<div><br></div><div>It was suggested during the session that this code could live in a middleware for Swift. Seems like a reasonable approach to me. I've taken a look at some of the code in /swift/common/middleware and it looks relatively straight-forward. Any thoughts or suggestions on implementing this as middleware?</div>



<div><br></div><div>Regards,</div><div>Everett</div><div><br></div><div>[1] <a href="http://etherpad.openstack.org/SwiftQuotas" target="_blank">http://etherpad.openstack.org/SwiftQuotas</a></div><div>[2] <a href="http://wiki.openstack.org/SwiftQuotas" target="_blank">http://wiki.openstack.org/SwiftQuotas</a></div>



<div>[3] <a href="https://blueprints.launchpad.net/swift/+spec/storage-quotas" target="_blank">https://blueprints.launchpad.net/swift/+spec/storage-quotas</a></div><div>[4] <a href="http://etherpad.openstack.org/FolsomPluggableTenantData" target="_blank">http://etherpad.openstack.org/FolsomPluggableTenantData</a></div>



</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br>