[openstack-dev] [openstack][magnum] Quota for Magnum Resources
Tim Bell
Tim.Bell at cern.ch
Tue Dec 15 06:22:08 UTC 2015
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.
For details, see the Nova functions at
https://review.openstack.org/#/c/242626/. Cinder now also has similar
functions.
Tim
From: Vilobh Meshram [mailto:vilobhmeshram.openstack at gmail.com]
Sent: 15 December 2015 01:59
To: OpenStack Development Mailing List (not for usage questions)
<openstack-dev at lists.openstack.org>; OpenStack Mailing List (not for usage
questions) <openstack at lists.openstack.org>
Subject: [openstack-dev] [openstack][magnum] Quota for Magnum Resources
Hi All,
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,
and the limitation should be configurable[1].
I proposed following design :-
1. Introduce new table magnum.quotas
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| project_id | varchar(255) | YES | MUL | NULL | |
| resource | varchar(255) | NO | | NULL | |
| hard_limit | int(11) | YES | | NULL | |
| deleted | int(11) | YES | | NULL | |
+------------+--------------+------+-----+---------+----------------+
resource can be Bay, Pod, Containers, etc.
2. API controller for quota will be created to make sure basic CLI commands
work.
quota-show, quota-delete, quota-create, quota-update
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.
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.
5. Introduce a config variable to set quotas values.
If everyone agrees will start the changes by introducing quota restrictions on
Bay creation.
Thoughts ??
-Vilobh
[1] https://blueprints.launchpad.net/magnum/+spec/resource-quota
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151215/54206a00/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7349 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151215/54206a00/attachment.bin>
More information about the OpenStack-dev
mailing list