<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Georgia;
        panose-1:2 4 5 2 5 4 5 2 3 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Thanks… it is really important from the user experience that we keep the nested quota implementations in sync so we don’t have different semantics.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Tim<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Adrian Otto [mailto:adrian.otto@rackspace.com] <br><b>Sent:</b> 15 December 2015 18:44<br><b>To:</b> OpenStack Development Mailing List (not for usage questions) <openstack-dev@lists.openstack.org><br><b>Cc:</b> OpenStack Mailing List (not for usage questions) <openstack@lists.openstack.org><br><b>Subject:</b> Re: [openstack-dev] [openstack][magnum] Quota for Magnum Resources<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Vilobh, <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for advancing this important topic. I took a look at what Tim referenced how Nova is implementing nested quotas, and it seems to me that’s something we could fold in as well to our design. Do you agree?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Adrian<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>On Dec 14, 2015, at 10:22 PM, Tim Bell <<a href="mailto:tim.bell@cern.ch">tim.bell@cern.ch</a>> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Can we have nested project quotas in from the beginning ? Nested projects are in Keystone V3 from Kilo onwards and retrofitting this is hard work.</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>For details, see the Nova functions at<span class=apple-converted-space> </span><a href="https://review.openstack.org/#/c/242626/"><span style='color:purple'>https://review.openstack.org/#/c/242626/</span></a>. Cinder now also has similar functions.</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Tim</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p></div><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><div><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span class=apple-converted-space><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> </span></span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Vilobh Meshram [<a href="mailto:vilobhmeshram.openstack@gmail.com">mailto:vilobhmeshram.openstack@gmail.com</a>]<span class=apple-converted-space> </span><br><b>Sent:</b><span class=apple-converted-space> </span>15 December 2015 01:59<br><b>To:</b><span class=apple-converted-space> </span>OpenStack Development Mailing List (not for usage questions) <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>>; OpenStack Mailing List (not for usage questions) <<a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>><br><b>Subject:</b><span class=apple-converted-space> </span>[openstack-dev] [openstack][magnum] Quota for Magnum Resources</span><o:p></o:p></p></div></div></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><div><div><p class=MsoNormal><span style='font-family:"Georgia",serif;color:#333333'>Hi All,</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='line-height:13.5pt'><span style='font-family:"Georgia",serif;color:#333333'> </span><o:p></o:p></p></div></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif;color:#333333'>Currently, it is possible to create unlimited number of resource like bay/pod/service/. In Magnum, there should be a limitation for user or project to create Magnum resource,<br>and the limitation should be configurable[1]. </span><o:p></o:p></p></div><div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal><span style='font-family:"Georgia",serif;color:#333333'>I proposed following design :-</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal><span style='font-family:"Georgia",serif;color:#333333'>1. Introduce new table magnum.quotas</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>+------------+--------------+------+-----+---------+----------------+</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| Field      | Type         | Null | Key | Default | Extra          |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>+------------+--------------+------+-----+---------+----------------+</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| id         | int(11)      | NO   | PRI | NULL    | auto_increment |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| created_at | datetime     | YES  |     | NULL    |                |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| updated_at | datetime     | YES  |     | NULL    |                |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| deleted_at | datetime     | YES  |     | NULL    |                |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| project_id | varchar(255) | YES  | MUL | NULL    |                |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| resource   | varchar(255) | NO   |     | NULL    |                |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| hard_limit | int(11)      | YES  |     | NULL    |                |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>| deleted    | int(11)      | YES  |     | NULL    |                |</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Georgia",serif'>+------------+--------------+------+-----+---------+----------------+</span><o:p></o:p></p></div><div><p class=MsoNormal>resource can be Bay, Pod, Containers, etc.<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>2. API controller for quota will be created to make sure basic CLI commands work.<o:p></o:p></p></div><div><p class=MsoNormal>quota-show, quota-delete, quota-create, quota-update<o:p></o:p></p></div><div><p class=MsoNormal>3. When the admin specifies a quota of X number of resources to be created the code should abide by that. For example if hard limit for Bay is 5 (i.e. a project can have maximum 5 Bay's) if a user in a project tries to exceed that hardlimit it won't be allowed. Similarly goes for other resources. <o:p></o:p></p></div><div><p class=MsoNormal>4. Please note the quota validation only works for resources created via Magnum. Could not think of a way that Magnum to know if a COE specific utilities created a resource in background. One way could be to see the difference between whats stored in magnum.quotas and the information of the actual resources created for a particular bay in k8s/COE.<o:p></o:p></p></div><div><p class=MsoNormal>5. Introduce a config variable to set quotas values.<o:p></o:p></p></div><div><p class=MsoNormal>If everyone agrees will start the changes by introducing quota restrictions on Bay creation.<o:p></o:p></p></div><div><p class=MsoNormal>Thoughts ??<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>-Vilobh<o:p></o:p></p></div><div><p class=MsoNormal>[1] <a href="https://blueprints.launchpad.net/magnum/+spec/resource-quota"><span style='color:purple'>https://blueprints.launchpad.net/magnum/+spec/resource-quota</span></a><o:p></o:p></p></div></div></div></div></div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></span><o:p></o:p></p></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>