]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix AttributeError during startup of ovs agent in DVR mode
authorarmando-migliaccio <armamig@gmail.com>
Fri, 21 Nov 2014 22:41:05 +0000 (14:41 -0800)
committerArmando Migliaccio <armamig@gmail.com>
Mon, 8 Dec 2014 19:58:12 +0000 (19:58 +0000)
commitaa728c00bab3bb6b3e00866e44ca054b1e848bb6
tree1298d024520e888e1d9250c1d5e1038bfe040d66
parent3eb350ac06075cf24fdfefd5df85c52c4ee44a15
Fix AttributeError during startup of ovs agent in DVR mode

Make sure the agent starts processing incoming requests only after the entire
initialization is complete. This is done by making explicit when the rpc loop
is supposed to start, i.e. right at the end of the init process.

This fix was necessary because the agent starts processing rpc messages even
though it has not completed the entire initialization of bridges and data
structures; this is usually okay, but in case of DVR, this leads to a
situation where during the the first run, the agent asks the server to be
assigned a MAC address; this in turn leads the server to fanout the generated
MAC to the running agents, the requesting one included; because of the
incomplete setup, the above mentioned error occurs. During subsequent
restarts, the problem no longer appears.

Closes-bug: #1395196

Change-Id: I792697b94fef39971693cf8aff715c270601cecb
neutron/agent/rpc.py
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/test_agent_rpc.py