Quota updated through nova api not refelected in Horizon

Bug #1399065 reported by Sumanth on 2014-12-04
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Unassigned
OpenStack Compute (nova)
Undecided
Unassigned
OpenStack Dashboard (Horizon)
Undecided
Unassigned
neutron
Undecided
Unassigned

Bug Description

I am trying to update the quota of the user using the nova.quota.update( ... ), when i do this the quota is reflected in the commmond line but the same updated values are not reflected in the horizon dashboard.

Changed in nova:
assignee: nobody → tcs_openstack_group (tcs-openstack-group)
Changed in nova:
assignee: tcs_openstack_group (tcs-openstack-group) → venkata anil (anil-venkata)
Joe Gordon (jogo) wrote :

This sounds like it is a horizon bug, since you see the change in the command line and not in horizon.

Changed in nova:
status: New → Invalid
Joe Gordon (jogo) wrote :

Perhaps you are changing the wrong quota

Sumanth (avadhanisumanth1) wrote :

I think I am doing right to update the instance in say admin tenant, I call

nova.quotas.update('admin', Instances=8)

Is the right way to do it in api version 2 ?

Lin Hua Cheng (lin-hua-cheng) wrote :

what happens if you attempt to update the quota in horizon? Does it work?

You can find the feature through: Dashboard -> Identity -> Projects -> Edit

Changed in horizon:
assignee: nobody → venkata anil (anil-venkata)
Julie Pichon (jpichon) wrote :

Looking at https://github.com/openstack/python-novaclient/blob/master/novaclient/v1_1/quotas.py , the first argument for a quota update should be the tenant id, not name.

If you run "nova quota-show --tenant <tenant-id>" (that is, using the tenant *ID* for the admin project, not its name), do you still see the correct updated quota?

This reminds me of bug 1317515: Nova doesn't validate the tenant id is with Keystone (yet?) so it accepts any value as a possible id, which causes confusion for people using the names directly.

Changed in horizon:
status: New → Incomplete
Changed in horizon:
assignee: venkata anil (anil-venkata) → nobody
Changed in nova:
assignee: venkata anil (anil-venkata) → nobody
Changed in horizon:
status: Incomplete → Invalid
Bruno Lago (teolupus) wrote :
Download full text (4.0 KiB)

Running OpenStack IceHouse.

I can confirm that if I do:

nova quota-update --instances 0 [...--all other things 0...] my-tenant-name

nova quota-show my-tenant-name

+-----------------------------+-------+
| Quota | Limit |
+-----------------------------+-------+
| instances | 0 |
| cores | 0 |
| ram | 0 |
| floating_ips | 0 |
| fixed_ips | 0 |
| metadata_items | 0 |
| injected_files | 0 |
| injected_file_content_bytes | 0 |
| injected_file_path_bytes | 0 |
| key_pairs | 0 |
| security_groups | 0 |
| security_group_rules | 0 |
+-----------------------------+-------+

You can see that the quota update apparently works and I can even query the quota for my-tenant-name and get back the right results.

However, when I query the TENANT_ID that matches my tenant name, I see:

nova quota-show --tenant $TENANT_ID

+-----------------------------+-------+
| Quota | Limit |
+-----------------------------+-------+
| instances | 10 |
| cores | 20 |
| ram | 65536 |
| floating_ips | 5 |
| fixed_ips | -1 |
| metadata_items | 128 |
| injected_files | 5 |
| injected_file_content_bytes | 10240 |
| injected_file_path_bytes | 255 |
| key_pairs | 100 |
| security_groups | 10 |
| security_group_rules | 20 |
+-----------------------------+-------+

The same is shown on the dashboard, and as expected, I can launch instances.

Looking at the quotas table in the database, in particular the tenant-id, we can see that OpenStack inserted the tenant name (my-tenant-name), instead the tenant-id in the tenant-id column.

mysql> select * from quotas;

| 3015 | 2015-07-30 03:40:33 | 2015-07-30 04:26:04 | NULL | my-tenant-name | metadata_items | 1 | 0 |
| 3018 | 2015-07-30 03:40:33 | 2015-07-30 04:26:04 | NULL | my-tenant-name | injected_file_content_bytes | 1 | 0 |
| 3021 | 2015-07-30 03:40:33 | 2015-07-30 04:26:04 | NULL | my-tenant-name | ram | 1 | 0 |
| 3024 | 2015-07-30 03:40:33 | 2015-07-30 04:26:04 | NULL | my-tenant-name | floating_ips | 1 | 0 |
| 3027 | 2015-07-30 03:40:33 | 2015-07-30 04:26:04 | NULL | my-tenant-name | key_pairs | 1 | 0 |
| 3030 | 2015-07-30 03:40:33 | 2015-07-30 04:26:04 | NULL | my-tenant-name | instances | 1 | 0 |
| 3033 | 2015-07-30 03:40:33 | 2015-07-30 04:26:04 | NULL | my-tenant-name | injected_files | 1 | 0 |
| 3036 | 2015-07-30 03:40:33 | 2015-07-30 04:26:04 | NULL | my-tenant-name | cores | 1 | 0 |
| 3039 | 2015-07-30 03:40:33 | 2015-07-3...

Read more...

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

Other bug subscribers