OpenStack Compute (Nova)

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

Reported by Dan Prince on 2011-11-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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) on 2011-11-01
Changed in nova:
importance: Undecided → High
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.

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) 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
Mark McLoughlin (markmc) on 2012-04-03
Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
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