'FlatManager' object has no attribute 'allocate_floating_ip'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Frederic Lepied |
Bug Description
I am now using the FlatManager network mode, when I allocate a floating ip to a instance with nova api command:
nova floating-ip-create
I get the error log in the server side:
nova-api log:
2012-04-27 20:02:44 TRACE nova.api.openstack File "/usr/lib/
2012-04-27 20:02:44 TRACE nova.api.openstack return _get_impl(
2012-04-27 20:02:44 TRACE nova.api.openstack File "/usr/lib/
2012-04-27 20:02:44 TRACE nova.api.openstack return rpc_amqp.
2012-04-27 20:02:44 TRACE nova.api.openstack File "/usr/lib/
2012-04-27 20:02:44 TRACE nova.api.openstack rv = list(rv)
2012-04-27 20:02:44 TRACE nova.api.openstack File "/usr/lib/
2012-04-27 20:02:44 TRACE nova.api.openstack raise result
2012-04-27 20:02:44 TRACE nova.api.openstack RemoteError: Remote error: AttributeError 'FlatManager' object has no attribute 'allocate_
nova-network log:
2012-04-27 20:02:44 TRACE nova.rpc.amqp Traceback (most recent call last):
2012-04-27 20:02:44 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-27 20:02:44 TRACE nova.rpc.amqp node_func = getattr(self.proxy, str(method))
2012-04-27 20:02:44 TRACE nova.rpc.amqp File "/usr/lib/
2012-04-27 20:02:44 TRACE nova.rpc.amqp return getattr(manager, key)
2012-04-27 20:02:44 TRACE nova.rpc.amqp AttributeError: 'FlatManager' object has no attribute 'allocate_
It is ok if I change the network mode to FlatDHCPManager. I read the nova source code and found that FloatingIP is the only class that have the "allocate_
Code piece from network/manager.py:
class FlatDHCPManager
class FlatManager(
class VlanManager(
description: | updated |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
assignee: | nobody → Andrew Laski (alaski) |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
milestone: | none → grizzly-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-3 → 2013.1 |
It looks like FlatManager stubbed out the floating ip methods from FloatingIP to avoid just this sort of thing, but missed several of them (including allocate_ floating_ ip). I think stubbing out the rest should complete the hack and avoid the crash, at least until it's implemented there properly.