The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Also enabled the hacking check that should have caught this, it
was missing from tox.ini along with most of the other in-tree
hacking checks we have added over the years.
Change-Id: Id91175d0db8b8edc72f0dd98925ddbf7415bb881
We have a hacking check to make sure assertTrue is used instead of
assertEqual(True, something). The regex used for that likely needs to be
fixed as it's overly complex for what it is trying to match.
We are seeing pep8 failures flagging an instance of assertEqual that is
comparing a tuple that happens to contain True as one of its values. As
an easier path to get around this failure until someone can reevaluate
the hacking check regex, this just reformats the test code so that it no
longer gets matched by the existing regex.
Change-Id: If2d2554f3509d3da7a6b625fd900d2090a3fe0f2
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
neutron-fullstack-with-uwsgi and neutron-functional-with-uwsgi
jobs are run in devstack gate[1] also. On devstack side these jobs
are broken when migrated to zuulv3 and start using neutron defined
tox env. neutron gate is no issue as job find the tox env in neutron's
tox.ini but devstack does not.
We need to define the working dir to neutron so that any where
they are run they always look for the neutron's tox.ini for used
tox env.
Failure: https://review.opendev.org/#/c/577779/
[1] c3b58f5335/.zuul.yaml (L717)
Change-Id: I0cadebb45864a83dfba7b54c9f161d11611164db
What the first line of the commit says :-)
Change-Id: Ib29e2fefe74932d9cdae2bc509b135071863bfea
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Port_Groups table has been introduced in OVN 2.10 and we've moved in
master to newer version since. This patch removes all references to code
branching between port_groups and address_sets, and also removes
unneeded Address_Set commands and references.
Change-Id: I592d31db9be76d9be202d79d942e15b1668e3c0e
If new segment is created/old deleted we should update its
localnet port in related Logical_Switch.
Added also missing code to sync tool in order to delete provnet
ports in case of leftovers.
Change-Id: I6b864ba1c168643640a64bd7c25e1d0fc0ea348a
Related-Bug: 1865889
This is a follow up from commit 102c442bcfa39074787e3292818880ecf238ac61
The call to resources_rpc.ResourcesPushRpcApi() will fail in situations
where RPC is not available. That is the case for neutron_ovn_db_sync_util.
The changes here will only set push_api if any of the configured service
plugins need it. This is a behavior similar to what is done for the QOS
plugin.
Related-Bug: #1877447
Change-Id: I3f2e18fabf4556cd708c6e544b5aaf37f72b44df
There were a couple of versions of oslo.log that were
not backwards-compatible. Now that a fixed version was
released, bump lower-constraints to require it and
remove the temporary workaround.
Change-Id: If38105ceaa48a0520ae8243982b736d0bc99ec3a
Related-bug: #1871840
Limit "ml2_vlan_allocations.vlan_id" values stored in the DB by
adding a check constraint in the DB engine. This check will
verify that vlan_id is in the interval [1, 4094].
Change-Id: Ie6453cb7a2ef0c43baf540c49a03079f4c8d3818
Closes-Bug: #1870400
If either ``notify_nova_on_port_status_changes`` or
``notify_nova_on_port_data_changes`` is set in the neutron
configuration provided to the ``neutron-ovn-db-sync-util`` tool it
will stop with a Traceback.
We are already overriding other parts of the ML2 Notification code
as we do not want it executing while syncing, so let's override
these configuration options if set as well.
Change-Id: I62765a14d376664ccc2ca3009bb9e970c9f25c03
Closes-Bug: #1882020
In case when value of port['device'] don't starts with "tap_",
in comments to the conntrack or stateless rules in the iptables there
should be full port['device'] written. It will make things easier to
debug for the operators e.g. when using iptables_hybrid driver.
Change-Id: I427321fbb87865931b2b28abf7687d37e8d01a53
Closes-bug: #1880691
Because of broken check why one port has similar address to the other
one, the first one by mistake could be set as virtual.
Example:
port_1: 10.11.1.100
port_2: 10.11.1.10
On create of port_2 it is set as 'virtual', but shouldn't.
This patch fixes that bug by using common function
utils.get_ovn_port_addresses().
Change-Id: Ia4b986146c77edf0616015380359e37233df80fc
Closes-Bug: #1881759
"NeutronOvsdbIdl" should be a singleton class; only one instance
should be shared everywhere is called. Currently the connection
and the "OvsIdlMonitor" instances are global; those instances are
used to declare the "NeutronOvsdbIdl" instance.
As commented in the related bug, this singleton will ensure that
the OvsIdl indexes are created just once.
Change-Id: I639cf673a983b7b1be810495d8a8c2d89919a9b6
Related-Bug: #1881424
Some of the tools dependencies expect the AGENT group to be
present in the configuration, and at present it is not initialized,
this patch addresses that.
Change-Id: I1a50e77749aaecc3966c9d238f91a1968ed454ef
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
Closes-Bug: #1881771
Versions of oslo.log >= 4.1.2 require a second argument when
initializing the OSJournalHandler class. While I've started
a review to fix that regression [0], bump oslo.log to a later
version that requires this new flag and pass it to fix the
gate.
Also had to blacklist the OVN tempest IPv6 hotplug test
since it is failing too much to pass the check jobs.
[0] https://review.opendev.org/732457
Change-Id: Ic9bbb43aa832ad6cc45d57328b40afe4468ddfca
Related-bug: #1871840
Related-bug: #1881558
Updates to tools/migrate_names.txt to correctly represent
mapping between neutron and networking-ovn.
networking_ovn/common/ovn_client.py neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py
networking_ovn/common/acl.py neutron/common/ovn/acl.py
doc/source/contributor/design doc/source/contributor/internals/ovn
Change-Id: Ib8973ee96431815377a36f85e2bef0ef87e96ca1
Migration ansible playbooks are not able to connect to overcloud
nodes using ssh due to bad settings in the generated ansible
inventory file. Ctlplane subnet ip addresses should be used by
ansible in order to be able to establish connection successfully.
Closes-bug: #1881029
Change-Id: I1588b88279ba1e25706cc74f4a888901e5aadcb6
The test_port_security_macspoofing_port should be blacklisted
back, because of the change [1] that switched OVN_BRANCH/OVS_BRANCH
configuration to the latest stable releases and the
fix [2] that solved [3] is not yet present in latest release.
In addition. We will have discussion during next PTG around if we
should/could run only jobs with OVN release or we can enable also
master jobs. Then we need to explicitely define from which branch
given job runs to prevent such situations like this one in future.
[1] https://review.opendev.org/#/c/726168/
[2] https://patchwork.ozlabs.org/project/openvswitch/patch/20200319122641.473776-1-numans@ovn.org/
[3] https://bugs.launchpad.net/tempest/+bug/1728886
Related-Bug: #1728886
Change-Id: Ic8952e9ffb031ff4becb6ee2f6f5325a55e19dfe
Recent changes in some versions of iproute2 CLI output (v4.18),
have invalidated the regular expression used to parse the
"ip link" output.
To solve this problem and avoid future ones, pyroute2 is used to
retrieve the virtual functions information and set the VF attributes
(spoofcheck, min_tx_rate, max_tx_rate and link_state).
pyroute2 extended the "ip link" support to retrieve this information,
adding "ext_mask=1" in the get command. If no virtual functions are
present in this particular network interface, the added method,
"get_link_vfs", will return an empty list.
The set commands can return a "InterfaceOperationNotSupported" in
case the operation is not supported. For min_tx_rate, if the driver
does not support to set a minimum bandwidth, an "InvalidArgument"
(from a pyroute2.NetlinkError(22)) exception will be raised.
Change-Id: I680da4f64bd114f1caecaaeedbf8a4b1915a0849
Closes-Bug: #1878042
These translation sections are not needed anymore, Babel can
generate translation files without them.
Change-Id: I102c9ad3804705659d54c537681b525e1f8cc05d