Quota Reset not working

Bug #1363914 reported by Kumar Harsh
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R1.1
Fix Released
High
Sachin Bansal
Trunk
Fix Released
High
Sachin Bansal

Bug Description

R1.10 Ubuntu havana build 28

update quota settings in /etc/contrail/contrail-api.conf :

[QUOTA]
subnet=2
virtual-network=2
floating-ip=2
logical-router=2
security-group=2
security-group_rule=5
virtual-machine-interface=3

root@nodea9:~# neutron quota-show 11f26665e6e1437b8270c21bf5ca64c1
+---------------------+-------+
| Field | Value |
+---------------------+-------+
| floatingip | 2 |
| nat_instance | -1 |
| network | 2 |
| port | 3 |
| route_table | 2 |
| router | 2 |
| security_group | 2 |
| security_group_rule | 5 |
| subnet | 2 |
+---------------------+-------+

Remove [QUOTA] limit from /etc/contrail/contrail-api.conf :

restart contrail-api service

Still same quota limits are set :

root@nodea9:~# neutron quota-show 11f26665e6e1437b8270c21bf5ca64c1
+---------------------+-------+
| Field | Value |
+---------------------+-------+
| floatingip | 2 |
| nat_instance | -1 |
| network | 2 |
| port | 3 |
| route_table | 2 |
| router | 2 |
| security_group | 2 |
| security_group_rule | 5 |
| subnet | 2 |
+---------------------+-------+

root@nodea9:~# neutron quota-list 11f26665e6e1437b8270c21bf5ca64c1
+------------+--------------+---------+------+-------------+--------+----------------+---------------------+--------+--------------------------------------+
| floatingip | nat_instance | network | port | route_table | router | security_group | security_group_rule | subnet | tenant_id |
+------------+--------------+---------+------+-------------+--------+----------------+---------------------+--------+--------------------------------------+
| 2 | -1 | 2 | 3 | 2 | 2 | 2 | 5 | 2 | 8e56d1e2-da69-418d-85bd-b1f4f1a03702 |
| 50 | -1 | -1 | -1 | -1 | 10 | 10 | 100 | -1 | c8bcfb72-33b7-488b-8976-e00aa1a0cf58 |
| -1 | -1 | 2 | -1 | -1 | -1 | -1 | -1 | 2 | c5d54a78-cbfb-48b0-8fd1-8507a292878e |
| -1 | -1 | 2 | -1 | -1 | -1 | -1 | -1 | 2 | 4c935d93-d292-469c-8fce-8c40639f8705 |
| -1 | -1 | 2 | -1 | -1 | -1 | -1 | -1 | 2 | 8d4e101a-cc21-4bcd-9c86-d808038b562a |
| -1 | -1 | 2 | -1 | -1 | -1 | -1 | -1 | 2 | 11f26665-e6e1-437b-8270-c21bf5ca64c1 |
+------------+--------------+---------+------+-------------+--------+----------------+---------------------+--------+--------------------------------------+

Not able to create neutron objects beyond quota limits even after resetting quota limits .
Throws internal server error :

Try to create 3 networks :

root@nodea9:~# neutron subnet-create 04a92506-23af-4b80-a53b-b3093c1897ac 99.0.0.0/24 --tenant-id 11f26665e6e1437b8270c21bf5ca64c1
Created a new subnet:
+------------------+--------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------+
| allocation_pools | {"start": "99.0.0.2", "end": "99.0.0.254"} |
| cidr | 99.0.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 99.0.0.1 |
| host_routes | |
| id | 5dd7d94d-be11-4255-9325-d78db3fa4049 |
| ip_version | 4 |
| name | |
| network_id | 04a92506-23af-4b80-a53b-b3093c1897ac |
| tenant_id | 11f26665e6e1437b8270c21bf5ca64c1 |
+------------------+--------------------------------------------+
root@nodea9:~#
root@nodea9:~#
root@nodea9:~# neutron subnet-create 04a92506-23af-4b80-a53b-b3093c1897ac 100.0.0.0/24 --tenant-id 11f26665e6e1437b8270c21bf5ca64c1
Created a new subnet:
+------------------+----------------------------------------------+
| Field | Value |
+------------------+----------------------------------------------+
| allocation_pools | {"start": "100.0.0.2", "end": "100.0.0.254"} |
| cidr | 100.0.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 100.0.0.1 |
| host_routes | |
| id | 909b1a96-ae30-4f37-9472-5b2eacadceae |
| ip_version | 4 |
| name | |
| network_id | 04a92506-23af-4b80-a53b-b3093c1897ac |
| tenant_id | 11f26665e6e1437b8270c21bf5ca64c1 |
+------------------+----------------------------------------------+
root@nodea9:~#
root@nodea9:~# neutron subnet-create 04a92506-23af-4b80-a53b-b3093c1897ac 200.0.0.0/24 --tenant-id 11f26665e6e1437b8270c21bf5ca64c1

Issue both with custom and admin tenant .

Kumar Harsh (hkumar)
Changed in opencontrail:
status: New → Invalid
no longer affects: opencontrail
Changed in juniperopenstack:
importance: Undecided → High
assignee: nobody → Sachin Bansal (sbansal)
tags: added: blocker
tags: added: releasenote
Revision history for this message
Sachin Bansal (sbansal) wrote :
Vinay Mahuli (vmahuli)
tags: added: neutronapi
removed: neutron-api
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/3338
Committed: http://github.org/Juniper/contrail-neutron-plugin/commit/cb5251d1d70a7dff9a590651840fafa18dcf9962
Submitter: Zuul
Branch: R1.10

commit cb5251d1d70a7dff9a590651840fafa18dcf9962
Author: Sachin Bansal <email address hidden>
Date: Mon Sep 8 17:43:01 2014 -0700

We will use default-project to store default quotas. If quota is not set for a particular resource, we should not check its values in default-project
We will need corresponding fix in api server for this to work

Change-Id: I164e871fbed8cd3c172084377c228a63e6b01a1f
Partial-Bug: 1363914
(cherry picked from commit 7e9ed18d3fbf01e53102e928012405312a0da051)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/3339
Committed: http://github.org/Juniper/contrail-controller/commit/49b64b171546eb318619ccbd14a31d5aa562cef7
Submitter: Zuul
Branch: R1.10

commit 49b64b171546eb318619ccbd14a31d5aa562cef7
Author: Sachin Bansal <email address hidden>
Date: Mon Sep 8 17:44:26 2014 -0700

We will now store default quotas in default-project.
It will be overwritten every time api server is restarted. Earlier, we were writing configured values in each project which makes us not able to distinguish between the cases where quota values are set on that project or not. As a result, subsequent updates to quota values were not being applied to existing projects.

With the new change, we will for each resource, we will first check if it is configured for that project. If not, we will check the default-project (which is configured through the config file), then finally code default value of -1

Change-Id: I36eed73a028b945bf51a4f74a8e9eb625cf4bf20
Closes-Bug: 1363914
(cherry picked from commit 9bb29366cee89797cd1199bbee5ed638586507fc)

Revision history for this message
Kumar Harsh (hkumar) wrote :

Not working in R1.10 Build 52 ubuntu havana

Setup info :
env.roledefs = {
    'all': [host1,],
    'cfgm': [host1,],
    'openstack': [host1],
    'control': [host1,],
    'compute': [host1, ],
    'collector': [host1],
    'webui': [host1],
    'database': [host1,],
    'build': [host_build],
}

env.hostnames = {
    'all': ['nodeg38',]
}

Update /etc/contrail/contrail-api.conf

[QUOTA]
subnet=2
virtual-network=2
floating-ip=2
logical-router=2
security-group=2
security-group_rule=5
virtual-machine-interface=3

root@nodeg38:~# service contrail-api restart
contrail-api:0: stopped
contrail-api:0: started

root@nodeg38:~# neutron quota-show
+---------------------+-------+
| Field | Value |
+---------------------+-------+
| floatingip | -1 |
| nat_instance | -1 |
| network | -1 |
| port | -1 |
| route_table | -1 |
| router | -1 |
| security_group | -1 |
| security_group_rule | -1 |
| subnet | 2 |
+---------------------+-------+

root@nodeg38:~# neutron quota-list
+------------+--------------+---------+------+-------------+--------+----------------+---------------------+--------+--------------------------------------+
| floatingip | nat_instance | network | port | route_table | router | security_group | security_group_rule | subnet | tenant_id |
+------------+--------------+---------+------+-------------+--------+----------------+---------------------+--------+--------------------------------------+
| -1 | -1 | -1 | -1 | -1 | -1 | -1 | -1 | 2 | 453288a6-d536-4690-bb2a-ee9727b9f974 |
+------------+--------------+---------+------+-------------+--------+----------------+---------------------+--------+---------------------------

This is for admin tenant

Revision history for this message
Sachin Bansal (sbansal) wrote :

Please set default values using '_' instead of '-'.

Revision history for this message
Kumar Harsh (hkumar) wrote :

Working with following keys :
[QUOTA]
subnet=7
virtual_network=1
floating_ip=2
logical_router=3
security_group=4
security_group_rule=5
virtual_machine_interface=5

Marking as fix released

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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