When we manually move a router from one dvr_snat node to
another dvr_snat node the snat_namespace should be removed in
the originating node by the agent and will be re-created in the
destination node by the destination agent.
But when the agent dies, the router_update message reaches the
agent after the agent restarts. At this time the agent should
remove the snat_namespace since it is no more hosted by the
current agent.
Even though we do have logic in agent to take care of cleaning
up the snat namespaces if the gw_port_host does not match with the
existing agent host, in this particular use case the self.snat_namespace
is always set to 'None' in the dvr_edge_router init call when agent
restarts.
This patch fixes the above issue by initializing the snat namespace
object during the router_init. Since we do have a valid snat
namespace object and if the gw_port_host mismatches, the agent
should clean up the namespace.
Change-Id: I30524dc77b743429ef70941479c9b6cccb21c23c
Closes-Bug: #1557909
(cherry picked from commit 9dc70ed77e)
This reverts commit 81823e8632.
Unneeded optimization: this commit only improves execution
time on the order of milliseconds, which is less than 1% of
the total router update execution time at the network node.
This also
Closes-bug: #1574881
Change-Id: Icbcdf4725ba7d2e743bb6761c9799ae436bd953b
The method signature before Mitaka did not have the mtu= parameter. We
should continue supporting the old signature, since it can be used in
out of tree interface drivers. The class is part of public neutron API,
so we should make an effort to not break out of tree code.
Local modifications:
- don't issue a deprecation warning in minor release update.
Change-Id: I8e0c07c76fd0b4c55b66c20ebe29cdb7c07d6f27
Closes-Bug: #1570392
(cherry picked from commit 8a86ba1d01)
Once all agents are deleted from a host, the DVR MAC generated
for that host should be deleted as well to prevent a buildup of
pointless flows generated in the OVS agent for hosts that don't
exist.
Closes-Bug: #1568206
Change-Id: I51e736aa0431980a595ecf810f148ca62d990d20
(cherry picked from commit 92527c2de2)
Neutron currently hardcodes the number of
greenlets used to process requests in a process to 1000.
As detailed in
http://lists.openstack.org/pipermail/openstack-dev/2015-December/082717.html
this can cause requests to wait within one process
for available database connection while other processes
remain available.
By adding a wsgi_default_pool_size option functionally
identical to that of Nova, we can lower the number of
greenlets per process to be more in line with a typical
max database connection pool size.
DocImpact: a previously unused configuration value
wsgi_default_pool_size is now used to affect
the number of greenlets used by the server. The
default number of greenlets also changes from 1000
to 100.
Change-Id: I94cd2f9262e0f330cf006b40bb3c0071086e5d71
(cherry picked from commit 9d573387f1)
When starting up, we don't want to delete the patch port between br-int
and the physical bridges. In liberty the br-int bridge was changed to
not tear down flows on startup, and change
I9801b76829021c9a0e6358982e1136637634a521 will change the physical
bridges to not tear down flows also.
Without this patch the patch port is torn down and not reinstalled until
after the initial flows are set back up.
Partial-Bug: #1514056
Change-Id: I05bf5105a6f3acf6a313ce6799648a095cf8ec96
(cherry picked from commit a549f30fad)
We only want this to warn when a deployer has set anything other
than a blank string. The olso cfg would warn whenever it was set
so it was incorrectly warning on the value we want operators to
set it to.
This changes the cfg option to not use deprecated for removal and
the L3 agent config validation to emit a warning if its not set
to the value we are suggesting.
Change-Id: If533cf7c4c379be78f5a15073accaff7f65973ab
Closes-Bug: #1563070
(cherry picked from 8382ac3717)
This patch adds a new ALLOCATING status to routers
to indicate that the routers are still being built on the
Neutron server. Any routers in this state are excluded in
router retrievals by the L3 agent since they are not yet
ready to be wired up.
This is necessary when a router is made up of several
distinct Neutron resources that cannot all be put
into a single transaction. This patch applies this new
state to HA routers while their internal HA ports and
networks are being created/deleted so the L3 HA agent
will never retrieve a partially formed HA router. It's
important to note that the ALLOCATING status carries over
until after the scheduling is done, which ensures that
routers that weren't fully scheduled will not be sent to
the agents.
An HA router is placed in this state only when it is being
created or converted to/from the HA state since this is
disruptive to the dataplane.
This patch also reverts the changes introduced in
Iadb5a69d4cbc2515fb112867c525676cadea002b since they will
be handled by the ALLOCATING logic instead.
Co-Authored-By: Ann Kamyshnikova <akamyshnikova@mirantis.com>
Co-Authored-By: John Schwarz <jschwarz@redhat.com>
APIImpact
Closes-Bug: #1550886
Related-bug: #1499647
Change-Id: I22ff5a5a74527366da8f82982232d4e70e455570
(cherry picked from commit 9c3c19f07c)
Perform deletion of the stale flows in physical bridges consistently with
br-int and br-tun, respecting drop_flows_on_start configuration option.
Added tests for auxiliary bridge and functional tests for the physical
bridge using VLAN/flat external network. Fixes part of the bug 1514056;
together with [1] and [2], the bug should be considered fixed.
The commit also fixes inconsistency between netmask of allocated IP
addresses assigned in _create_test_port_dict and ip_len in _plug_ports
of base.py.
[1] https://review.openstack.org/#/c/297211/
[2] https://review.openstack.org/#/c/297818/
Co-Authored-By: Jian Wen <wenjianhn@gmail.com>
Partial-Bug: 1514056
Change-Id: I9801b76829021c9a0e6358982e1136637634a521
(cherry picked from commit cacde308ee)
resource_versions were included into agent state reports recently to
support rolling upgrades (commit 97a272a892)
The downside is that it brought additional processing when handling state
reports on server side: update of local resources versions cache and
more seriously rpc casts to all other servers to do the same.
All this led to a visible performance degradation at scale with hundreds
of agents constantly sending reports. Under load (rally test) agents
may start "blinking" which makes cluster very unstable.
In fact there is no need to send and update resource_versions in each state
report. I see two cases when it should be done:
1) agent was restarted (after it was upgraded);
2) agent revived - which means that server was not receiving or being able
to process state reports for some time (agent_down_time). During that
time agent might be upgraded and restarted.
So this patch makes agents include resource_versions info only on startup.
After agent revival server itself will update version_manager with
resource_versions taken from agent DB record - this is to avoid
version_manager being outdated.
Closes-Bug: #1567497
Change-Id: I47a9869801f4e8f8af2a656749166b6fb49bcd3b
(cherry picked from commit e532ee3fcc)
Otherwise agent becomes unable to handle more than 1024 routers
(including deleted routers) and starts failing.
It should be enough to distinguish address scopes inside router namespace,
so this patch moves ADDRESS_SCOPE_MARK_IDS set to the RouterInfo class.
Closes-Bug: #1566291
Change-Id: I1e43bb3e68db4db93cc1dfc1383af0311bfb0f2d
(cherry picked from commit 1cb4373480)
This is needed for mysql galera multimaster backends.
Closes-Bug: #1564144
Change-Id: Ia5a14d5ee91c6672d61904f669e9e845a7f262c9
(cherry picked from commit d8f0ee5ecd)
Obviously there could be physical networks with same MTU.
The patch sets unique_values to False when parsing physical_network_mtus
Unit test added.
Closes-Bug: #1567502
Change-Id: I46e5b5d3f7033a974fca40342af6dff7c71a9a4a
(cherry picked from commit 5cdd7ae574)
Commit 9ec466cd42 was not enough
since it checked l3 agents in the same transaction that was used
to fetch down bindings - so agents always were down even if actually
they went back online.
This commit adds context creation on each iteration to make sure
we use new transaction and fetch up-to-date info for the agent.
Closes-Bug: #1522436
Change-Id: I12a4e4f4e0c2042f0c0bf7eead42baca7b87a22b
(cherry picked from commit 70068992e3)
OVS agent stores vlan tag only to other_config before
setup_port_filter() is called [1], leaving 'tag' column empty. This
patch loads tag from correct place and modifies functional tests
accordingly.
Closes-Bug: 1566934
[1] 1efed3a532/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py (L821)
Change-Id: Iaae46ce7362fedfc53af958600d6d712eb382e9f
(cherry picked from commit dabd969090)