Cannot delete instance that failed to set up network

Bug #835242 reported by Antony Messerli on 2011-08-27
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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/", 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

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

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/", line 230, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', ' File "/usr/lib/pymodules/python2.6/nova/network/", 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/", line 230, in _process_data
(nova): TRACE: rval = node_func(context=ctxt, **node_args)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/network/", 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.

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?

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.

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) on 2011-09-01
Changed in nova:
assignee: nobody → Brian Lamar (blamar)
Thierry Carrez (ttx) on 2011-09-05
Changed in nova:
status: Confirmed → In Progress
Thierry Carrez (ttx) wrote :

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

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

Other bug subscribers