26231 Commits

Author SHA1 Message Date
Rodolfo Alonso Hernandez
4dbcd76517 Fix "ip route" commands to work with pyroute2 APIv2
Fixed "ip route" commands to work with pyroute2 >= 0.6.10, that
introduces APIv2 for link, neighbour and route [1].

[1]bc0f5e2209

Closes-Bug: #1979031
Change-Id: Id2239b6827485a4d466b0916947428ceabef9139
2022-06-17 08:39:44 +00:00
Zuul
0e40dfe862 Merge "Support pps limitation for openvswitch agent" 2022-06-14 16:58:27 +00:00
Zuul
d76eab3122 Merge "Meter flows and ovsdb action for ovs bridge" 2022-06-14 16:58:22 +00:00
Zuul
beef31d423 Merge "migration: Remove restarting OVS" 2022-06-14 16:49:58 +00:00
Zuul
74a8e9fa78 Merge "Move `PortBindingChassisEvent checks to match_fn`" 2022-06-14 16:49:52 +00:00
Zuul
b7477be3df Merge "Fix tests involving pyroute2.netlink module" 2022-06-14 16:49:16 +00:00
Zuul
db93cc5555 Merge "Use SQL IN clause instead of OR with exact match comparisons" 2022-06-14 16:49:11 +00:00
Zuul
fab415cfe2 Merge "Return default value when get router's enable_ndp_proxy from request_body" 2022-06-14 15:03:01 +00:00
Dr. Jens Harbott
d01700034a Fix tests involving pyroute2.netlink module
pyroute2 0.6.11 did some further refactoring of their module imports,
so using pyroute2.netlink.some_func() doesn't work anymore. Since we
do "from pyroute2 import netlink" anyway, use the imported module
everywhere.

Also, mock.patch()ing pyroute2.netlink.rtnl.tcmsg.common.tick_in_usec
doesn't work anymore, but also doesn't seem to be necessary for the
tests to succeed, so just drop it.

Closes-Bug: 1978564
Change-Id: Ie06b987f7efbff8057293893e42bee7b682b9ba1
2022-06-14 11:47:56 +00:00
Zuul
2c4b1c970c Merge "[UT] Reduce the port binding retries to 1 in `TestPortsV2`" 2022-06-14 08:30:43 +00:00
yangjianfeng
81a330113b Return default value when get router's enable_ndp_proxy from request_body
In some cases, the creation of router was called by `l3 plugin`
directly, didn't call API. In this way, the router's request_body
of the `ndp_proxy` service plugin received has no `enable_ndp_proxy`,
this will result in `ndp_proxy` service plugin raise error.

Closes-Bug: #1978519
Related-Bug: #1877301
Change-Id: I413c33970002532d11de5bc2afb145704a8488a9
2022-06-14 12:05:44 +08:00
Zuul
3447e0ee6f Merge "Optimize queries for port operations" 2022-06-14 01:07:35 +00:00
Jakub Libosvar
fd6adb3e5b migration: Remove restarting OVS
There was a code that worked around a bug in openvswitch. The bug was
fixed in openvswitch 2.13 and we no longer use that version. It's safe
to be removed now.

Change-Id: I8d0e1dac4f6a6d201e29863cc76db3f1ff8595ae
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2022-06-13 16:14:51 -04:00
Fernando Royo
c25097b0b0 Optimize queries for port operations
Port create/update are most time-consuming operations
on subnet creation. As example, in those cases where
several subnets are created over the same network the
response time for those port operations is linearly
increased as the total subnets increases.

This patch improves the number of queries required on port
operations in order to reduce the response time.

Closes-Bug: #1977831
Change-Id: I0fccf36a2035e8f6c2fa8dab0307358da600c8f7
2022-06-13 10:30:11 +02:00
Rodolfo Alonso Hernandez
5cc7175659 [UT] Reduce the port binding retries to 1 in `TestPortsV2`
In ``TestPortsV2`` tests, set the
``neutron.plugins.ml2.plugin.MAX_BIND_TRIES`` to 1 to minimize the
number of retries during a failed port binding. That shortens all
test cases execution time if a port binding is executed.

Trivial-Fix

Change-Id: If0473031797984aab5b36c479fcb774e57ff5624
2022-06-13 08:21:09 +00:00
Rodolfo Alonso Hernandez
a1d135e3c0 Use SQL IN clause instead of OR with exact match comparisons
SQL IN clause is faster than several exact match comparisons
in an OR clause.

Trivial-Fix

Change-Id: I0d1bc49927b061a91ff6d4ca3f5b826d529d0770
2022-06-13 06:35:25 +00:00
chenwei
3e1223f5ca Change vlan max value in intro-basic-networking.rst
Cloesed bug: #1978389

Change-Id: I23d2ec86bb719c89886c24186745f04c17d8964c
2022-06-13 07:45:04 +08:00
Zuul
275b458f14 Merge "openflow_processed_per_port should be ovs-agent only" 2022-06-10 18:55:05 +00:00
Zuul
357e345fe4 Merge "[OVN] Make binding profile validation more robust" 2022-06-10 18:55:00 +00:00
Zuul
e8125f002b Merge "Set "type=virtual" for OVN LSP with parent ports" 2022-06-10 18:54:56 +00:00
Zuul
370c6ddc95 Merge "remove unused updated_at parameter for AgentCache.update" 2022-06-10 18:54:35 +00:00
Zuul
a3d3622e07 Merge "[ovn]neutron agent show real heartbeat_timestamp" 2022-06-10 16:13:02 +00:00
Zuul
38cdfb8855 Merge ""_handle_lb_fip_cmds" to handle the LB members correctly" 2022-06-09 17:13:04 +00:00
Zuul
d77a969d3e Merge "Remove unused get_log_args" 2022-06-09 17:12:59 +00:00
Zuul
3733520df6 Merge "[sqlalchemy-20] Use session.transaction information to decide if active" 2022-06-09 15:29:12 +00:00
zhouhenglc
411ecc4865 [ovn]neutron agent show real heartbeat_timestamp
agent's heartbeat_timestamp returns the current time, not
conducive to agent status troubleshooting.
this patch use agent's updated_at as heartbeat_timestamp.

Closes-bug: #1977629

Change-Id: Idf522a20f9735829ee568020bfed46345a95e294
2022-06-09 18:34:09 +08:00
Zuul
e95174cfe6 Merge "Fix tests involving pyroute2.netns module" 2022-06-09 10:07:03 +00:00
Zuul
575766df1f Merge "Switch tick-tick job to upgrade from xena" 2022-06-09 09:38:29 +00:00
Zuul
4f7b138fae Merge "Add "max-rate" value to minimum bandwidth rules" 2022-06-09 09:38:23 +00:00
zhouhenglc
7dbc61346a remove unused updated_at parameter for AgentCache.update
we cannot find this parameter passed in anywhere except for some unit
tests. currently we have used nb_cfg_timestamp[1] as agent updated
time. there are no other scenarios for this parameter. this patch
remove it and update some unit test.

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

Closes-bug: #1978035

Change-Id: Ic964b7ddc70988bb1a822b07be6a1be4d197287e
2022-06-09 06:03:13 +00:00
Dr. Jens Harbott
fe4fa55642 Fix tests involving pyroute2.netns module
pyroute2 0.6.11 did some further refactoring of their module imports,
adapt some mocks to that the tests work with both the older and the new
versions.

Change-Id: I00c1b1e81c33cf93372dec21f4a9f409d784a160
2022-06-08 22:07:02 +02:00
Takashi Kajinami
edcb83f296 Remove unused get_log_args
This method has been unused since [1] was merged.

[1] 3b22541a2aa9a5b06e2bff256701dbe24554c17c

Change-Id: I6765c1277341d7ec19fd6eae398fdd4ef9ef66e0
2022-06-08 14:59:38 +00:00
Zuul
e44dbe98e8 Merge "Defer flow deletion in openvswitch firewall" 2022-06-08 09:31:34 +00:00
Rodolfo Alonso Hernandez
6b529ea3c5 [sqlalchemy-20] Use session.transaction information to decide if active
The "session.transaction" member "_connections" is a dictionary with the
active database connections of the current transaction. Neutron will use
it to determine if the session is active or not. This parameter will
provide more accurate information than "new", "dirty" or "deleted". A
read (SELECT) operation won't be included on those lists while the
transaction is currently active.

Closes-Bug: #1975542
Change-Id: Ibb75b324950c639d30c77d4e5269a8c53d6a0bb5
2022-06-08 08:21:34 +00:00
Zuul
db9300ed11 Merge "migration: Fail task if executed script failed" 2022-06-08 00:03:27 +00:00
Rodolfo Alonso Hernandez
a575dbc4a1 Add "max-rate" value to minimum bandwidth rules
OVS translates the QoS and associated queue registers,
attached to a port, into "tc" linux-htb classfull traffic
shaper, applied on the port.

OVS creates a "tc" root class on the port device. On top of
this root class, the queues are represented as child "tc"
classes. In order to define a "min-rate" value ("tc rate"),
a "max-rate" value ("tc ceil") must be provided and higher than
"min-rate".

By default, OVS agent QoS minimum rules do not have a "max-rate"
defined. Before this patch, any minimum bandwidth rule was
limiting the maximum rate to 100Mbit/s, that is the default value
set in "tc ceil". This patch provides the maximum "max-rate" value
for any minimum bandwidth rule.

Closes-Bug: #1977752

Change-Id: I2c6f09548f39cadfe85e57032091a70a5bc978e5
2022-06-07 13:20:11 +00:00
Zuul
69b98d011a Merge "migration: Delete also SGRs for IPv6" 2022-06-07 11:17:16 +00:00
Zuul
c2c69e2ce0 Merge "Skip "PortBindingChassisEvent" if revision number changes" 2022-06-06 23:37:27 +00:00
Zuul
9026dfd130 Merge "Documentation about transaction contexts" 2022-06-06 22:12:34 +00:00
29b246010e Switch tick-tick job to upgrade from xena
Since master is zed, move tick-tick job to
upgrade from xena by skipping yoga.

This also fixes ovn-grenade-multinode-tick-tick
job.

Depends-On: https://review.opendev.org/c/openstack/devstack/+/844477
Change-Id: Iaebb1da6ce071a705e9dd25f2fc90a5163f7c363
2022-06-06 19:06:51 +05:30
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
Frode Nordahl
8a9ffcb0d4
[OVN] Make binding profile validation more robust
The main purpose of Neutron's validation of the binding profile
is to make sure expected keys are present and that their values
are of the expected type.

The Nova compute component updates the binding profile as part of
instance creation.  Depending on the version of the Nova compute
component and which hardware it interfaces with, the information
provided by Nova in the binding profile may differ.

Nova also has limited information at its disposal at the point in
time it updates the port binding profile, so it would be
non-trivial for it to provide information conditionally based on
things like VNIC_TYPE and existing binding profile data.

Make the Neutron binding profile validation more robust for both
upgrade and heterogeneous hardware scenarios by accepting the
presence of surplus keys in the binding profile.  The data that
Neutron expects will still be validated and any surplus keys will
be pruned before further processing internally in Neutron.

Closes-Bug: #1975743
Change-Id: I3a91f442a1fd72f9027f10f2b1b6572cee3f8360
2022-06-02 12:15:39 +02:00
Zuul
f186f1b6c0 Merge "Create an index for subnetpools.address_scope_id" 2022-06-02 08:32:56 +00:00
LIU Yulong
62d3f91f92 openflow_processed_per_port should be ovs-agent only
"conf/agent/ovs_conf.py" has some common options for ovs agent and
L3/dhcp/metadata agent [1] to handle records on ovsdb, mostly for ovsdb
related action only when the interface driver is 'openvswitch' [2][3].
The options of "conf/plugins/ml2/drivers/ovs_conf.py" are mainly
for ovs-agent. The "openflow_processed_per_port" is in
wrong place, because L3/DHCP/metadata agent will never try to
"install flows per port".

The option ``openflow_processed_per_port`` is still in [OVS] section
for openvswitch agent.

[1] https://github.com/openstack/neutron/blob/master/neutron/opts.py#L209
[2] https://codesearch.openstack.org/?q=from%20neutron.conf.agent%20import%20ovs_conf&i=nope&literal=nope&files=&excludeFiles=&repos=
[3] https://codesearch.openstack.org/?q=ovs_conf.register_ovs_agent_opts&i=nope&literal=nope&files=&excludeFiles=&repos=

Change-Id: I43756c81ba3eede2ff8b1f4c6ead4c9426d78f90
2022-06-02 02:41:13 +00:00
Jakub Libosvar
d93cd7d0c0 migration: Delete also SGRs for IPv6
IPv4 and IPv6 have different utility in iptables. This patch adds use of
ip6tables the same way as previously used iptables.

Change-Id: I1e8ef2749ac5705563e539a5e9f02c63347b5dbe
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2022-06-01 17:22:33 -04: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