get_instance_nw_info() passing wrong parameter to quantum api

Bug #1158679 reported by Zhongyue Luo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Zhongyue Luo

Bug Description

Currently test_network_basic_ops in Tempest has been failing for quite a while using the OVS plugin.

The problem is nova.virt.firewall.instance_rules is passing the conductor api object as a network parameter to quantumv2.api.get_instance_nw_info().

Called in nova.virt.firewall.instance_rules:
    nw_info = nw_api.get_instance_nw_info(ctxt, instance, capi)

Method definition in nova.network.quantumv2.api:
    def get_instance_nw_info(self, context, instance, networks=None, conductor_api=None)

--

Below is the error log when running "nosetests tempest/tests/network/test_network_basic_ops.py"

2013-03-22 16:00:29.059 ERROR nova.compute.manager [req-2434167a-94b0-4fd2-8f94-fd1bb92e680f demo demo] [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] Instance failed to spawn
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] Traceback (most recent call last):
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] File "/opt/stack/nova/nova/compute/manager.py", line 1058, in _spawn
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] block_device_info)
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1520, in spawn
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] block_device_info)
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0
-8caa-4b03482a9b63] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2434, in _create_domain_and_network
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] self.firewall_driver.prepare_instance_filter(instance, network_info)
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] File "/opt/stack/nova/nova/virt/firewall.py", line 193, in prepare_instance_filter
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] ipv4_rules, ipv6_rules = self.instance_rules(instance, network_info)
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] File "/opt/stack/nova/nova/virt/firewall.py", line 422, in instance_rules
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] capi)
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] File "/opt/stack/nova/nova/network/quantumv2/api.py", line 358, in get_instance_nw_info
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] result = self._get_instance_nw_info(context, instance, networks)
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] File "/opt/stack/nova/nova/network/quantumv2/api.py", line 366, in _get_instance_nw_info
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] nw_info = self._build_network_info_model(context, instance, networks)
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] File "/opt/stack/nova/nova/network/quantumv2/api.py", line 788, in _build_network_info_model
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] [n['id'] for n in networks])
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63] TypeError: 'API' object is not iterable
2013-03-22 16:00:29.059 TRACE nova.compute.manager [instance: 7c9fd9a9-72b4-48b0-8caa-4b03482a9b63]

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/25115

Changed in nova:
assignee: nobody → Zhongyue Luo (zyluo)
status: New → In Progress
Zhongyue Luo (zyluo)
description: updated
Zhongyue Luo (zyluo)
summary: - get_instance_nw_info passing conductor api obj to quantum api
+ get_instance_nw_info passing conductor api obj instead of networks to
+ quantum api
summary: - get_instance_nw_info passing conductor api obj instead of networks to
- quantum api
+ get_instance_nw_info() passing wrong parameter to quantum api
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/25115
Committed: http://github.com/openstack/nova/commit/67628c56caf9d84588a92448880ecdb33eea08b4
Submitter: Jenkins
Branch: master

commit 67628c56caf9d84588a92448880ecdb33eea08b4
Author: Zhongyue Luo <email address hidden>
Date: Fri Mar 22 16:50:21 2013 +0800

    Fixes passing arbitrary conductor_api argument

    Fixes bug #1158679

    Change-Id: Iabe1f58b6139f5619e328a986143e8591b3a02cc

Changed in nova:
status: In Progress → Fix Committed
Zhongyue Luo (zyluo)
tags: added: grizzly-backport-potential
tags: added: grizzly-rc-potential
removed: grizzly-backport-potential
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25398

Changed in nova:
milestone: none → grizzly-rc2
Thierry Carrez (ttx)
tags: removed: grizzly-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/25398
Committed: http://github.com/openstack/nova/commit/2df099a66d62bd22e2cf2f8c1c85975b3f3dda0b
Submitter: Jenkins
Branch: milestone-proposed

commit 2df099a66d62bd22e2cf2f8c1c85975b3f3dda0b
Author: Zhongyue Luo <email address hidden>
Date: Fri Mar 22 16:50:21 2013 +0800

    Fixes passing arbitrary conductor_api argument

    Fixes bug #1158679

    Change-Id: Iabe1f58b6139f5619e328a986143e8591b3a02cc
    (cherry picked from commit 67628c56caf9d84588a92448880ecdb33eea08b4)

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc2 → 2013.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.