Horizon overview page is not displayed when quantum plugin w/o router ext support is used

Bug #1160580 reported by Shiv Haris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Gabriel Hurley

Bug Description

Extensions like agent, agent-scheduler and router already implemented in Quantum are not turned on in the Brocade plugin.

Some recent changes in Horizon seems to make this a requirement and ends up showing page below at login.
QuantumClientException at /project/
404 Not Found

The resource could not be found.

Request Method: GET
Request URL: http://10.24.88.5/project/
Django Version: 1.4.2
Exception Type: QuantumClientException
Exception Value:
404 Not Found

The resource could not be found.

Exception Location: /opt/stack/python-quantumclient/quantumclient/v2_0/client.py in exception_handler_v20, line 88
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:
['/opt/stack/horizon/openstack_dashboard/wsgi/../..',
 '/opt/stack/python-openstackclient',
 '/opt/stack/keystone',
 '/opt/stack/glance',
 '/opt/stack/nova',
 '/opt/stack/horizon',
 '/opt/stack/cinder',
 '/opt/stack/python-cinderclient',
 '/opt/stack/python-novaclient/setuptools_git-1.0b1-py2.7.egg',
 '/opt/stack/python-novaclient',
 '/opt/stack/python-keystoneclient',
 '/opt/stack/quantum',
 '/usr/local/lib/python2.7/dist-packages/pyasn1-0.1.6-py2.7.egg',
 '/opt/stack/python-quantumclient',
 '/opt/stack/python-glanceclient',
 '/opt/stack/tempest',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PIL',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.7',
 '/opt/stack/horizon/openstack_dashboard']
Server time: Tue, 26 Mar 2013 20:29:59 +0000

Environment:

Request Method: GET
Request URL: http://10.24.88.5/project/

Django Version: 1.4.2
Python Version: 2.7.3
Installed Applications:
['openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'compressor',
 'horizon',
 'openstack_dashboard.dashboards.project',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.settings',
 'openstack_auth']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  111. response = callback(request, *callback_args, **callback_kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  38. return view_func(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  54. return view_func(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  38. return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  48. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  69. return handler(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in get
  155. handled = self.construct_tables()
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in construct_tables
  146. handled = self.handle_table(table)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in handle_table
  118. data = self._get_data_dict()
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in _get_data_dict
  182. self._data = {self.table_class._meta.name: self.get_data()}
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/overview/views.py" in get_data
  32. super(ProjectOverview, self).get_data()
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/usage/views.py" in get_data
  34. self.usage.get_quotas()
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/usage/base.py" in get_quotas
  115. _("Unable to retrieve quota information."))
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/usage/base.py" in get_quotas
  112. self.quotas = quotas.tenant_quota_usages(self.request)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/utils/memoized.py" in __call__
  33. value = self.func(*args)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/usage/quotas.py" in tenant_quota_usages
  119. floating_ips = network.tenant_floating_ip_list(request)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/network.py" in tenant_floating_ip_list
  141. return NetworkClient(request).floating_ips.list()
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/quantum.py" in list
  125. fips = self.client.list_floatingips().get('floatingips')
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in with_params
  108. ret = self.function(instance, *args, **kwargs)
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in list_floatingips
  435. **_params)
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in list
  997. for r in self._pagination(collection, path, **params):
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in _pagination
  1010. res = self.get(path, params=params)
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in get
  983. headers=headers, params=params)
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in retry_request
  968. headers=headers, params=params)
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in do_request
  913. self._handle_fault_response(status_code, replybody)
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in _handle_fault_response
  894. exception_handler_v20(status_code, des_error_body)
File "/opt/stack/python-quantumclient/quantumclient/v2_0/client.py" in exception_handler_v20
  88. message=message)

Exception Type: QuantumClientException at /project/
Exception Value: 404 Not Found

The resource could not be found.

Revision history for this message
Shiv Haris (shh) wrote :

Proposed change that fixes this:

quantum/plugins/brocade/QuantumPlugin.py -- d3676b6..adfa69f 100644
--- INDEX:/quantum/plugins/brocade/QuantumPlugin.py
+++ WORKDIR:/quantum/plugins/brocade/QuantumPlugin.py
@@ -193,6 +193,7 @@ class AgentNotifierApi(proxy.RpcProxy,

 class BrocadePluginV2(db_base_plugin_v2.QuantumDbPluginV2,
+ l3_db.L3_NAT_db_mixin,
                       sg_db_rpc.SecurityGroupServerRpcMixin,
                       agents_db.AgentDbMixin):
     """BrocadePluginV2 is a Quantum plugin.
@@ -207,7 +208,9 @@ class BrocadePluginV2(db_base_plugin_v2.QuantumDbPluginV2,
         and db configuration.
         """

- self.supported_extension_aliases = ["binding", "security-group"]
+ self.supported_extension_aliases = ["binding", "security-group",
+ "router", "agent", "agent-scheduler"]
+
         self.binding_view = "extension:port_binding:view"
         self.binding_set = "extension:port_binding:set"

Changed in quantum:
assignee: nobody → Shiv Haris (shh)
Revision history for this message
dan wendlandt (danwent) wrote :

this is a bug in horizon support quantum, as horizon should not make assumptions about non-core APIs being implemented.

akihiro or nachi should be the best to respond in more detail.

Changed in horizon:
status: New → Confirmed
importance: Undecided → High
milestone: none → grizzly-rc2
assignee: nobody → Gabriel Hurley (gabriel-hurley)
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

This is definitely worth fixing, and I've marked it as an RC2 bug, with a few caveats:

  1. I need a better understanding of which feature(s)/API(s) the Brocade plugin doesn't support, 'cuz this report and the related email thread are a bit all over the map.

  2. The right solution to this (for now) will be adding another setting to control this feature like we do for the load balancer plugin.

  3. If the change is too invasive I'm not gonna take it for RC2 and instead release note that the Brocade plugin is not supported for Quantum + Horizon in Grizzly.

Unfortunately we're waaaaay too late in the release cycle to be making any fundamental changes, so if it's not just a couple if statements it's gonna have to wait for Havana.

We should identify ways to test the different quantum plugins more thoroughly for the H cycle to prevent these from sneaking in in the future.

Revision history for this message
Shiv Haris (shh) wrote :

I still believe that this can be fixed from Quantum perspective. Brocade plugin needs these extensions anyways. Fixing this in Horizon at this stage is like using a sludge hammer for a minor issue.

These are well tested extensions in other plugins (there is no code change needed in the plugin, the extension only needs to be turned on).

This has been tested for Brocade plugin.

The worst case possible:
Even if this becomes a problem (which it is not, since I have tested this), it will affect ONLY Brocade plugin users.

I believe brocade plugin should turn on these extensions.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

The cause itself is that Horizon quantum implementation calls router extension as Dan commented.
Horizon quantum api does not use other extension methods.

As a solution, it looks a good idea to add another settings in Horizon.
Router and Network Topology panel depend on router extension.
I will post a patch to disable these panels if router settings is False.

On the other hand, If I remember correctly quantum team have a consensus router extension is regarded as core api in Grizzly in the documentation. though in the code router extension is still an extension. We discussed in the quantum team meeting (That is before Brocade plugin was merged). So I have not add any settings for router so far.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I investigated the issue more detail. The situation is different from what I thought.

I think the issue can be split into three items.

(1) local_setting.py issue provided by devstack
The original issue reported that "QuantumClientException at /project/" is displayed seems to be caused by a wrong local_settings.py.
When local_settings.py provided by devstack is used, exceptions from client library are not handled properly in Horizon and they are visible to users.
If there is no local_settings.py or local_settings.py.example is copied to local_settings.py, I didn't see this exception and the project page was displayed with an error message "Unable to retrieve floating IP addresses".

Horizon local_setting.py provided by devstack is confusing and should be fixed in devstack.

(2) Floating IP management with a quantum plugin without router extension

If a quantum plugin does not support the router extension, users cannot use Floating IP.
It is not a matter whether nova API or quantum API is called.
From the point of view of Horizon, no fix is needed (it is okay that exceptions are handled properly and tracebacks are not visible to users.)
From Quantum perspective, router extension shoudl be supported in Brocade plugin in the future.

(3) Router management panel with a quantum plugin without router extension

It would be better to enable/disable quantum panels which depend on quantum extension such as router panel.
When there is no router extension support in Quantum, the current Horizon implementation behaves as follows:
- [router panel] Error messages are displayed at the upper right, but I got no tracebacks.
- [network topology] Javascript tries to retrieve router information infinitely.

Considering the above behavior, router panel and network topology should be disabled when router extension is not supported.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

In Quantum side, features for Grizzly are already freezed and this issue should be handled in Horizon.
I mark it as invalid in Quantum.

Changed in quantum:
status: New → Invalid
Akihiro Motoki (amotoki)
summary: - Allow extensions already implemented in Quantum in Brocade plugin
+ Horizon overview page is not displayed when quantum plugin w/o router
+ ext support is used
tags: added: quantum
Revision history for this message
Shiv Haris (shh) wrote :

This is not adding any new feature - we are simply bringing brocade plugin at par will all other plugins.

All other plugins have this enabled, I am requesting that this be allowed in Brocade plugin as well.

[ if at all this is a problem (and I have verified and tested that it does not introduce any regression), it will logically affect Brocade environments only, and of absolute no risk to anyone else]

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Speaking only on the Horizon side of things, if the exceptions *are* properly handled, I'm more inclined to release note the failure with the Brocade plugin for Grizzly. This goes beyond just enabling or disabling certain panels and would get into anyplace the floating IP code is exercised... Just from past experience, changes to floating IP code tends to have unintended side effects, and it's a pretty core feature for Horizon users that I'd rather not mess with at this point.

My question now is whether we should look into optionally disabling any of this functionality in Havana, or whether it's going to be evened out across all the extensions?

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
Akihiro Motoki (amotoki) wrote :

[Comment on Quantum side]
I am not sure whether the router extension needs to be added to Brocade plugin into Grizzly release. According to my experience so far, adding support of a specific plugin is regarded as mini feature in the quantum community and we try to avoid adding mini feature during RC period.

On the other hand, router extension is regarded as Core API (at the documentation level) in Grizzly though router extension is still an extension in the code. We discussed it in the team meeting around G-3. Thus I think there is a room to consider adding router extension support in Quantum. This change only affects Brocade plugin and the only concern is Brocade plugin is not well tested with router feature at the timing of Grizzly release. At the end, it depends on PTL decision.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

[Comment on Horizon side]

Floating IP is a key feature in OpenStack and I think it is not a kind of features disabled by settings.

> My question now is whether we should look into optionally disabling any of this functionality in Havana, or whether it's going to be evened out across all the extensions?

I believe Major features like router or quota will be supported by all plugins and such features are planed to move Quantum core API in Havana.

However, some features are not supported by all plugins. Agent Management is a good example. Some plugins uses quantum agents but some some plugins do not use agents. I think it is better to enable/disable some functionality in Horizon according to the supported extension list rather than settings in Horizon. The supported extension list can be retrieved through Quantum API.

dan wendlandt (danwent)
no longer affects: quantum
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Okay. I'll release note this for Grizzly and we'll look at using the Quantum supported extensions list in H.

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/25645

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

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25648

Revision history for this message
Shiv Haris (shh) wrote : RE: [Bug 1160580] Re: Horizon overview page is not displayed when quantum plugin w/o router ext support is used

Gabriel,

Can you please add a line in the release notes to refer folks to how to use the quantum plugin in the Grizzly release.

Please add "refer to https://wiki.openstack.org/wiki/Brocade-quantum-plugin" for how to use with Grizzly. I will update the page appropriately.

Thanks,

-Shiv

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

Reviewed: https://review.openstack.org/25645
Committed: http://github.com/openstack/horizon/commit/c38b989c5378981bb33f48818a91ac211c125c22
Submitter: Jenkins
Branch: master

commit c38b989c5378981bb33f48818a91ac211c125c22
Author: Gabriel Hurley <email address hidden>
Date: Wed Mar 27 18:57:44 2013 -0700

    Release notes on Quantum Brocade plugin incompatibility.

    Fixes bug 1160580.

    Change-Id: Ib9b56e8b452b040c483a93adb5ff6c16894d5eb1

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (milestone-proposed)

Reviewed: https://review.openstack.org/25648
Committed: http://github.com/openstack/horizon/commit/14ac6a90f469097647b0e5425b0ecbe244432c06
Submitter: Jenkins
Branch: milestone-proposed

commit 14ac6a90f469097647b0e5425b0ecbe244432c06
Author: Gabriel Hurley <email address hidden>
Date: Wed Mar 27 18:57:44 2013 -0700

    Release notes on Quantum Brocade plugin incompatibility.

    Fixes bug 1160580.

    Change-Id: Ib9b56e8b452b040c483a93adb5ff6c16894d5eb1

Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: grizzly-rc2 → 2013.1
Revision history for this message
Baodong (Robert) Li (baoli) wrote : IP addresses obtained from nova metadat service

Hi Dan,

Just asked you about this question. I was looking at this process /usr/local/bin/quantum-ns-metadata-proxy. It seems that it uses a unix domain socket to communicate with the instances, and it then relay the requests to nova metadata service. Two of the metadata fields are local-ipv4 and public-ipv4. So my question is that if the ip addresses can be obtained from metadata using unix domain socket, why would it still need DHCP for ip addresses. After all, the ip addresses obtained from dnsmasq are allocated by quantum and added into the dnsmasq table. The second question is that if dhcp is still necessary, why Vms need local-ip and public-ip from metadata services. In other words, what are they used for by the instances?

Thanks,
Robert

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.