]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Don't use iterator in search for tunnel type
authorJakub Libosvar <libosvar@redhat.com>
Wed, 29 Apr 2015 10:04:03 +0000 (12:04 +0200)
committerJakub Libosvar <libosvar@redhat.com>
Thu, 30 Apr 2015 07:35:29 +0000 (09:35 +0200)
commite1fd7a8c5d1dd683603a75244f5baf273d018fc7
tree1693ee6c31633c0c8cbce20708ae28b0ad62bc0f
parentc5188d8bf8493e4b075689f64251f85231e696a2
Don't use iterator in search for tunnel type

Changing dictionary size while using iterator causes RuntimeError. This
can happen in local vlan mapping under certain program flows. This patch
changes iteritems() to values() that returns list and thus preventing
from failure if local vlan mapping changes during creating tunnels.

Change-Id: I8a858d5c53e85f83a582f34205f9afa214cb4d58
Closes-Bug: 1449944
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/plugins/openvswitch/agent/test_ovs_neutron_agent.py