"Error: Unable to connect to Neutron" is displayed when instance table displays many instances over 150

Bug #1349841 reported by Akihiro Motoki
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Akihiro Motoki
Icehouse
Fix Released
Undecided
Unassigned
Juno
Fix Released
High
Matthias Runge

Bug Description

When I displayed over 150 instances in a single page of instance table, I always got "Error: Unable to connect to Neutron".
The instance table itself is displayed properly, so I think the priority is low.

The error is RequestURITooLong from api.neutron.servers_update_addresses().
This method calls port_list with port_id filter parameters and too many port_id can be passed.
As a result URI line becomes too long and the above exception is raised.

It is better not to display such error message and deal with RequestURITooLong exception in api/neutron.

Note that we can avoid by setting API_RESULT_LIMIT to around 100 (the default value is 1000).

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

Changed in horizon:
status: New → In Progress
Akihiro Motoki (amotoki)
tags: added: neutron
removed: neuron
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-3 → juno-rc1
David Lyle (david-lyle)
Changed in horizon:
milestone: juno-rc1 → kilo-1
Matthias Runge (mrunge)
Changed in horizon:
importance: Low → Medium
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → kilo-2
Matthias Runge (mrunge)
Changed in horizon:
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/110291
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
songqianxia (songlihui1947) wrote :

I met this issue today, it always show this error message, when I open dashboard. But it seems it has no matter with how manay instance you have created. As I only have 4 instances.

Revision history for this message
Matthias Runge (mrunge) wrote :

songqianxia,

I'm quite sure, your issue is a different one, or do you have any logs indicating
RequestURITooLong from api.neutron.servers_update_addresses() ?

Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-2 → kilo-3
Matthias Runge (mrunge)
tags: added: juno-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit 6e1da2634412afdb21fd5a3f27c1da1d332680f7
Author: Akihiro Motoki <email address hidden>
Date: Tue Jul 29 22:47:19 2014 +0900

    Handle RequestURITooLong error in large instance table

    Neutron API supports filtering in listing API. If long filter parameters
    such as long UUID list are passed, it exceeds URL length limit and
    RequestURITooLong is raised. In such case, we need to split filter
    parameters into chunks.

    This commit add a convenient method to handle the case, which split
    a list of long filter parameter into chunks and repeat listing API call.
    However, it is not easy to generalize this behavior because filtering
    parameters are specific to caller's logic, so this patch only fixes
    a problem in servers_update_addresses().

    Change-Id: I63ec4bad722351f640797bcbec4a38d5972f135c
    Closes-Bug: #1349841

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

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/155697

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

Reviewed: https://review.openstack.org/155697
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=d4bc8a0dc1ab8afb25fad4c04fb4132812c8af04
Submitter: Jenkins
Branch: stable/juno

commit d4bc8a0dc1ab8afb25fad4c04fb4132812c8af04
Author: Akihiro Motoki <email address hidden>
Date: Tue Jul 29 22:47:19 2014 +0900

    Handle RequestURITooLong error in large instance table

    Neutron API supports filtering in listing API. If long filter parameters
    such as long UUID list are passed, it exceeds URL length limit and
    RequestURITooLong is raised. In such case, we need to split filter
    parameters into chunks.

    This commit add a convenient method to handle the case, which split
    a list of long filter parameter into chunks and repeat listing API call.
    However, it is not easy to generalize this behavior because filtering
    parameters are specific to caller's logic, so this patch only fixes
    a problem in servers_update_addresses().

    Change-Id: I63ec4bad722351f640797bcbec4a38d5972f135c
    Closes-Bug: #1349841
    (cherry picked from commit 6e1da2634412afdb21fd5a3f27c1da1d332680f7)

tags: added: in-stable-juno
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/165768

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/icehouse)

Reviewed: https://review.openstack.org/165768
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=86a66283ccfe146a9743bb7db9433e1f2166b509
Submitter: Jenkins
Branch: stable/icehouse

commit 86a66283ccfe146a9743bb7db9433e1f2166b509
Author: Akihiro Motoki <email address hidden>
Date: Tue Jul 29 22:47:19 2014 +0900

    Handle RequestURITooLong error in large instance table

    Neutron API supports filtering in listing API. If long filter parameters
    such as long UUID list are passed, it exceeds URL length limit and
    RequestURITooLong is raised. In such case, we need to split filter
    parameters into chunks.

    This commit add a convenient method to handle the case, which split
    a list of long filter parameter into chunks and repeat listing API call.
    However, it is not easy to generalize this behavior because filtering
    parameters are specific to caller's logic, so this patch only fixes
    a problem in servers_update_addresses().

    Closes-Bug: #1349841
    (cherry picked from commit 6e1da2634412afdb21fd5a3f27c1da1d332680f7)
    (cherry picked from commit d4bc8a0dc1ab8afb25fad4c04fb4132812c8af04)

    Conflicts:
     openstack_dashboard/api/neutron.py
     openstack_dashboard/test/api_tests/network_tests.py
     openstack_dashboard/test/api_tests/neutron_tests.py

    Change-Id: I63ec4bad722351f640797bcbec4a38d5972f135c

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-3 → 2015.1.0
Revision history for this message
Dina (dina-salem) wrote :

I am running icehouse version. Whenever I try to launch an instance I get "Unable to connect to Neutron."

I traced down the error to the patch that was committed in that bug. I added a printout for the exception string in openstack-dashboard/api/neutron.py
 in the servers_update_addresses method.

The error now shows:
Unable to connect to Neutron.'FloatingIpManager' object has no attribute 'is_supported'

neutron: Version: 1:2014.1.5-0ubuntu1

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

Dina,

It was a mistake and regression during the icehouse backport.
FloatingIpManager.is_supported() was introduced in Juno.
For Icehouse, is_support() should always return True.

Unfortunately, stable/icehouse branch is now EOL and we cannot propose a patch to fix this.

As a workaround, "if fips.is_supported():" in server_update_addresses in openstack_dashboard/api/neutronn.py should be replaced with "if True" (or we can remove if-else condition).

Revision history for this message
Dina (dina-salem) wrote :

Thanks Akihiro.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.