This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1254780 - horizon doesn't work with neutron quotas disabled
horizon doesn't work with neutron quotas disabled
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
high Severity high
: async
: 7.0 (Kilo)
Assigned To: Matthias Runge
Ido Ovadia
: ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-18 16:28 EDT by Audra Cooper
Modified: 2015-10-29 07:38 EDT (History)
24 users (show)

See Also:
Fixed In Version: python-django-horizon-2015.1.1-3.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-29 07:38:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 16:28 EDT, Audra Cooper
no flags Details
Summary of differences from 3.0.1 to 4.0 (203.74 KB, application/pdf)
2015-08-19 11:08 EDT, Audra Cooper
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1482354 None None None Never
Launchpad 1483379 None None None Never
OpenStack gerrit 228329 None None None Never

  None (edit)
Description Audra Cooper 2015-08-18 16:28:19 EDT
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 16:59:07 EDT
Another note:  Creating networks and routers works fine in the CLI as well.
Comment 4 Audra Cooper 2015-08-19 11:08:57 EDT
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 13:18:32 EDT
Are you using PKI tokens again?

Creating networks works well in my RHOS-7 setup.
Comment 7 Lon Hohberger 2015-08-19 13:20:48 EDT
Works for me?
Comment 8 Audra Cooper 2015-08-19 13:28:49 EDT
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 13:47:34 EDT
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 17:48:34 EDT
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 17:56:30 EDT
a possible duplicate of this: https://bugzilla.redhat.com/show_bug.cgi?id=1235844
Comment 12 Audra Cooper 2015-08-20 10:56:55 EDT
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 06:50:37 EDT
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 08:13:30 EDT
The linked patch fixes the network topology page.
Comment 17 Matthias Runge 2015-08-25 05:13:21 EDT
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 09:35:49 EDT
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 09:54:20 EDT
(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 10:02:15 EDT
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 02:07:11 EDT
Slow progress here, proposed backport to kilo: https://review.openstack.org/#/c/228329/
Comment 25 Matthias Runge 2015-10-02 03:17:00 EDT
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 09:44:51 EDT
Verified
========
python-django-horizon-2015.1.1-4.el7ost.noarch
Comment 28 arkady kanevsky 2015-10-22 10:46:12 EDT
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 16:32:28 EDT
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 15:56:10 EDT
(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 07:38:42 EDT
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.