Create a VM with no networks result to a AttributeError

Bug #1222781 reported by Mehdi Abaakouk
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Mehdi Abaakouk

Bug Description

When I create a VM with no networks, it results to a AttributeError:

2013-09-09 07:27:35.130 15033 TRACE nova.compute.manager [instance: ac4dda7c-9e67-4eed-a5ee-89b480c524ee] Traceback (most recent call last):
2013-09-09 07:27:35.130 15033 TRACE nova.compute.manager [instance: ac4dda7c-9e67-4eed-a5ee-89b480c524ee] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1118, in _spawn
2013-09-09 07:27:35.130 15033 TRACE nova.compute.manager [instance: ac4dda7c-9e67-4eed-a5ee-89b480c524ee] self._legacy_nw_info(network_info),
2013-09-09 07:27:35.130 15033 TRACE nova.compute.manager [instance: ac4dda7c-9e67-4eed-a5ee-89b480c524ee] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 703, in _legacy_nw_info
2013-09-09 07:27:35.130 15033 TRACE nova.compute.manager [instance: ac4dda7c-9e67-4eed-a5ee-89b480c524ee] network_info = network_info.legacy()
2013-09-09 07:27:35.130 15033 TRACE nova.compute.manager [instance: ac4dda7c-9e67-4eed-a5ee-89b480c524ee] AttributeError: 'list' object has no attribute 'legacy'
2013-09-09 07:27:35.130 15033 TRACE nova.compute.manager [instance: ac4dda7c-9e67-4eed-a5ee-89b480c524ee]

I use nova/quantum 2013.1.3

Cheers,

Revision history for this message
Mehdi Abaakouk (sileht) wrote :

Issue seems to introduced by this commit:

https://github.com/openstack/nova/commit/d367ab62720988231524accab33488ed1d6c8555

The method allocate_for_instance must always return a nova.network.model.NetworkInfo not a list

havana/master seems to be affected too https://github.com/openstack/nova/commit/8f3b3db9b04bb5ff7b9486dc6fc211745b983855

Changed in nova:
assignee: nobody → Mehdi Abaakouk (sileht)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/45673

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/45674

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/45674
Committed: http://github.com/openstack/nova/commit/0dbcdc87d86031c9e3af29a72b830bda57b1161c
Submitter: Jenkins
Branch: master

commit 0dbcdc87d86031c9e3af29a72b830bda57b1161c
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Sep 9 14:16:49 2013 +0200

    Return a NetworkInfo object instead of a list

    This return a NetworkInfo object instead of a list when there are no
    configured networks available.

    Fixes bug #1222781

    Change-Id: I59c88944253ed5ff8b567d79046c3065fdfed9ab

Changed in nova:
status: In Progress → Fix Committed
Mehdi Abaakouk (sileht)
tags: added: havana-rc-potential
Thierry Carrez (ttx)
tags: added: havana-backport-potential
removed: havana-rc-potential
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.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.