<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: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=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@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;}
/* 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.hoenzb
        {mso-style-name:hoenzb;}
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'>Given the lower level quotas in Heat, Neutron, Nova etc., the error feedback is very important. A Magnum “cannot create” message requires a lot of debugging whereas a “Floating IP quota exceeded” gives a clear root cause.<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'>Whether we quota Magnum resources or not, some error scenarios and appropriate testing+documentation would be a great help for operators.<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> 20 December 2015 18:50<br><b>To:</b> OpenStack Development Mailing List (not for usage questions) <openstack-dev@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><div><p class=MsoNormal>This sounds like a source-of-truth concern. From my perspective the solution is not to create redundant quotas. Simply quota the Magnum resources. Lower level limits *could* be queried by magnum prior to acting to CRUD the lower level resources. In the case we could check the maximum allowed number of (or access rate of) whatever lower level resource before requesting it, and raising an understandable error. I see that as an enhancement rather than a must-have. In all honesty that feature is probably more complicated than it's worth in terms of value.<br><br>-- <o:p></o:p></p><div><p class=MsoNormal>Adrian<o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>On Dec 20, 2015, at 6:36 AM, Jay Lau <<a href="mailto:jay.lau.513@gmail.com">jay.lau.513@gmail.com</a>> wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal>I also have the same concern with Lee, as Magnum depend on HEAT  and HEAT need call nova, cinder, neutron to create the Bay resources. But both Nova and Cinder has its own quota policy, if we define quota again in Magnum, then how to handle the conflict? Another point is that limiting the Bay by quota seems a bit coarse-grainded as different bays may have different configuration and resource request. Comments? Thanks.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Thu, Dec 17, 2015 at 4:10 AM, Lee Calcote <<a href="mailto:leecalcote@gmail.com" target="_blank">leecalcote@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal>Food for thought - there is a cost to FIPs (in the case of public IP addresses), security groups (to a lesser extent, but in terms of the computation of many hundreds of them), etc. Administrators may wish to enforce quotas on a variety of resources that are direct costs or indirect costs (e.g. # of bays, where a bay consists of a number of multi-VM / multi-host pods and services, which consume CPU, mem, etc.). <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If Magnum quotas are brought forward, they should govern (enforce quota) on Magnum-specific constructs only, correct? Resources created by Magnum COEs should be governed by existing quota policies governing said resources (e.g. Nova and vCPUs).<o:p></o:p></p></div><div><p class=MsoNormal><span style='color:#888888'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='color:#888888'>Lee<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><div><p class=MsoNormal>On Dec 16, 2015, at 1:56 PM, Tim Bell <<a href="mailto:Tim.Bell@cern.ch" target="_blank">Tim.Bell@cern.ch</a>> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div><div><div><div><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt;text-align:start;word-spacing:0px'><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>-----Original Message-----<br>From: Clint Byrum [<a href="mailto:clint@fewbar.com" target="_blank">mailto:clint@fewbar.com</a>]<br>Sent: 15 December 2015 22:40<br>To: openstack-dev <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>Subject: Re: [openstack-dev] [openstack][magnum] Quota for Magnum<br>Resources<br><br>Hi! Can I offer a counter point?<br><br>Quotas are for _real_ resources.<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'><br>The CERN container specialist agrees with you ... it would be good to<br>reflect on the needs given that ironic, neutron and nova are policing the<br>resource usage. Quotas in the past have been used for things like key pairs<br>which are not really real.<br><br style='text-align:start;word-spacing:0px'><br></span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>Memory, CPU, disk, bandwidth. These are all _closely_ tied to things that<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>cost<br style='text-align:start;word-spacing:0px'><br></span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>real money and cannot be conjured from thin air. As such, the user being<br>able to allocate 1 billion or 2 containers is not limited by Magnum, but<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>by real<br style='text-align:start;word-spacing:0px'><br></span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>things that they must pay for. If they have enough Nova quota to allocate<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>1<br style='text-align:start;word-spacing:0px'><br></span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>billion tiny pods, why would Magnum stop them? Who actually benefits from<br>that limitation?<br><br>So I suggest that you not add any detailed, complicated quota system to<br>Magnum. If there are real limitations to the implementation that Magnum<br>has chosen, such as we had in Heat (the entire stack must fit in memory),<br>then make that the limit. Otherwise, let their vcpu, disk, bandwidth, and<br>memory quotas be the limit, and enjoy the profit margins that having an<br>unbound force multiplier like Magnum in your cloud gives you and your<br>users!<br><br>Excerpts from Vilobh Meshram's message of 2015-12-14 16:58:54 -0800:<br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>Hi All,<br><br>Currently, it is possible to create unlimited number of resource like<br>bay/pod/service/. In Magnum, there should be a limitation for user or<br>project to create Magnum resource, and the limitation should be<br>configurable[1].<br><br>I proposed following design :-<br><br>1. Introduce new table magnum.quotas<br>+------------+--------------+------+-----+---------+----------------+<br><br>| Field      | Type         | Null | Key | Default | Extra          |<br><br>+------------+--------------+------+-----+---------+----------------+<br><br>| id         | int(11)      | NO   | PRI | NULL    | auto_increment |<br><br>| created_at | datetime     | YES  |     | NULL    |                |<br><br>| updated_at | datetime     | YES  |     | NULL    |                |<br><br>| deleted_at | datetime     | YES  |     | NULL    |                |<br><br>| project_id | varchar(255) | YES  | MUL | NULL    |                |<br><br>| resource   | varchar(255) | NO   |     | NULL    |                |<br><br>| hard_limit | int(11)      | YES  |     | NULL    |                |<br><br>| deleted    | int(11)      | YES  |     | NULL    |                |<br><br>+------------+--------------+------+-----+---------+----------------+<br><br>resource can be Bay, Pod, Containers, etc.<br><br><br>2. API controller for quota will be created to make sure basic CLI<br>commands work.<br><br>quota-show, quota-delete, quota-create, quota-update<br><br>3. When the admin specifies a quota of X number of resources to be<br>created the code should abide by that. For example if hard limit for Bay<o:p></o:p></span></p></blockquote></blockquote><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>is 5<br style='text-align:start;word-spacing:0px'><br></span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>(i.e.<br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>a project can have maximum 5 Bay's) if a user in a project tries to<br>exceed that hardlimit it won't be allowed. Similarly goes for other<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>resources.<br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'><br>4. Please note the quota validation only works for resources created<br>via Magnum. Could not think of a way that Magnum to know if a COE<br>specific utilities created a resource in background. One way could be<br>to see the difference between whats stored in magnum.quotas and the<br>information of the actual resources created for a particular bay in<o:p></o:p></span></p></blockquote></blockquote><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>k8s/COE.<br style='text-align:start;word-spacing:0px'><br></span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'><br>5. Introduce a config variable to set quotas values.<br><br>If everyone agrees will start the changes by introducing quota<br>restrictions on Bay creation.<br><br>Thoughts ??<br><br><br>-Vilobh<br><br>[1] <a href="https://blueprints.launchpad.net/magnum/+spec/resource-quota" target="_blank">https://blueprints.launchpad.net/magnum/+spec/resource-quota</a><o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'><br>________________________________________________________________<br>__________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: OpenStack-dev-<br><a href="mailto:request@lists.openstack.org" target="_blank">request@lists.openstack.org</a>?subject:unsubscribe<br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></span></p></blockquote></div></div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: </span><a href="mailto:OpenStack-dev-request@lists.openstack.org" target="_blank"><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>OpenStack-dev-request@lists.openstack.org</span></a><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>?subject:unsubscribe<br></span><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank"><span style='font-size:10.5pt;font-family:"Calibri",sans-serif'>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</span></a><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><br><br clear=all><br>-- <o:p></o:p></p><div><div><div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Thanks,<o:p></o:p></p></div><p class=MsoNormal>Jay Lau (Guangya Liu)<o:p></o:p></p></div></div></div></div></div></div></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>__________________________________________________________________________<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><o:p></o:p></p></div></blockquote></div></div></body></html>