Bug 1254780 - horizon doesn't work with neutron quotas disabled
Summary: horizon doesn't work with neutron quotas disabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: async
: 7.0 (Kilo)
Assignee: Matthias Runge
QA Contact: Ido Ovadia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-18 20:28 UTC by Audra Cooper
Modified: 2023-02-22 23:02 UTC (History)
23 users (show)

Fixed In Version: python-django-horizon-2015.1.1-3.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-29 11:38:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Shows missing buttons in 7.0 compared to 6.0 with existing buttons (302.61 KB, application/pdf)
2015-08-18 20:28 UTC, Audra Cooper
no flags Details
Summary of differences from 3.0.1 to 4.0 (203.74 KB, application/pdf)
2015-08-19 15:08 UTC, Audra Cooper
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1482354 0 None None None Never
Launchpad 1483379 0 None None None Never
OpenStack gerrit 228329 0 None None None Never
Red Hat Product Errata RHBA-2015:1951 0 normal SHIPPED_LIVE python-django-horizon bug fix advisory 2015-10-29 15:36:18 UTC

Description Audra Cooper 2015-08-18 20:28:19 UTC
Created attachment 1064486 [details]
Shows missing buttons in 7.0 compared to 6.0 with existing buttons

Description of problem:
Horizon does not have 'Create Router' button or 'Create Network' button under 
Project -> Network -> Routers
Project -> Network -> Networks


Version-Release number of selected component (if applicable):


How reproducible: 100%

Steps to Reproduce:
1. Deploy RHOSP
2. Log in to Horizon (as Admin or any Project User)
3. Go to Project -> Network -> Routers
4. Go to Project -> Network -> Networks

Actual results:
===============
3. 'Create Router' button is missing
4. 'Create Networks' button is missing

Expected results:
=================
3. 'Create Router' button should exist
4. 'Create Networks' button is missing

Additional info:
================
Screenshot is enclosed

Note: These buttons exist in RHOSP 6.0

Comment 3 Audra Cooper 2015-08-18 20:59:07 UTC
Another note:  Creating networks and routers works fine in the CLI as well.

Comment 4 Audra Cooper 2015-08-19 15:08:57 UTC
Created attachment 1064914 [details]
Summary of differences from 3.0.1 to 4.0

Added a summary of the differences from 3.0.1 to 4.0

Comment 6 Matthias Runge 2015-08-19 17:18:32 UTC
Are you using PKI tokens again?

Creating networks works well in my RHOS-7 setup.

Comment 7 Lon Hohberger 2015-08-19 17:20:48 UTC
Works for me?

Comment 8 Audra Cooper 2015-08-19 17:28:49 UTC
No, we have the change for token_provider = uuid, and we see our project lists now after that fix.  Is there another setting that will allow us to see the create network and create router buttons?

Comment 9 Matthias Runge 2015-08-19 17:47:34 UTC
First guess would be:
/etc/openstack-dashboard/neutron_policy.json

There are rules listed for networks.
My snippet looks like:
    "create_network": "",

... (snipped)...

    "create_network:shared": "rule:admin_only",
    "create_network:router:external": "rule:admin_only",
    "create_network:segments": "rule:admin_only",
    "create_network:provider:network_type": "rule:admin_only",
    "create_network:provider:physical_network": "rule:admin_only",
    "create_network:provider:segmentation_id": "rule:admin_only",

Just to make sure, are you just using neutron networks (with default openvswitch?)

Second question would be then (if policy is identical): do you have an exception in logs?

Comment 10 Matthias Runge 2015-08-19 21:48:34 UTC
I had the opportunity to look at a system installed by ofi.

A few observations:
- there are no quotas set up for networks
- there's a nova v3 endpoint set to http://127.0.0.1/v3
- it might have been an issue with this specific install, but network_topology overview page crashed with an exception:
126, in get_context_data
    context['network_quota_exceeded'] = self._quota_exceeded('networks')
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/network_topology/views.py", line 114, in _quota_exceeded
    available = usages[quota]['available']
KeyError: 'available'

which leads us again to quotas.

Both observations are different from installs made by director and from installs made by packstack.

Packstack and director installs are showing both buttons to create networks and routers.

Comment 11 Matthias Runge 2015-08-19 21:56:30 UTC
a possible duplicate of this: https://bugzilla.redhat.com/show_bug.cgi?id=1235844

Comment 12 Audra Cooper 2015-08-20 14:56:55 UTC
Regarding C10, yes, we see the Network Topology crash as well noted in bz 1233644, and we're release noting that issue for this release.

Comment 13 Matthias Runge 2015-08-21 10:50:37 UTC
I think I tracked this down to 
https://launchpad.net/bugs/1483379

There's even a patch up for this:
https://review.openstack.org/#/c/211310/

Short workaround:

in /etc/openstack-dashboard/local_settings:
in 
OPENSTACK_NEUTRON_NETWORK = {
    'enable_lb': True,
    'enable_firewall': True,
    'enable_quotas': False,
    'enable_security_group': True,


set enable_quotas to True

The remaining question here is: why it has been set to False. (i.e. no not support quota for networking).

It seems, nobody uses it with quota set to false. Nevertheless, horizon should be fixed here.

Comment 14 Matthias Runge 2015-08-21 12:13:30 UTC
The linked patch fixes the network topology page.

Comment 17 Matthias Runge 2015-08-25 09:13:21 UTC
Both linked patches are currently work in progress and likely to change. they are not approved upstream yet.

Comment 18 Michael Solberg 2015-08-31 13:35:49 UTC
This change to astapor resolves the issue for me:

https://github.com/redhat-openstack/astapor/pull/560

I have a test environment available at Red Hat, if you'd like to confirm.

Michael.

Comment 19 Jason Guiditta 2015-08-31 13:54:20 UTC
(In reply to Michael Solberg from comment #18)
> This change to astapor resolves the issue for me:
> 
> https://github.com/redhat-openstack/astapor/pull/560
> 
> I have a test environment available at Red Hat, if you'd like to confirm.
> 
> Michael.

I have done similar tests, and can verify this does seem to fix the problem.  However, the bug was left here with horizon because horizon itself should not break just because quotas are disabled.  That said, I am still not opposed to enabling them in astapor as well.  That change happened with the n1kv work, and I am not sure that there was any real reason for quotas to have been disabled to begin with.

Comment 20 Matthias Runge 2015-08-31 14:02:15 UTC
I agree, Horizon shouldn't break with quotas disabled at all.

That being said, this has just been discovered lately and reported upstream. Looking at the code, I'm somewhat convinced, horizon never worked with quotas disabled. Since this is quite visible, I would expect a bug report way earlier. Or installing with quotas disabled must be a rare case.

Comment 21 Matthias Runge 2015-09-29 06:07:11 UTC
Slow progress here, proposed backport to kilo: https://review.openstack.org/#/c/228329/

Comment 25 Matthias Runge 2015-10-02 07:17:00 UTC
How to test:

in /etc/openstack-dashboard/local_settings, set in 
OPENSTACK_NEUTRON_NETWORK = {
...
   'enable_quotas': False,

}

(Neutron quotas to false)
and visit
dashboard/project/network_topology/

Previously, this fails, now it should work.

Unfortunately, one of our installers disabled neutron quotas.

Comment 27 Ido Ovadia 2015-10-22 13:44:51 UTC
Verified
========
python-django-horizon-2015.1.1-4.el7ost.noarch

Comment 28 arkady kanevsky 2015-10-22 14:46:12 UTC
Currently it is targeted for zstream.
I thought that was already released last week.
So was that change done in OSP-D and OFI?

Comment 29 Matthias Runge 2015-10-23 20:32:28 UTC
Arkady, this bug here fixes the issue in Horizon; I remember, we talked about fixing OFI; OSP-D did not disable neutron quotas.

If disabling neutron quotas makes sense in your setup, that's up to you. OFI disabled neutron quotas in the past.

Comment 31 Jason Guiditta 2015-10-28 19:56:10 UTC
(In reply to arkady kanevsky from comment #28)
> Currently it is targeted for zstream.
> I thought that was already released last week.
> So was that change done in OSP-D and OFI?

In OFI, we enabled quotas as of 4.0.7

Comment 32 errata-xmlrpc 2015-10-29 11:38:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2015:1951


Note You need to log in before you can comment on or make changes to this bug.