Can't set any default quota values in Horizon

Bug #1292589 reported by Doug Fish
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Sergio Cazzolato
openstack-manuals
Fix Released
Medium
Tom Fifield

Bug Description

To re-create, log in as admin. Navigate to Admin/System Panel/Defaults. Click Update Defaults. Change any quota to a reasonable value (or don't change any at all) and click Update Defaults. There will be both a success and error message (there is a separate bug about that). But no changes from the UI will be applied. Inside the log there is the following trace info:

[Fri Mar 14 14:20:30 2014] [error] NotFound: Not found (HTTP 404)
[Fri Mar 14 14:27:04 2014] [error] Not Found: Not found (HTTP 404)
[Fri Mar 14 14:27:04 2014] [error] Traceback (most recent call last):
[Fri Mar 14 14:27:04 2014] [error] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/defaults/workflows.py", line 93, in handle
[Fri Mar 14 14:27:04 2014] [error] nova.default_quota_update(request, **nova_data)
[Fri Mar 14 14:27:04 2014] [error] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/nova.py", line 626, in default_quota_update
[Fri Mar 14 14:27:04 2014] [error] novaclient(request).quota_classes.update(DEFAULT_QUOTA_NAME, **kwargs)
[Fri Mar 14 14:27:04 2014] [error] File "/usr/lib/python2.6/site-packages/novaclient/v1_1/quota_classes.py", line 44, in update
[Fri Mar 14 14:27:04 2014] [error] 'quota_class_set')
[Fri Mar 14 14:27:04 2014] [error] File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 165, in _update
[Fri Mar 14 14:27:04 2014] [error] _resp, body = self.api.client.put(url, body=body)
[Fri Mar 14 14:27:04 2014] [error] File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 289, in put
[Fri Mar 14 14:27:04 2014] [error] return self._cs_request(url, 'PUT', **kwargs)
[Fri Mar 14 14:27:04 2014] [error] File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 260, in _cs_request
[Fri Mar 14 14:27:04 2014] [error] **kwargs)
[Fri Mar 14 14:27:04 2014] [error] File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 242, in _time_request
[Fri Mar 14 14:27:04 2014] [error] resp, body = self.request(url, method, **kwargs)
[Fri Mar 14 14:27:04 2014] [error] File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 236, in request
[Fri Mar 14 14:27:04 2014] [error] raise exceptions.from_response(resp, body, url, method)
[Fri Mar 14 14:27:04 2014] [error] NotFound: Not found (HTTP 404)

I'm concerned that this has been caused by a change in nova that we haven't reflected in horizon
http://lists.openstack.org/pipermail/openstack-dev/2014-February/027560.html

Revision history for this message
Julie Pichon (jpichon) wrote :

Thank you for the bug report, I can reproduce in a recent devstack.

The email thread is unclear to me, it sounds like people are talking about a new feature that was never fully implemented, while "Update Defaults" did work at some point.

Changed in horizon:
milestone: none → icehouse-rc1
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Julie Pichon (jpichon) wrote :

A few more random things:
 * This used to work in Havana (as set up by devstack, in any case)
 * In the Horizon code, the quota-class name for the defaults is assumed to be "default". Then it becomes possible to reproduce the issue on the command-line with `nova quota-class-show default` and `nova quota-class-update <etc>` (for instance following the instructions at http://docs.openstack.org/user-guide-admin/content/cli_set_quotas.html#cli_set_compute_tenant_quotas_procedure )
 * The quota_classes table is empty in the nova database (when it wasn't the case in devstack-havana).

I don't have time to look into this more right now, so if someone else does feel free to pick it up. Thanks!

Changed in horizon:
assignee: nobody → Santiago Baldassin (santiago-b-baldassin)
Changed in horizon:
assignee: Santiago Baldassin (santiago-b-baldassin) → Sergio Cazzolato (sergio-j-cazzolato)
Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

The error seems to be in nova, the error is produced when horizon sends the request to nova to update the default values.

Also when I execute the following command

>nova quota-class-update --cores 100 default

I am getting

ERROR: Not found (HTTP 404)

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Something to fix is that is displaying two messages (1 green and 1 red)

Changed in nova:
assignee: nobody → Sergio Cazzolato (sergio-j-cazzolato)
Revision history for this message
Doug Fish (drfish) wrote :

Sergio - the 2 messages thing in being addressed in another bug https://bugs.launchpad.net/horizon/+bug/1278353

I believe the nova API has been intentionally removed. See the link I put into the initial description for the email discussion, plus especially this change:
https://github.com/openstack/nova/commit/1b15b23b0a629e00913a40c5def42e5ca887071c

Revision history for this message
Julie Pichon (jpichon) wrote :

Thanks for finding out the commit Doug. It looks to be only Nova v3 related though, which I don't think we support yet.

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

I found that QuotaClasses has been removed from v2 too, so it means horizon and nova client should not provide an update method any more.

https://review.openstack.org/#/c/75535/

affects: nova → python-novaclient
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: New → In Progress
Revision history for this message
Julie Pichon (jpichon) wrote :

I'm adding openstack-manuals because it looks like http://docs.openstack.org/user-guide-admin/content/cli_set_quotas.html#cli_set_compute_tenant_quotas_procedure will need to be updated as well, since "quota-class update defaults" is no longer possible (feel free to mark as Invalid if that's already tracked elsewhere).

Revision history for this message
Julie Pichon (jpichon) wrote :

Thanks Sergio for digging into this.

From the Horizon PoV, if updating defaults is no longer possible the default quotas list needs to move back to the "System Info" panel.

Revision history for this message
Julie Pichon (jpichon) wrote : Re: [Bug 1292589] Re: Can't set any default quota values in Horizon

On 17/03/14 20:13, Sergio Cazzolato wrote:
> Julie, do you think we could split the solution in two different commits?
> 1. Remove the update button and all the calls to quota-classes
> 2. Move the back the default quotas to the "System Info" panel (depends on 1)
>

Sure, that sounds reasonable to me. Ideally we need to have both for the
RC - let me/us know if you could use a hand for the Horizon side of
things. Thank you!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: Confirmed → In Progress
no longer affects: python-novaclient
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/81577
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=ed586a0355fb99a5b1fbeadfc0625f0ceffe8b72
Submitter: Jenkins
Branch: master

commit ed586a0355fb99a5b1fbeadfc0625f0ceffe8b72
Author: Sergio Cazzolato <email address hidden>
Date: Tue Mar 18 11:04:50 2014 -0300

    Remove the update default quotas feature

    The default quota panel has been moved to a tab in the system
    info panel.
    The update default quotas feature has been removed.
    The cinder quota-class methods have been removed to keep consistency.
    The test cases and the apis for nova and cinder have been modified
    according the change.

    This change is done to support the change:
    I1110022d6f628d03aaf363da707f2d2ef1600437

    Change-Id: I193c7209d9681b6d69afe0d996153ac86850d243
    Closes-Bug: #1292589

Changed in horizon:
status: In Progress → Fix Committed
Tom Fifield (fifieldt)
Changed in openstack-manuals:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → icehouse
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Tom Fifield (fifieldt)
Changed in openstack-manuals:
status: Confirmed → Triaged
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-rc1 → 2014.1
Revision history for this message
Julie Pichon (jpichon) wrote :

Note: The feature may be added back to Nova, see bug 1299517.

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

In parallel I am working in a blueprint to add this feature to the API but not using the quota-class any more.

https://review.openstack.org/#/c/94519/

Revision history for this message
Joe Gordon (jogo) wrote :

In the future if something like this happens you should double check with nova or the respective project that is removing an API call. Breakages like this should not be taken lightly.

Added a related bug for missing integration testing https://bugs.launchpad.net/horizon/+bug/1325725

Revision history for this message
Tom Fifield (fifieldt) wrote :

this was updated in the manuals by the autotools

Changed in openstack-manuals:
status: Triaged → Fix Released
assignee: nobody → Tom Fifield (fifieldt)
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.