common.get_networks_for_instance causes 'NoneType' object is unsubscriptable when using ipv6

Bug #884749 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Chris Behrens

Bug Description

Seeing the following TypeErrors from nova-api.log when trying to create servers:

(nova.api.openstack.wsgi): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/common.py", in get_networks_for_instance
(nova.api.openstack.wsgi): TRACE: ipv6_addr = ipv6.to_global(cidr_v6, vif['address'],
(nova.api.openstack.wsgi): TRACE: TypeError: 'NoneType' object is unsubscriptable

---

This causes HTTP 404 errors to be returned to the client when the request should have actually succeeded.

Dan Prince (dan-prince)
Changed in nova:
importance: Undecided → High
Revision history for this message
Mark Washenberger (markwash) wrote :

This looks like it was probably already fixed in [Change-Id: I37d21105d6306f0a812c5eb0f0717a5094cd17b9] because from that we have in common.py:

306 network = fixed_ip['network']
307 vif = fixed_ip.get('virtual_interface')
308 if not network or not vif:
309 name = instance['name']
310 ip = fixed_ip['address']
311 LOG.warn(_("Instance %(name)s has stale IP "
312 "address: %(ip)s (no network or vif)") % locals())
313 continue

Perhaps there is still an underlying problem (why is vif == None?) but I expect this would prevent it from showing up as a 404 or 500 error.

Revision history for this message
Mark Washenberger (markwash) wrote :

Fairly certain this is fixed in https://review.openstack.org/#change,1123

Changed in nova:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Mark McLoughlin (markmc)
Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
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.