Cannot delete instance that failed to set up network

Bug #835242 reported by Antony Messerli
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Brian Lamar

Bug Description

Running rev 1500, I noticed these appearing in the api logs:

2011-08-27 05:52:09,744 ERROR nova.api.openstack.views.addresses [-] 'NoneType' object is unsubscriptable
(nova.api.openstack.views.addresses): TRACE: Traceback (most recent call last):
(nova.api.openstack.views.addresses): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/views/addresses.py", line 89, in _extract_network_label
(nova.api.openstack.views.addresses): TRACE: return interface['network']['label']
(nova.api.openstack.views.addresses): TRACE: TypeError: 'NoneType' object is unsubscriptable
(nova.api.openstack.views.addresses): TRACE:

Related branches

Revision history for this message
Johannes Erdfelt (johannes.erdfelt) wrote :

Do you know what URL was requested that resulted in this traceback?

Revision history for this message
Antony Messerli (antonym) wrote :

It appears it may be related to the IPs not always getting assigned to the instance. In doing some clean up, I found additional tracebacks in the network manager which could be related, although they are at different times:

2011-08-30 18:21:53,553 ERROR nova.rpc [-] ['Traceback (most recent call last):\n', ' File "/usr/lib/pymodules/python2.6/nova/rpc/amqp.py", line 230, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', ' File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 531, in get_instance_nw_info\n \'bridge\': network[\'bridge\'],\n', "TypeError: 'NoneType' object is unsubscriptable\n"]
2011-08-30 18:22:07,700 ERROR nova [-] Exception during message handling
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.6/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.6/nova/network/manager.py", line 514, in get_instance_nw_info
(nova): TRACE: fixed_ip['network_id'] == network['id']]
(nova): TRACE: TypeError: 'NoneType' object is unsubscriptable
(nova): TRACE:

If an instance doesn't receive IPs for some reason, you can't delete the instances since the request fails in the network manager.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

I'm going to just remove that exception log line, as it isn't really helping at all. You aren't actually getting a failed request here, it's just TRACEing in the logs, right?

Revision history for this message
Antony Messerli (antonym) wrote :

I stumbled across the first one in the logs so I'm not too sure what generated that one. The second log was generated when I was attempting to remove the instances who did not have the correct amount of IPs assigned. The trace prevents the instance from being removed. It'll go to build, and then shutdown on a delete.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

Ok, so it looks like two things need to happen:

1) remove the exception log line that is generating the output pasted in the bug description
2) treat the cause of the traceback generated in comment #2

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
summary: - API 'NoneType' object is unsubscriptable
+ Cannot delete instance that failed to set up network
Brian Lamar (blamar)
Changed in nova:
assignee: nobody → Brian Lamar (blamar)
Thierry Carrez (ttx)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Thierry Carrez (ttx) wrote :

Is this fixed or does it need the other branch as well ?

Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-1 → 2012.1
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.