This patch intends to make the transition of the OVN DevStack module
easier by allowing both copies of it to exist at the same time, the one
in Neutron repository and the one in the DevStack repository [0].
1) Make create_public_bridge idempotent
If we call this function more than once the second call and on will fail
with the following error:
2020-07-13 09:12:53.885633 | controller | ++
/opt/stack/neutron/devstack/lib/ovn_agent:create_public_bridge:263 :
sudo ip addr add 172.24.5.1/24 dev br-ex
2020-07-13 09:12:53.894247 | controller | RTNETLINK answers: File exists
During the transiton of moving the OVN DevStack from the Neutron
repository to the DevStack repository [0] this method is being invoked
twice in the ovn job in the DevStack gate because it will be cause as
part of the plugin being enabled and the normal code execution.
This patch makes the method idempotent by calling "addr replace" instead
of "addr add" to avoid the "RTNETLINK answers: File exists" error.
2) Move the setup of the tcpdump on br-ex to "extra" to it can start
after the create_public_bridge is called.
[0] https://review.opendev.org/#/c/734621/
Change-Id: I74b05ef245a343c7531fa45aeadb90060b2fd22e
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
There is case that gateway is not in subnet CIDR.
We can set 2 routes as follows to support this:
ip route add 172.16.0.1/32 dev eth0
ip route add default via 172.16.0.1 dev eth0
Closes-bug: #1861674
Change-Id: I69356e926b15de7f1f99540e7cb98671c634e8a9
This resolves a bug that causes stale records to be kept in place when
an admin deletes a port, server or floating IP that was created in some
project other than the admin project.
Change-Id: I7cbb0e87a7e87f23ccf5d8750835b4785693473a
Closes-Bug: #1875981
OVN distributed services like Metadata and DHCP uses now
DEVICE_OWNER_DHCP device_owner which isn't distributed by its nature.
To fully use benefits of OVN Distributed ports (localports) [1]
and to not overlap with Neutron logic created for not-distributed
ports we should use new device_owner.
In this change we need also to bump minimum required
neutron-lib to 2.4.0.
[1] https://www.ovn.org/support/dist-docs/ovn-nb.5.txt
Change-Id: I0a69f1bddaa7030c7287216e62ec1ac6dd381475
Subnet delete triggers dhcp port deletion but asynchronously,
therefore in the condition described in the bug report we may
get a conflict when deleting the segment too fast after the subnet.
Here we follow the example of how we auto-delete ports in net delete.
Please also find a fullstack test in Related-Change below.
Change-Id: Iba02f5a2211b18c2deb9097daad6be5e7d21faf8
Closes-Bug: #1878632
Related-Change: https://review.opendev.org/728904
In order for IPv6 to function correctly for instances, a router
must be created and added to a subnet. Update the documentation
to better highlight this as it wasn't clear a router was
required on an isolated subnet such that Router Advertisements
messages would be sent.
Change-Id: I4aca67c98ae77bbc4c130764af5a92515b95443a
Closes-bug: #1886116
New cirros with recent fixes for metadata service
has been released. Lets update the image version on gate.
Also stop using different images for OVN. Lets use default
settings from devstack.
First we need to merge [2].
[1] e40bcd2964
[2] https://review.opendev.org/#/c/711492/
Change-Id: Idc614f9f25188bd1a1e1d5424274acf04ba99328
In patch [1] we moved neutron_tempest_plugin test executions to
neutron-tempest-plugin repository.
That moves us forward with unifying the way of executing tests
after OVN merge.
[1] https://review.opendev.org/#/c/734832/
Change-Id: Iecca2649fc5e066fabe7f4b4746094506b595f0b
There were duplicated methods doing almost the same in terms
of OVS/OVN compilation.
This change:
* move of OVS related compilation code to devstack/lib/ovs
* delete of OVS related compilation code from devstack/lib/ovn_agent
* source unified functions in devstack/lib/ovn_agent from
devstack/lib/ovs
* Unify NEUTRON_PATH variable to NEUTRON_DIR
Closes-Bug: #1877377
Change-Id: Ia012a8e116a276a6674f86366c803e0e2d8ff704
In case when related dvr router is configured by L3 agent, it is first
added to the tasks queue and then processed as any other router hosted
on the L3 agent.
But if L3 agent will ask neutron server about details of such router,
it wasn't returned back as this router wasn't really scheduled to the
compute node which was asking for it. It was "only" related to some
other router scheduled to this compute node. Because of that router's
info wasn't found in reply from the neutron-server and L3 agent was
removing it from the compute node.
Now _get_router_ids_for_agent method from the l3_dvrscheduler_db module
will check router serviceable ports for each dvr router hosted on the
compute node and will then find all routers related to it. Thanks to
that it will return routers which are on the compute node only because
of other related routers scheduled to this host and such router will not
be deleted anymore.
Change-Id: I689d5135b7194475c846731d846ccf6b25b80b4a
Closes-Bug: #1884527
New versions of isort broke pylint. This patch fixes it at 4.3.21.
Depends-On: https://review.opendev.org/739469
Change-Id: Ic6858b60ae6b7cd031843ea594b8fe1c8a67bb54
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
When a floating IP is being created, the network provided should be
external. Instead of quering the DB to find out if the
"externalnetworks" DB register exists, the "network" register is
retrieved and the "external" parameter is used (loaded using a
back reference relationship). This will avoid one DB access.
Change-Id: Iead245da166ee2ae691227bb18ae377fe0af4c04
Related-Bug: #1880969
Relocate "_delete_expired_default_network_segment_ranges" to avoid
code redundancy.
Now instead of searching all objects and deleting one by one,
"delete_objects" is used.
Trivial-Fix
Change-Id: I1753263cb15ce2988ac4ccae03b7395069f2c4e9
The default path for the OVS tools is /usr/local/bin [0] but, by default
this location is not included in the $PATH for some distros (e.g
OpenSuse).
This patch includes the $OVS_BINDIR to the $PATH variable for deploying
DevStack.
[0]
0fc38297ba/python/ovs/dirs.py (L23)
Change-Id: If7d68212cadb8eb8a12fa3271023c9e86b2d411e
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
This is the code behavior aligning for dvr related logical. The
L3 dvr DB will remove all related FIP agent gateway port after there
is no real use of it. But the DvrFipGatewayPortAgentBindings remain,
it will cause the issue of new floating IP failed to bind. This
patch adds the binding deleting action.
Related-bug: #1883089
Change-Id: I62c29e172bc8705dade11d37bb347241ef8ad5f8