]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Make L2 DVR Agent start successfully without an active neutron server
authorBrian Haley <brian.haley@hp.com>
Thu, 25 Sep 2014 01:45:06 +0000 (21:45 -0400)
committerBrian Haley <brian.haley@hp.com>
Wed, 29 Oct 2014 14:37:56 +0000 (10:37 -0400)
commit51303b5fe4785d0cda76f095c95eb4d746d7d783
treedb95bafa01255b888f5bb88005de20f259c23ebe
parent1aaa8b34466b0567c6a5ea0b607f1ac324ee5dfa
Make L2 DVR Agent start successfully without an active neutron server

If the L2 Agent is started before the neutron controller
is available, it will fail to obtain its unique DVR MAC
address, and fall-back to operate in non-DVR mode
permanently.

This fix does two things:
1. Makes the L2 Agent attempt to retry obtaining a DVR MAC
address up to five times on initialization, which should be
enough time for RPC to be successful.  On failure, it will
fall back to non-DVR mode, ensuring that basic switching
continues to be functional.

2. Correctly obtains the current operating mode of the
L2 Agent in _report_state(), instead of only reporting
the configured state.  This operating mode is carried
in 'in_distributed_mode' attribute of agent state, and
is separate from the existing enable_distributed_routing
static config that is already sent.

Change-Id: I5fd9bf4163eafa321c5fca7ffb7901ae289f323b
Closes-bug: #1364215
neutron/plugins/openvswitch/agent/ovs_dvr_neutron_agent.py
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py