<div dir="ltr">Hi all,<div><br></div><div style>A colleague of mine showed me an interesting behaviour of quantum quotas, and I am totally ashamed to say I did not have a straight answer for him. Perhaps you can help me.</div>
<div style><br></div><div style>Quantum has several API operations which trigger more or less directly the creation of a port. For instance: PUT /v2.0/routers/<id>/add_router_interface</div><div style>Port Quota checking is bypassed for these operation.<br>
</div><div style>To prove this I did the following:</div><div style>1) reduce port_quota in quantum.conf to 10</div><div style>2) creates 6 network, 6 subnets and attach them to a router</div><div style>As a result the tenant own 12 ports (6 dhcp + 6 router), and the quota is already exceeded.</div>
<div style>New ports can't be created via API (and nova), but attaching subnets to routers keeps adding ports without problems.</div><div style><br></div><div style>At first I thought that this was intended behaviour, since 'service' ports should not count toward the quota; but on the other hand they are taken into account when the API checks current usage with get_ports_count. Is this still desired behaviour?</div>
<div style>I think there might be either a bug or a design issue, but I would like to confirm with people that are more expert than me with quotas, both from a user and a developer perspective.<br></div><div style><br></div>
<div style>Bug:</div><div style>If 'service' ports should not be counted, ports whose device_owner starts with 'network:' should not be counted when validating quota availability. (Note: must include adv svcs too - eg: quantum:LOADBALANCER). </div>
<div style>The above would be easy.</div><div style><br></div><div style>Design issue:</div><div style>if these ports should count for quotas, the API layer should perform the quota check also for operations which will indirectly create a port.</div>
<div style>This is not terribly difficult, but it would probably require to change a thing or two in the base controller.</div><div style><br></div><div style>Thanks in advance for your comments,</div><div style>Salvatore</div>
<div style><b><br></b></div>
</div>