OpenStack Compute (Nova)

os-floating-ips gives 500 with FlatManager

Reported by justinsb on 2012-02-20
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Low
justinsb

Bug Description

When the FlatManager is in use, os-floating-ips gives a 500 error, because "'FlatManager' object has no attribute 'get_floating_ips_by_project"

It should probably return something more helpful (empty list or sensible error code).

2012-02-20 12:22:47 INFO nova.api.openstack.wsgi [req-75556a86-9560-4630-8b54-42f467c1c1c8 47c273884edd402d9c6cba469d6dbf0f b560b4f9ab4a4941b3bafbb44e3e100b] GET http://192.168.71.1:8774/v1.1/b560b4f9ab4a4941b3bafbb44e3e100b
/os-floating-ips
2012-02-20 12:22:47 DEBUG nova.api.openstack.wsgi [req-75556a86-9560-4630-8b54-42f467c1c1c8 47c273884edd402d9c6cba469d6dbf0f b560b4f9ab4a4941b3bafbb44e3e100b] Unrecognized Content-Type provided in request from (pid=7353) get
_body /opt/stack/nova/nova/api/openstack/wsgi.py:691
2012-02-20 12:22:47 DEBUG nova.rpc.common [req-75556a86-9560-4630-8b54-42f467c1c1c8 47c273884edd402d9c6cba469d6dbf0f b560b4f9ab4a4941b3bafbb44e3e100b] Making asynchronous call on network ... from (pid=7353) multicall /opt/st
ack/nova/nova/rpc/amqp.py:318
2012-02-20 12:22:47 DEBUG nova.rpc.common [req-75556a86-9560-4630-8b54-42f467c1c1c8 47c273884edd402d9c6cba469d6dbf0f b560b4f9ab4a4941b3bafbb44e3e100b] MSG_ID is 9b24b4656db04e318af397ca2d1edcba from (pid=7353) multicall /opt
/stack/nova/nova/rpc/amqp.py:321
2012-02-20 12:22:47 ERROR nova.api.openstack [req-75556a86-9560-4630-8b54-42f467c1c1c8 47c273884edd402d9c6cba469d6dbf0f b560b4f9ab4a4941b3bafbb44e3e100b] Caught error: Remote error: AttributeError 'FlatManager' object has no attribute 'get_floating_ips_by_project'
[u'Traceback (most recent call last):\n', u' File "/opt/stack/nova/nova/rpc/amqp.py", line 247, in _process_data\n node_func = getattr(self.proxy, str(method))\n', u' File "/opt/stack/nova/nova/service.py", line 212, in __getattr__\n return getattr(manager, key)\n', u"AttributeError: 'FlatManager' object has no attribute 'get_floating_ips_by_project'\n"].
(nova.api.openstack): TRACE: Traceback (most recent call last):
(nova.api.openstack): TRACE: File "/opt/stack/nova/nova/api/openstack/__init__.py", line 41, in __call__
(nova.api.openstack): TRACE: return req.get_response(self.application)
<snip>
(nova.api.openstack): TRACE: File "/opt/stack/nova/nova/api/openstack/compute/contrib/floating_ips.py", line 137, in index
(nova.api.openstack): TRACE: floating_ips = self.network_api.get_floating_ips_by_project(context)
(nova.api.openstack): TRACE: File "/opt/stack/nova/nova/network/api.py", line 86, in get_floating_ips_by_project
(nova.api.openstack): TRACE: {'method': 'get_floating_ip_by_address',
(nova.api.openstack): TRACE: File "/opt/stack/nova/nova/rpc/__init__.py", line 69, in call
(nova.api.openstack): TRACE: return _get_impl().call(context, topic, msg, timeout)
(nova.api.openstack): TRACE: File "/opt/stack/nova/nova/rpc/impl_kombu.py", line 624, in call
(nova.api.openstack): TRACE: return rpc_amqp.call(context, topic, msg, timeout, Connection.pool)
(nova.api.openstack): TRACE: File "/opt/stack/nova/nova/rpc/amqp.py", line 335, in call
(nova.api.openstack): TRACE: rv = list(rv)
(nova.api.openstack): TRACE: File "/opt/stack/nova/nova/rpc/amqp.py", line 303, in __iter__
(nova.api.openstack): TRACE: raise result
(nova.api.openstack): TRACE: RemoteError: Remote error: AttributeError 'FlatManager' object has no attribute 'get_floating_ips_by_project'
(nova.api.openstack): TRACE: [u'Traceback (most recent call last):\n', u' File "/opt/stack/nova/nova/rpc/amqp.py", line 247, in _process_data\n node_func = getattr(self.proxy, str(method))\n', u' File "/opt/stack/nova/nova/service.py", line 212, in __getattr__\n return getattr(manager, key)\n', u"AttributeError: 'FlatManager' object has no attribute 'get_floating_ips_by_project'\n"].
(nova.api.openstack): TRACE:
2012-02-20 12:22:47 INFO nova.api.openstack [req-75556a86-9560-4630-8b54-42f467c1c1c8 47c273884edd402d9c6cba469d6dbf0f b560b4f9ab4a4941b3bafbb44e3e100b] http://192.168.71.1:8774/v1.1/b560b4f9ab4a4941b3bafbb44e3e100b/os-floating-ips returned with HTTP 500

justinsb (justin-fathomdb) wrote :

This bug is still present, and causes Horizon serious problems (can't launch instances etc).

I've reported the Horizon bug as Bug #954580

Changed in nova:
status: New → Triaged
importance: Undecided → Low
tags: added: essex-rc-potential

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

Changed in nova:
assignee: nobody → justinsb (justin-fathomdb)
status: Triaged → In Progress
justinsb (justin-fathomdb) wrote :

I stub-implemented the functions as a short-term (Essex) fix.

I know we tagged this as low priority, but horizon tagged it as Critical, and I don't see how they can fix it nicely on their end: Bug #954580

It would be nice if we could implement this properly in Folsom!

Reviewed: https://review.openstack.org/5494
Committed: http://github.com/openstack/nova/commit/898f86cef99b386b22fec1cd47515ffe991e5eb9
Submitter: Jenkins
Branch: master

commit 898f86cef99b386b22fec1cd47515ffe991e5eb9
Author: Justin Santa Barbara <email address hidden>
Date: Sun Mar 18 20:37:43 2012 -0700

    Stub-implement floating-ip functions on FlatManager

    This was messing up horizon in a way that would probably be difficult to fix.
    It also is probably a bit tricky to implement floating ips properly for
    FlatManager at this stage of the release cycle. Stub them out for now,
    to keep horizon happy.

    Bug #954580
    Bug #937227

    Change-Id: Icb8d689860b893ebeeee02e248e836c52830b2de

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-03-20
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers