26180 Commits

Author SHA1 Message Date
sunxifa
326c0076ef Update port-mac-address-override shim extension
The port-mac-address-override shim extension proposed in
I54b4c85ffc4856fba7ad5e9e29f77f74815e1275 in neutron-lib has merged
and the neutron-lib has being released. So this patch updates the
API extension and replaces the import with the new neutron_lib api
definitions.

Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/831935

Change-Id: Ic332769af532003a9a5b2d2cee38b6210b5aac91
Related-Bug: #1942329
2022-06-04 15:19:52 +08:00
Zuul
d253b9fd08 Merge "Add some logging to test_good_address_allocation" 2022-06-03 15:51:33 +00:00
Zuul
3261f3bafb Merge "Fix typos in log/error messages" 2022-06-02 18:43:19 +00:00
Zuul
c37b6e217a Merge "Remove not wanted section in local.conf sample" 2022-06-02 18:38:25 +00:00
Zuul
75b95ad1c4 Merge "[OVN] Add baremetal support without Neutron DHCP agent for IPv4" 2022-06-02 13:55:11 +00:00
Zuul
f186f1b6c0 Merge "Create an index for subnetpools.address_scope_id" 2022-06-02 08:32:56 +00:00
Miguel Lavalle
a181102db2 Remove not wanted section in local.conf sample
Commit [1] added by accident lines to an ovn local.conf sample file. In
this change, the file is restored to its previous state

TrivialFix

[1] https://review.opendev.org/c/openstack/neutron/+/828673

Change-Id: I9a43fa201291002fb1b1a9c76322581aa02f897b
2022-06-01 15:54:20 -05:00
Zuul
ae66417cee Merge "Mark functional L3ha tests as unstable" 2022-06-01 17:33:52 +00:00
Zuul
e34a63b6da Merge "Switch Fips fullstack/functional tests to py3.8" 2022-06-01 17:33:41 +00:00
Zuul
d8dc8db118 Merge "Skip non-functional jobs on functional roles/playbooks changes" 2022-06-01 16:43:28 +00:00
Zuul
4eafb26169 Merge "[OVN] Protect the AgentCache iteration by copying the local cache" 2022-06-01 16:00:07 +00:00
Zuul
f5bab4d717 Merge "[sqlalchemy-20] Add the needed DB context decorators in `db.api`" 2022-06-01 16:00:02 +00:00
Rajesh Tailor
18b1b61401 Fix typos in log/error messages
This change fixes some of the typos in LOG and ERROR
messages, comments and variable names.

Change-Id: I26ebf751b7d187399e8b3d8089e09b9d51ba3625
2022-06-01 21:17:29 +05:30
Slawek Kaplonski
d13da77107 Mark functional L3ha tests as unstable
All functional tests which uses wait_until_ha_router_has_state() method
are now marked as unstable so in case of timeout while waiting for
router's state transition, job will not fail.

Related-Bug: #1956958
Change-Id: I0e5d08c1a9dc475c7b138c4934ef0331a4339a4c
2022-06-01 17:28:42 +02:00
5957e90575 Create an index for subnetpools.address_scope_id
The method "get_network_address_scope" filters
"Subnetpool" with "address_scope_id" using an
exact match. Making the column indexed will improve
the query performance.

Closes-Bug: #1973726
Change-Id: Ib3f8e18ba28b277d5fa02dd386ca80a5a113c247
2022-06-01 19:41:53 +05:30
Rodolfo Alonso Hernandez
a71fe45d96 [OVN] Protect the AgentCache iteration by copying the local cache
During the execution of ``AgentCache.__iter__``, the content of
"self.agents" can change; the Neutron server can attend to an event
to add or delete an OVN agent. If that happens, the iteration will
fail with the error:
  "RuntimeError: dictionary changed size during iteration"

To avoid this, before iterating the list of agents, the cache
singleton creates a copy of the local cache. The aim of making this
copy is to avoid using locks between threads.

Closes-Bug: #1976292
Change-Id: Icf92685579409282bad0a80ba42531c93738e0b1
2022-06-01 10:12:08 +00:00
Zuul
f966ed8c15 Merge "[Trunk] Check if parent port belongs to OVN to activate" 2022-05-31 19:55:51 +00:00
Zuul
8c1ad2dfad Merge "Check the Chassis_Private nb_cfg_timestamp with current value" 2022-05-31 09:20:46 +00:00
7f5fb86232 Switch Fips fullstack/functional tests to py3.8
Master has dropped py3.6 support so upper-constraints
requirements are not installable with python3.6
and due to this fips jobs which are running on py3.6
are failing. Let's run the functional/fullstack tests
with python3.8 on CentOS 8-Stream itself.

Also disable dbcounter installation as it's not
installing on python3.6.
The hacks can be cleaned up when these jobs are
switched to CentOS 9-Stream, currently have some
issues as mentioned in the Related Bug.

Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/843989
Related-Bug: #1976323
Change-Id: I757dbf929cb1dc27027614bbb2147a61606f85a9
2022-05-31 06:03:49 +00:00
3d54f965a9 Skip non-functional jobs on functional roles/playbooks changes
Since these jobs do not use roles and playbooks for
configuring functional jobs let's add these
to irrelevant-files.

Needed By:- https://review.opendev.org/c/openstack/neutron/+/843252.

Change-Id: I79dcf96a2b0fdaeeb2e81501f2a546e5fadffa35
2022-05-31 11:32:39 +05:30
Zuul
5aa5aca718 Merge "Update ci jobs docs" 2022-05-30 17:44:20 +00:00
Zuul
212cf08376 Merge "Use new combined neutron_tempest_plugin as nftables jobs parent" 2022-05-30 17:44:15 +00:00
Zuul
9d5673cb25 Merge "Address small nitpick from patch 840146" 2022-05-30 07:54:12 +00:00
Zuul
663cdd7428 Merge "[sqlalchemy-20] Add missing DB contexts in L3 methods" 2022-05-30 07:54:07 +00:00
Oleg Bondarev
763d8af1a3 Add some logging to test_good_address_allocation
Let's see how many times the test asks for IP addr list
during 10 sec timeout pediod. Probably sporadic failures
are caused by waiting for GIL for too long.

Related-Bug: #1966035
Change-Id: I41679cd7e39b0f7d64f99f509605ac9bc760ac5d
2022-05-30 10:51:31 +04:00
Zuul
1c3d433184 Merge "Revert "Use Port_Binding up column to set Neutron port status"" 2022-05-29 12:22:00 +00:00
Miro Tomaska
0fba55cc26 Address small nitpick from patch 840146
Very minor changes to address nitpick from patch 840146

Change-Id: I582b94f3da4cb51364f122510371b2a792f8ec3e
2022-05-27 21:44:42 -05:00
Zuul
91b33856e7 Merge "Remove requirements.txt from irrelevant files in CI jobs" 2022-05-27 18:32:40 +00:00
Slawek Kaplonski
4fe128d7e3 Update ci jobs docs
Patch [1] dropped neutron-tempest-plugin-api job and combined it with
the scenario jobs.
This patch updates documentation accordingly.

[1] https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/836912

Change-Id: I96af21382d04aa8bff63885c891992555e82c0ba
2022-05-27 15:59:25 +02:00
Slawek Kaplonski
f2445b09ae Use new combined neutron_tempest_plugin as nftables jobs parent
Patch [1] removed neutron-tempest-plugin-api job and combined it with
the "-scenario" jobs. It also changed names of those jobs by dropping
"scenario" word from it.
This patch updates accordingly nftables based jobs which are defined in
the neutron repo.

[1] https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/836912

Change-Id: Ibad1ee5d0f61d112bae435b6e0cf4d815d705f4e
2022-05-27 15:57:36 +02:00
Zuul
71b138e3e8 Merge "Bump neutron-lib to 2.21.0" 2022-05-27 12:12:08 +00:00
Zuul
2a944c8f6a Merge "Refactor the OVN revision module to access the DB correctly" 2022-05-27 12:12:03 +00:00
Zuul
1d459ac673 Merge "[OVN][FT] Wait until virtual parents are written" 2022-05-27 11:20:47 +00:00
Zuul
aefcaf4944 Merge "Revert "doc: Remove fwaas references from docs"" 2022-05-27 11:20:30 +00:00
Zuul
4b9b3cfb51 Merge "Remove session active check in "_add_segment_host_mapping_for_segment"" 2022-05-27 11:20:25 +00:00
Slawek Kaplonski
35fd49c014 Remove requirements.txt from irrelevant files in CI jobs
Changes in requirements.txt file should trigger all our CI jobs
to make sure that new requirements aren't breaking anything for sure.

This patch also removes test-requirements.txt from the irrelevant files
of the functional and fullstack jobs as those jobs are using
test-requirements.txt too so changes in that file should trigger those
jobs as well.

Change-Id: I150e80f1fac9c570bed39b2709635b73c57077e0
2022-05-27 12:07:58 +02:00
Zuul
a6e7743838 Merge "[UT][ovn] Access config options after they are registered" 2022-05-27 10:07:22 +00:00
Zuul
2b77f12d2a Merge "Create an index for "ports.network_id"" 2022-05-27 07:59:46 +00:00
Zuul
b9a496ecb9 Merge "[L3-HA] Disable automatic link-local address assignment for HA routers" 2022-05-26 20:57:16 +00:00
Zuul
7a92c3f060 Merge "[OVN] During the DB migration, allow the DB context to finish" 2022-05-26 16:09:59 +00:00
Zuul
bedd0504ec Merge "[sqlalchemy-20] Add DB context in L2pop module" 2022-05-26 15:42:57 +00:00
384ff4485f [UT][ovn] Access config options after they are registered
It is a follow up of [1]. There were still some tests
which were accessing config optons before they were registered
and failing when tested manually just those tests, this
patch fixes it.

[1] https://review.opendev.org/c/openstack/neutron/+/842068

Related-Bug: #1968606
Change-Id: I9aec0ba1f5c723e6f5a9146e9af41707e8014db2
2022-05-26 19:57:34 +05:30
Zuul
7fc509aa9a Merge "[ovn]Refusing to bind port to dead agent" 2022-05-26 14:14:31 +00:00
Zuul
8dbc594c06 Merge "Log when a segment is mapped/unmapped to a host" 2022-05-26 12:35:53 +00:00
Zuul
49aeff4c95 Merge "Partially revert "Do not link up HA router gateway in backup node"" 2022-05-26 12:35:48 +00:00
Zuul
a33bb9fb91 Merge "Notify mech drivers with original and modified network." 2022-05-26 12:35:40 +00:00
e6d27be474 Revert "Use Port_Binding up column to set Neutron port status"
This reverts commit 37d4195b516f12b683b774f0561561b172dd15c6.
Conflicts:
 	neutron/common/ovn/constants.py
 	neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py

Also revert below 2 commits which were added on
top of the parent commit:-

Revert "Ensure subports transition to DOWN"
This reverts commit 5e036a6b281e4331f396473e299b26b2537d5322.

Revert "Ensure only the right events are processed"
This reverts commit 553f462656c2b7ee1e9be6b1e4e7c446c12cc9aa.

Reason for revert: These patches have caused couple of issues[1][2][3].
[1][2] are same issue just one is seen in c8/c9-stream and other in
rhel8 and both contains much info about the issue.
[3] is currently happening only in rhel8/rhel9 as this issue is visible
only with the patch in revert and ovn-2021>=21.12.0-55(fix of [4]) which
is not yet available in c8/c9-stream.

[1][2] happens randomly as the patch under revert has moved the
events to SB DB which made a known OVN issue[5] occur more often as in
that issue SB DB Event queue floods with too many events of
PortBindingChassisEvent making other events like PortBindingUpdateUpEvent
to wait much longer and hence triggering VirtualInterfaceCreateException.

NB DB Event queue is different and hence with revert we are trying to
lower the side effect of the OVN issue[5].

This patch can be re reverted once [3] and [5] are fixed.

[1] https://bugs.launchpad.net/tripleo/+bug/1964940/
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2081631
[3] https://bugzilla.redhat.com/show_bug.cgi?id=2090604
[4] https://bugzilla.redhat.com/show_bug.cgi?id=2037433
[5] https://bugzilla.redhat.com/show_bug.cgi?id=1974898

Closes-Bug: #1964940
Closes-Bug: rhbz#2081631
Closes-Bug: rhbz#2090604
Related-Bug: rhbz#2037433
Related-Bug: rhbz#1974898
Change-Id: I159460be27f2c5f105be4b2865ef84aeb9a00094
2022-05-26 17:41:23 +05:30
Rodolfo Alonso Hernandez
d89d7bd5e6 Remove session active check in "_add_segment_host_mapping_for_segment"
Method ``_add_segment_host_mapping_for_segment`` is called by the event
(resources.SEGMENT, events.PRECOMMIT_CREATE), from
``SegmentDbMixin._create_segment_db``, and is called inside a database
writer context. That means it is irrelevant to check if the session is
active (must be always).

Closes-Bug: #1975542
Change-Id: Ib19dacf886486876237ed1157fb95ae157ed430e
2022-05-26 07:12:31 +00:00
Lucas Alvares Gomes
e73a85f3dd [OVN] Add baremetal support without Neutron DHCP agent for IPv4
This patch adds support for deploying baremetal nodes with OVN's
built-in DHCP server for IPv4.

Since Neutron API's for setting DHCP options is mostly a pass-thru,
Ironic uses a dnsmasq syntax for setting the baremetal options [0].
Since this syntax is unlikely to change and it's only a tiny subset of
what dnsmasq can offer this patch does translate that syntax used by
Ironic and convert it to OVN's equivalent options. In this way we do not
need to re-design Neutron's DHCP options API nor change Ironic to use it
with ML2/OVN.

This option also adds a new configuration option called
"disable_ovn_dhcp_for_baremetal_ports". PXE booting nodes can be very
sensitive and operators may prefer to use a fully-fledged DHCP server to
do it (even Ironic makes DHCP pluggable). So if operators wish to
disable OVN's built-in DHCP server for baremetal provisioning they can
do so by setting this new option to True. It defaults to False.

This change has been tested with real hardware and it does work. That
said, we found a problem in core OVN itself [1] while testing it that
can affect PXE from reaching the TFTP server, we already communicated
this with the core OVN folks and we hope it can be fixed soon. The
change in core OVN should not affect the Neutron change tho.

Not that the "server-ip-address" DHCP Option now points to the
"next_server" option in OVN instead of the "tftp_server_address". The
previous behavior was wrong, the "server-ip-address" should set the
"siaddr" in the DHCP header and this has been introduced in OVN [2] as
an option called "next_server".

[0]
49113385e8/ironic/common/pxe_utils.py (L523-L538)
[1]
https://mail.openvswitch.org/pipermail/ovs-discuss/2022-May/051821.html
[2]
https://patchwork.ozlabs.org/project/ovn/patch/20220511142757.168196-1-lmartins@redhat.com/

Partial-Bug: #1971431
Change-Id: Ia041f640293ba26abf9f70af915817e9861e8ffc
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2022-05-25 10:14:46 +01:00
e04bd8fbdf Switch to cirros uec image in multinode jobs
Kernel panic is seen in these jobs as well,
let's switch to cirros uec image to avoid it.

singlenode jobs already switched with
https://review.opendev.org/q/Ic57f828c08f1793226759baedb3eb2f646191e1f.

Change-Id: I34f3bbf7d30ddce23758ffb513abff0500b1fad6
2022-05-25 11:57:58 +05:30