Openstackclient does not support the --force parameter for quota setting

Bug #1738981 reported by Theodoros Tsioutsias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
In Progress
Undecided
Theodoros Tsioutsias

Bug Description

Description
===========

The --force parameter is missing from the "openstack quota set" command.
As a result of this, there is no way to set the --compute quotas to values less that the used/reserved using the openstackclient.

On the other hand, the command "nova quota-update" supports the use of a force option (--force).
This allows the admins to set the quota to values lower than the used/reserved.

 --force Whether force update the quota even if the
                               already used and reserved exceeds the new
                               quota.

Steps to reproduce
==================

It seems that setting volume and networking quota to values lower than the used is allowed.

E.g.

Even after creating two volumes, the --volumes quota can be set to 1 without problems:

stack@devstack-010:~$ openstack volume list
+--------------------------------------+--------------+-----------+------+-------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| 252a0d84-9456-49c2-931c-074119259ac8 | test_volume1 | available | 15 | |
| a84cd191-4c25-4c36-b28a-60da15ed4719 | test_volume | available | 20 | |
+--------------------------------------+--------------+-----------+------+-------------+
stack@devstack-010:~$ openstack quota set --volumes 1 admin

The same applies for floating ips:

stack@devstack-010:~$ openstack floating ip list -c ID -c "Floating IP Address" -c Project
+--------------------------------------+---------------------+----------------------------------+
| ID | Floating IP Address | Project |
+--------------------------------------+---------------------+----------------------------------+
| 798dad32-a834-4364-ac80-4d9eabd55f0d | 172.24.4.5 | a9dc783f37764750a01b3e3197959529 |
| eee43cbf-9022-48a5-83dc-22db15e967d9 | 172.24.4.9 | a9dc783f37764750a01b3e3197959529 |
+--------------------------------------+---------------------+----------------------------------+
stack@devstack-010:~$ openstack quota set --floating-ips 1 a9dc783f37764750a01b3e3197959529

But when setting the --instances quota:

stack@devstack-010:~$ openstack server list -c ID -c Name -c Status
+--------------------------------------+---------------+--------+
| ID | Name | Status |
+--------------------------------------+---------------+--------+
| 8573f7a7-41c5-49ab-ab91-40a0126350a0 | ttesting-vm-2 | ACTIVE |
| cf96fdde-668b-4d3e-96cd-21d6066ac46a | ttesting-vm-1 | ACTIVE |
+--------------------------------------+---------------+--------+
stack@devstack-010:~$ openstack quota set --instances 1 a9dc783f37764750a01b3e3197959529
Quota limit 1 for instances must be greater than or equal to already used and reserved 2. (HTTP 400) (Request-ID: req-e8ba1e66-7f7c-4e77-8a91-2a134fcfc7c9)

Expected result
===============

The option to force the update should be available since the nova quota-set supports it.

Actual result
=============

There is no way to set the quota to the desired value using the openstackclient.

Comments
========

It would be great to have the force option, as it allows the operators to stop the creation of new VMs in user projects.

Changed in python-openstackclient:
assignee: nobody → Theodoros Tsioutsias (ttsiouts)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/551811

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
Theodoros Tsioutsias (ttsiouts) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.