After completing this section, you should be able to manage resource quotas for an individual project, to ensure sufficient resource availability and protection from misuse.
Domain operators manage limits for all projects in their domain, unless that role is delegated to a more appropriate user. All cloud users (project owners, application developers, scientific researchers (High Performance Computing), and application architects) should be experienced and capable enough to manage their project quota, because they are the subject matter expert for the application they are creating or managing. Abusing the privilege by increasing project quotas is unlikely to happen, due to the visibility of resource usage.
If your organization is complex and uses several layers of nested projects, the limits applied to the parent project could be expected to include any child projects. Unfortunately hierarchical limits are not yet available in Red Hat OpenStack 16, and each child project has its own set of limits independent of the parent.
Red Hat OpenStack Platform has default quota values that provide quota restrictions for projects. The default quota can be modified to provide more or less resources for project deployments as needed.
To view the default quotas using the CLI, run the openstack quota show --default command as a user with admin privileges.
[user@demo ~(admin)]$ openstack quota show --default
+-----------------------+------------------------+
| Field | Value |
+-----------------------+------------------------+
| backup-gigabytes | 1000 |
| backups | 10 |
| cores | 20 |
| fixed-ips | -1 |
| floating-ips | 50 |
...output omitted...
| secgroups | 10 |
| server-group-members | 10 |
| server-groups | 10 |
| snapshots | 10 |
| subnet_pools | -1 |
| subnets | 100 |
| volumes | 10 |
+-----------------------+------------------------+To view the default quotas in the Dashboard, log in as a user with admin privileges and navigate to → → . The tab displays the default limits.
The default quotas can be updated to set new quota limits for all projects. A user with the project-scope admin role can update the default project quotas using the openstack quota set command. Use the --class option to utilize the default quota class. For example, run the following command to set the maximum number of instances quota to 20:
[user@demo ~(admin)]$ openstack quota set --instances 20 --class defaultFor the Dashboard, log in as a user with the admin role, and navigate to → → . Click to update the default project quotas. Note that not all quota items may be listed, as the Dashboard is developed as a separate project.
When projects are created, the project quotas can be defined to override the default values. Using the CLI, use the openstack quota set command to set the new quota values. For example, to set the memory to 10240 MB in the demo-project project, use the following command:
[user@demo ~(admin)]$ openstack quota set --ram 10240 demo-projectThe following message displays if you attempt to exceed the quota:
Quota exceeded for ram: Requested 2048, but already used 10240 of 10240 ram (HTTP 403) (Request-ID: req-cfca3d6b-340d-481d-976b-2de7c40c2089)The following list describes some less obvious quota parameters:
Quota Parameters
The number of server groups per project. Server groups are used to control the affinity and anti-affinity scheduling policy for a group of instances. All instances in a single affinity group run on the same hypervisor. Instances in an anti-affinity group run on different hypervisors.
The number of servers in a single server group. Unlimited anti-affinity could allow a user to derive information about the overall size of the cloud, which is generally considered private information of the cloud provider. Unlimited server groups could be used as a DoS attack against systems not protected by an API rate limiter. For instance, a user could create groups until the identity database fills up.
The number of injected files allowed per project. The process of putting a file into an instance image before the instance is started is termed file injection.
The number of metadata items allowed per instance. Metadata items are instance properties given in key-value pairs.
Additional information is available in the section on Project Management in the Users and Identity Management Guide for Red Hat OpenStack Platform, which can be found at https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.0/html-single/users_and_identity_management_guide