It looks like sometimes, the device_id for ports created
by Neutron DHCP Agent can be in the form of:
- dhcp-$hostuuid-$networkid
- 'reserved_dhcp_port' (DEVICE_ID_RESERVED_DHCP_PORT)
Current code is only taking the first form into account when
skipping Neutron DHCP Agent ports. This patch is changing it
to include both forms.
Closes-Bug: #1848521
Co-Authored-By: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: Ifbfc551ac68dcc5d3d39a155f7642f2f2d9272c4
Signed-off-by: Daniel Alvarez <dalvarez@redhat.com>
The ovs-vswitchd and ovsdb-server services were missing in the rally
definition. Usually the jobs inherts from our base class which enables
them but rally has a different job parent.
Change-Id: Icd26d2fbdb71480184f3814f07e82025f7ddd963
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Setting binding profile for Trunk subports takes
time - for 125 subports rally CreateAndListTrunks
scenario [0] takes about 150 seconds. We need to
bump up the perfomance because large number of
subports is widly used in Kuryr deployments.
To achieve that I changed setting the binding
profile to be saved directly to the neutron DB.
Instead calling port_update I update only related
fields in OVN NorthBound DB rows. That gave performance
improvement in trunk port creation:
from 101 sec to 35.6 for 95%ile
from 99 sec to 34.2 for 50%ile
The same thing has been done for Trunk deletion.
This reverts commit 2e0832f7b8
[0] https://github.com/openstack/rally-openstack/blob/master/rally_openstack/scenarios/neutron/trunk.py#L37
Change-Id: I6b659cbede25f271fa3b6a1c9e72019694ab6608
Closes-Bug: #1834637
Related-Bug: #1845479
Co-authored-by: Maciej Józefczyk <mjozefcz@redhat.com>
Python 2 will be EOL at the end of 2019. Ussuri will no longer support
Python 2 so it's safe to remove python2 jobs and save some CI resources.
py27 unittest tox target is kept because the job is defined globally for all
projects. We can remove the py27 tox target once the job is removed.
Change-Id: I38f5a382bf54c30361ccc93d5f565b2cfdd1d621
Add test to ensure that logical router port associated
with an external network is created and removed as
needed: test_logical_router_port_creation. With that,
the test exercises the code-path where a gateway is
removed before a new one is set. In terms of OpenStack
workflow, that would look like:
openstack router set --external-gateway $EXT_NET_ID $RTR
openstack router unset --external-gateway $RTR
openstack router set --external-gateway $EXT_NET_ID2 $RTR
Also changed test_gateway_chassis_with_bridge_mappings
to include docstring and have a lower bound count to the
mocked objects it uses.
Change-Id: Ib3edc101e9ee0fb53386fac0ae7f272ab3b3646b
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
Related-Bug: #1843485
Closes-Bug: #1844652
Make TestOVNFunctionalBase check if install path for
OVN [1] is present and use that instead of legacy OVS
location [2].
[1]: /usr/local/share/ovn
[2]: /usr/local/share/openvswitch
Change-Id: Ifd1048fdf8fefb8dc23781ccf1500b2a70101935
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
If member gets updated with new data, but without IP version
we shouldn't be checking if ip_version differs from the listener.
Related-Bug: #1843553
Change-Id: I5edfc70efeaa0758373ecfb2fa12f4721c6fb1f8
There is a race where updating address in the northbound DB is not yet
propagated to the southbound DB before querying the southbound DB for
the new address. The patch waits for port binding event with the new
address before it continues.
Closes-bug: #1846186
Change-Id: Iad2469c90f413c7862f046d8493930aee4b75e13
On busy machines when running funcional tests, it may take time to
process new logical port and create port bindings entry in the
southbound database.
Because the tests need to wait for gateway router port that is created
along with router object, we don't know the name of the logical port
beforehand. The patch creates a new wait event that matches on ports
starting with "cr-lrp-" string and caches all such ports. Later, the
wait() method implements parameter for the logical port names and
compares whether event with this logical port name occured and if so,
the waiting ends and port is removed from the cache.
This makes effective waiting for gateway router ports.
Change-Id: I5d2209906e70c0220ce20c4dc6593461d5dc7ffa
Closes-bug: #1842291
We now require at least 0.17.0 version of ovsdbapp so fallback
mechanisms for older versions are no longer needed.
Change-Id: I33c1fe430055c986bc3676e38daa4080de105201
Those jobs were using 2.11. We would like to have tests
for InternalDNS functionality so we need to switch those to
2.12.
Unfortunately branch-2.12 is not yet configured
in ovn.org repository. Because of this lets bump up
version in repository selector function
(use_new_ovn_repository).
Change-Id: I186f80d51ba52d386c48f40cf0d21ebaf51d8d98
Prior to this patch, logical port used by the router to the external
network was lost if subnet was added to that network. That was
caused by missing explicit delete call in DelLRouterPortCommand.
Also added functional test to exercise this particular code path:
test_router::test_gateway_chassis_with_subnet_changes()
Closes-Bug: #1843485
Co-authored-by: Daniel Alvarez <dalvarez@redhat.com>
Co-authored-by: Terry Wilson <twilson@redhat.com>
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
Change-Id: I3e9d62ffc5eab396e983c0769e53d2d1f35644f6
During recent days we many observed failures of
neutron_tempest_plugin.scenario.test_trunk.TrunkTest.test_trunk_subport_lifecycle test.
It started to fail on a different asserts.
Lets revert this patch, as it is a regression, and work further on this issue.
This reverts commit 41f6d622ab.
Related-Bug: #1834637
Related-Bug: #1845479
Change-Id: I63acf0c809aa158aeba1c79c7c9083966ffd58a3
We have stability issues with Trunk driver optimalizations [0].
In meantime neutron rally jobs sync has been merged [1] that
enabled Trunk scenarios.
Lets allow those rally tests failures, rollback [0] and in meantime fix it.
[0] https://review.opendev.org/#/c/676182/
[1] https://review.opendev.org/#/c/664605/
Related-Bug: #1845479
Change-Id: Icf0f0f42f02180c787159fbd740b54316d5db997
The functional test base created an explicit connections to the OVSDB
servers. However, there are other connections created by the mech_driver
itself. This patch replaces the explicit connections with the ones from
the mech_driver to avoid races in test between DB connections. e.g.
Connection1 creates resource and connection2 uses the resource - there
is a need every time to wait for connection2 to sync the DB to its local
replica.
Closes-bug: #1845003
Change-Id: Ib770a6c83192c06593463734d3f74f83eff513b4
This patch is adding the configuration needed to enable the advanced
images tests for tempest in the DevStack sample config file.
TrivialFix
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I87a36fddc80b91344b384e49f0b13fe7e704b4da
plugin.sh appends OVN_* variables to ~/.bash_profile.
The problem with this is that if there was no .bash_profile file
previously ~/.bashrc won't be sourced automatically.
My approach was to add the sourcing of .bashrc to the newly created
.bash_profile file, to keep the user's .bashrc settings (aliases,
environment variables, etc.)
Change-Id: Icea01fe7e5f50a076add42d5b7d1ae96b058e867
Functions get_port_group() and get_port_groups() were failing
with KeyError while getting to access non-existent Port_Group
table with OVS 2.9.
This patch adds additional check if Port Group is supported in the
env where the code runs.
Change-Id: If3ce6ab1d1318a6d5142989b3bf45ecce97762e3
Closes-Bug: #1844491
The correct path should be hashed-container-startup-config-step_4.json
instead of hashed-docker-container-startup-config-step_4.json in
cleanup-dataplane.yml.
When this file was originally commited the path was
hashed-docker-container-startup-config-step_4.json but we have changed
it a few releases ago.
Change-Id: I901eedf64f7bd4281f94c156c33489355ff97aee
While other tests cover what happens when a Port_Binding is updated
when this event doesn't match, there was no test that covered the
case when it does. This test does test primarily implementation
details, but will have to do until we can test the actual use case
which involves uncleanly killing a compute server and doing a
'host evacuate' from it.
Change-Id: If9fc4209c5c54149a39ee3ddc743f3c11c51ceec
The neutron_pg_drop Porg Group is created with some ACLs to drop
all the traffic by default. This group doesn't match any Neutron
resource and it's created once the first Neutron port with
port_security enabled gets created.
A race condition exists whn the first two ports get created
simultaneously by different works as both may attempt to create
this Port Group. The result is that one of the port creations will
fail. Setting may_exist=True should avoid this race
Co-authored-by: Daniel Alvarez <dalvarez@redhat.com>
Closes-Bug: 1838969
Change-Id: I8c1174df562a7164d4a96ce2e733279723827dcd