Add fixed IP fails

Bug #837867 reported by Édouard Thuleau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Tushar Patil

Bug Description

I try to add a fixed IP to instance with this command: 'nova add-fixed-ip 4 2' but I get this error in nova-network logs:

2011-08-30 16:00:27,111 DEBUG nova.rpc [-] {u'_context_roles': [u'Admin'], u'_context_request_id': u'3d96c679-86f8-49c2-b7ba-9d31f0b76ebc', u'_context_read_deleted': False, u'args': {u'instance_id': 4, u'network_id': u'2', u'host': u'p-hs21-16'}, u'_context_auth_token': u'999888777666', u'_context_is_admin': None, u'_context_project_id': u'admin', u'_context_timestamp': u'2011-08-30T14:00:26.869559', u'_context_user_id': u'admin', u'method': u'add_fixed_ip_to_instance', u'_context_remote_address': u'127.0.0.1'} reçu from (pid=5430) process_data /usr/lib/pymodules/python2.7/nova/rpc/amqp.py:200
2011-08-30 16:00:27,111 DEBUG nova.rpc [-] Contexte décompacté : {'user_id': u'admin', 'roles': [u'Admin'], 'timestamp': u'2011-08-30T14:00:26.869559', 'auth_token': u'999888777666', 'msg_id': None, 'remote_address': u'127.0.0.1', 'is_admin': None, 'request_id': u'3d96c679-86f8-49c2-b7ba-9d31f0b76ebc', 'project_id': u'admin', 'read_deleted': False} from (pid=5430) _unpack_context /usr/lib/pymodules/python2.7/nova/rpc/amqp.py:432
2011-08-30 16:00:27,117 DEBUG nova.network.manager [-] kwargs: {} from (pid=5430) _allocate_fixed_ips /usr/lib/pymodules/python2.7/nova/network/manager.py:131
2011-08-30 16:00:27,117 ERROR nova [-] Exception during message handling
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.7/nova/rpc/amqp.py", line 230, in _process_data
(nova): TRACE: rval = node_func(context=ctxt, **node_args)
(nova): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/manager.py", line 570, in add_fixed_ip_to_instance
(nova): TRACE: self._allocate_fixed_ips(context, instance_id, host, networks)
(nova): TRACE: File "/usr/lib/pymodules/python2.7/nova/network/manager.py", line 132, in _allocate_fixed_ips
(nova): TRACE: vpn = kwargs.pop('vpn')
(nova): TRACE: KeyError: 'vpn'
(nova): TRACE:

I use nova bzr 1508 in VLAN network.

Related branches

Revision history for this message
Thierry Carrez (ttx) wrote :

In nova/network/manager.py:

NetworkManager's add_fixed_ip_to_instance calls _allocate_fixed_ips without vpn or requested_networks parameters.

FlatManager's _allocate_fixed_ips will fail if throw an exception if requested_networks is not provided

RPCAllocateFixedIP's _allocate_fixed_ips will throw an exception if vpn or requested_networks is not provided (this bug report)

Either add_fixed_ip_to_instance needs to be fixed to pass the required parameters, or (more likely) _allocate_fixed_ips needs to be a little more flexible in what they accept.

Changed in nova:
importance: Undecided → High
status: New → Triaged
Tushar Patil (tpatil)
Changed in nova:
assignee: nobody → Tushar Patil (tpatil)
status: Triaged → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-rbp
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-rbp → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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