local variable 'network_name' referenced before assignment

Bug #1271405 reported by Xiang Hui
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Xiang Hui

Bug Description

Hi team,

  I encounter this error in a lightly complicated situation:

  OS : ubuntu
  Branch : Icehouse

  When booting a vm with admin role and assigning it with another tenant's private network, it's fine to work.
  But the update info cache action will started periodically, at this time, the privous mentioned other tenant's
  private network is filtered out from the function "get_available_network()" if do not transfer the provisioned Non-None value net_ids parameter.
Then bad things happened as below:

  The worst affect is the vm can not be deleted normally.

  2014-01-20 11:03:19.632 DEBUG nova.compute.manager [-] An error occurred from (pid=5521) _heal_instance_info_cache /opt/stack/nova/nova/compute/manager.py:4488
2014-01-20 11:03:19.632 TRACE nova.compute.manager Traceback (most recent call last):
2014-01-20 11:03:19.632 TRACE nova.compute.manager File "/opt/stack/nova/nova/compute/manager.py", line 4484, in _heal_instance_info_cache
2014-01-20 11:03:19.632 TRACE nova.compute.manager self._get_instance_nw_info(context, instance, use_slave=True)
2014-01-20 11:03:19.632 TRACE nova.compute.manager File "/opt/stack/nova/nova/compute/manager.py", line 891, in _get_instance_nw_info
2014-01-20 11:03:19.632 TRACE nova.compute.manager instance)
2014-01-20 11:03:19.632 TRACE nova.compute.manager File "/opt/stack/nova/nova/network/api.py", line 50, in wrapper
2014-01-20 11:03:19.632 TRACE nova.compute.manager res = f(self, context, *args, **kwargs)
2014-01-20 11:03:19.632 TRACE nova.compute.manager File "/opt/stack/nova/nova/network/neutronv2/api.py", line 439, in get_instance_nw_info
2014-01-20 11:03:19.632 TRACE nova.compute.manager result = self._get_instance_nw_info(context, instance, networks)
2014-01-20 11:03:19.632 TRACE nova.compute.manager File "/opt/stack/nova/nova/network/neutronv2/api.py", line 446, in _get_instance_nw_info
2014-01-20 11:03:19.632 TRACE nova.compute.manager nw_info = self._build_network_info_model(context, instance, networks)
2014-01-20 11:03:19.632 TRACE nova.compute.manager File "/opt/stack/nova/nova/network/neutronv2/api.py", line 1043, in _build_network_info_model
2014-01-20 11:03:19.632 TRACE nova.compute.manager subnets)
2014-01-20 11:03:19.632 TRACE nova.compute.manager File "/opt/stack/nova/nova/network/neutronv2/api.py", line 952, in _nw_info_build_network
2014-01-20 11:03:19.632 TRACE nova.compute.manager for net in networks:
2014-01-20 11:03:19.632 TRACE nova.compute.manager UnboundLocalError: local variable 'network_name' referenced before assignment

Xiang Hui (xianghui)
Changed in nova:
assignee: nobody → Xiang Hui (xianghui)
Xiang Hui (xianghui)
description: updated
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/68348

Changed in nova:
status: New → In Progress
Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

Is this a dupe of bug 1271333 ?

Revision history for this message
Xiang Hui (xianghui) wrote :

@Pádraig, Seems they are the same one, thanks : )

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.