https://review.opendev.org/705154 introduced NEUTRON_PATH but let it
empty by default, this patch adds default value to NEUTRON_PATH.
Partial-Bug: #1861469
Change-Id: Id5aab7f14e23ae8d7d1fc7ac4d23c67964bdb674
Commit 00a74d1137abe78a0f34a73144ee7e2ccc486a32 change the OVS
package compile from source, this makes some neutron staduim
projects func gate has no permission accessing the "ovs" dir.
This patch adds a BUILD_OVS_FROM_SOURCE environment variables,
let it can be override by gate_hook.
Change-Id: Ib33fffbaaea6abfbd9719e0712918d4ae65b3ee2
Partial-Bug: #1861469
In an effort to help on migrating changes from neutron to networking-ovn,
these 3 scripts are being introduced under tools.
Also adding documentation about these under OVN folder.
1) files_in_patch.py
Use this to show files that are changed in a patch file.
$ # Make a patch to use as example
$ git show > /tmp/commit.patch
$ ./tools/files_in_patch.py /tmp/commit.patch | grep .py
tools/download_gerrit_change.py
tools/files_in_patch.py
tools/migrate_names.py
2) download_gerrit_change.py
Given a gerrit change id, it will fetch the latest patchset of the change
from review.opendev.org as a patch file.
$ ./tools/download_gerrit_change.py --help
Usage: download_gerrit_change.py [OPTIONS] GERRIT_CHANGE
Options:
-o, --output_patch TEXT Output patch file [default: stdout]
-g, --gerrit_url TEXT The url to Gerrit server [default:
https://review.opendev.org/]
-t, --timeout INTEGER Timeout, in seconds [default: 10]
--help Show this message and exit.
$ ./tools/download_gerrit_change.py 698863 -o /tmp/change.patch
$ ./tools/files_in_patch.py /tmp/change.patch
networking_ovn/ml2/mech_driver.py
networking_ovn/ml2/trunk_driver.py
networking_ovn/tests/unit/ml2/test_mech_driver.py
networking_ovn/tests/unit/ml2/test_trunk_driver.py
3) migrate_names.py
Use this tool to modify the name of the files in a patchfile so it can
be converted to/from the legacy networking-ovn and neutron repositories.
$ ./tools/migrate_names.py --help
Usage: migrate_names.py [OPTIONS]
Options:
-i, --input_patch TEXT input_patch patch file or gerrit change
-o, --output_patch TEXT Output patch file. Default: stdout
-m, --mapfile PATH Data file that specifies mapping to be applied to
input [default: /home/user/openstack/neutron.git
/tools/migrate_names.txt]
--reverse / --no-reverse Map filenames from networking-ovn to Neutron repo
--help Show this message and exit.
$ ./tools/migrate_names.py -i 701646 > /tmp/ovn_change.patch
$ ./tools/migrate_names.py -o /tmp/reverse.patch -i /tmp/ovn_change.patch --reverse
$ diff /tmp/reverse.patch /tmp/ovn_change.patch | grep .py
< --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py
< +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py
> --- a/networking_ovn/ml2/mech_driver.py
> +++ b/networking_ovn/ml2/mech_driver.py
<... snip ...>
$ ./tools/files_in_patch.py /tmp/ovn_change.patch
networking_ovn/ml2/mech_driver.py
networking_ovn/ml2/trunk_driver.py
networking_ovn/tests/unit/ml2/test_mech_driver.py
networking_ovn/tests/unit/ml2/test_trunk_driver.py
Change-Id: I17904c996e1357f7292d25aab4d448edb052f44c
Related-Blueprint: neutron-ovn-merge
This patch is changing the tools/configure_for_func_testing.sh script to
install OVN when setting up the environment for functional tests.
The "ovn" driver in master needs the latest released version of OVN
(2.12), unfortunately this version is not yet present in the ubuntu
repository so we need to compile it from source.
Partially-Implements: blueprint neutron-ovn-merge
Change-Id: I181da9981ec95da8cef36ba2bb667b5a4ec9db22
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
In comments given automatically by abandon_old_reviews.sh script
there was still Jenkins mentioned as CI tool.
We are using Zuul for very long time and "zuul" user is voting
now instead of "jenkins" so this patch updates those commit
messages to make this messages correct.
TrivialFix
Change-Id: Iad119108ea82b47ac2a66b9f6f8a8bb56b57e7b6
Set a big timeout for rootwrap daemon in functional and fullstack
tests. The value defined in 7800, the same as the Zuul jobs
timeout.
This timeout increase will prevent the daemon to close when
executing a test root command, as described in the bug. An
unexpected rootwrap daemon closure is not considered as a normal
event during the test execution.
The default value set in the configuration file is 600 seconds, the
same as daemon default value. This timeout is increased only when
OS_SUDO_TESTING=1, that means functional and fullstack tests, when
using the script "tools/deploy_rootwrap.sh".
Change-Id: I691300a4e9a7cccd8887bc8f95ba9cea32988bac
Closes-Bug: #1850558
Since it's no longer supported past Train, lets stop
running the tests.
Updated docs and made some pep8 code tweaks as well.
Change-Id: I1c171ab906a3b4c66558163ad26947ebf710a276
Remove an erroneous "source", we test for existing of a file, the source
is misplaced.
The source results in errors executing like:
/home/zuul/src/opendev.org/openstack/neutron/tools/configure_for_func_testing.sh: line 81: [: source: binary operator expected
Change-Id: Iea8121eb4b25e66e2527feb5bf3f8f351114c721
This patch includes a fix for "configure_for_func_testing.sh" script.
When the guidelines are followed from the following link:
https://docs.openstack.org/neutron/latest/contributor/testing/testing.
html
the test script displays the following error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
(using password: YES).
The fix for this is to include the saved password in order to access the
MySQL database.
Change-Id: I6ab5cb3ef1583258cebec9f8f5966eda250a6367
Bug-Link: https://bugs.launchpad.net/neutron/+bug/1836028
In a recent change [0] in devstack fixup_uca (Universal Cloud Archive)
was changed to fixup_ubuntu. This change follows this in
configure_for_func_testing.sh
[0]: https://review.opendev.org/619562
Change-Id: Ibf6a85d470f179ee996dcc4e6717d433dd860752
Related-Bug: #1792936
This commit introduces a framework for policy-in-code support
in the neutron stadium and converts the existing policy.json
in the neutron repository into the policy-in-code style.
NOTES:
1) This commit tries not to change the existing policy behavior
provided by the neutron repository even if there are some stale policies
or policies to be defined in a neutron-related project.
They should be clean up later in Stein release.
2) 'default' policy should be dropped from the default policies
as all default policies should be defined in the code (as many projects
which already completed policy-in-code do). However, dropping 'default'
policy potentially affects policy behavior in neutron-related projects,
so it needs to be visit carefully. Considering this, this commit decides
to keep the 'default' policy.
Partially Implements: blueprint neutron-policy-in-code
Change-Id: I6a61079da4d4f5080ee32d640144e6bdb14735fa
tools/generate_config_file_samples.sh contains 'set -x'
at the end of line but it is unnecessary.
It was pointed out in the policy-in-code review
and I borrowed a script from this.
Change-Id: I2a0fd6051702693db340904fbe738d44ca4f15c0
When fullstack tests are executed manually using a debugger
(e.g.: PyCharm integrated debugger), the "cmd" folder is imported
instead of "cmd" [1] module.
To solve this problem, this folder and the references to this path
must be changed.
[1] https://docs.python.org/3/library/cmd.html
Change-Id: I8e6b6995c10875a882a46ca3a0d779aafda124a3
Closes-Bug: #1805844
Before this patch script was looking for patches which have
-1 vote from "jenkins". This was given in the past by zuul v2.
Now we have zuul v3 and there is "verified" vote give by "zuul"
instead so script needs to be updated also.
Change-Id: Ieba7a6d1babee99b14af45836c788741d23bc560
This script can now check and abandon old patches only from
specified project.
Project must be one of Neutron deliverables.
Project can be passed to script with parameter:
"--project <project_name>"
If no project is specified it will get old patches from all projects
which are part of neutron stadium.
Change-Id: I83b9a556d551db9f78b3d628df8648309e1dda1d
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: If3383707c9baf69e03bcccc50970da748a834141
In case of HA routers IPv6 forwarding is not disabled by default and
then enabled only on master node.
Before this patch it was done in opposite way, so forwarding was
enabled by default and then disabled on backup nodes.
When forwarding was enabled/disabled for qg- port, MLDv2 packets are
sent and that might lead to temportary packets loss as packets to
FIP were sent to this backup node instead of master one.
Related-Bug: #1771841
Change-Id: Ia6b772e91c1f94612ca29d7082eca999372e60d6
tools/configure_for_func_testing.sh tries to load the
ip_conntrack_proto_sctp module unconditionally, even if
it doesn't exist. Detect and only load if necessary.
Trivialfix
Change-Id: Idff8c9402d8ffcb21ae4f561642f65aeebbe8067
The defaults in tools/configure_for_func_testing.sh don't
match what devstack uses, so running it while a stack is
running breaks all database access. Change to source
local.conf if it exists, else use the devstack defaults
to be less destructive.
Change-Id: I2d2a7ef034f670f3927ecc7b7706876872a01c77
Caller of configure_func_for_testing.sh script is able to override default
password for rabbit service. This patch replaces RABBIT_HOST as a
password to RABBIT_PASSWORD env var.
TrivialFix
Change-Id: Ie9cafc1fb75209ae1cacc58f254c1da33521d6b5
The environments for functional and fullstack tests are prepared
differently than others and aren't using UCA. They should use the
ubuntu cloud archive, too.
Depends-On: Ie18833bfa30f1789e63cbe9c86f5ece3453f43fb
Change-Id: I75374fce0e01bac874107abea0b7389382588905
The plugin has been split into its own repository[1] in accordance with
Queens Goal "Split Tempest Plugins into Separate Repos/Projects[2]".
This patch removes the local copy as well as the setuptools entry point.
We can also now remove the autodoc_tree_excludes pbr option since
there's no more plugin to exclude and it defaults to [setup.py].
The patch leaves still in-tree base classes and constants in order to
avoid breakage of projects depending on such code. In the future, we
will deprecate those and gradually move affected subprojects to the new
repo.
List of affected repositories:
- neutron-vpnaas
- openstack-ansible-os_neutron
- tripleo-quickstart-extras
- networking-midonet
- networking-l2gw
- neutron-dynamic-routing
- networking-vsphere
- networking-plumgrid
- networking-zvm
[1] http://git.openstack.org/cgit/openstack/neutron-tempest-plugin
[2] https://governance.openstack.org/tc/goals/queens/split-tempest-plugins.html
Depends-On: I371aa4d5f043f695df04b98b0f485c8f0548f2b3
Change-Id: Ia21aad29d0bbf779583964db6f1665c9b3b83161
This script's permissions by default limits access to root, but
that is not consistent to other platforms. Tweaking the permissions
is the easiest/least impactful fix imaginable.
Change-Id: Icfad974cb0c9f896b05003ea0f89693528eaeb80
Ensure OpenSUSE is supported as a platform when installing
packages. Signal also that the configuration is completed
successfully. That's friendly when the script is invoked
manually.
Change-Id: Id9489ecbbacaf7b98a022e7fbdd9cddae3a4c398
Otherwise tests will use executables from global paths (f.e. /usr/bin/)
when those are available, which doesn't play well with a system that has
devstack installed.
Change-Id: I3213d5cb570b09d5049b7087cd710337e2698eb3
We plan to switch to devstack-gate for fullstack job, and it revokes
direct sudo calls before executing tests, so we can't rely on sudo
working anymore.
This also moves functional-testing.filters to a more generic filename
(testing.filters) because the filters are now deployed and used by
fullstack target too.
Related-Bug: #1557168
Related-Bug: #1693689
Change-Id: I1718ea51836adbb8ef8dea79822a722dcf111127
It turned out dhcp tests work only because agents are considered dead
after 10 seconds while they report to server every 60 seconds. This led
to calling network resync after agent revival and hiding the fact dhcp
agent is not capable of receiving any amqp messages.
This patch sets the report interval of agents to the half of
agent_down_time on server side and uses eventlet dhcp agent in order to
trigger eventlet monkey patching code.
Eventlet was behind the failure with messages not getting processed. As
[1] notes: "Note: If the “eventlet” executor is used, the threading and
time library need to be monkeypatched."
Because each port calls dhclient to obtain IP address and each dhclient
instance overwrites /etc/resolv.conf there was added a script that
generates fullstack-dhclient-script from an existing dhclient-script
before starting fulltstack tests. This generated script is passed to
each dhclient process running in fake fullstack machine using -sf
parameter.
[1] https://docs.openstack.org/developer/oslo.messaging/server.html
Related-bug: 1453350
Change-Id: I0336176b9c364fe3a95be5cef9e7a3af1ef9d7e9
Yaml.load() return Python object may be dangerous if you receive
a YAML document from an untrusted source such as the Internet.
The function yaml.safe_load() limits this ability to simple Python
objects like integers or lists.
Reference:
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html
Change-Id: I026355f3e71b7fd3aeee2fe5c7920a1c6306ab02
Three ((value++)) lines are generating this bashate warning:
E043: Arithmetic compound has inconsistent return semantics
This will now be an error when running pep8 checks.
Trivialfix
Change-Id: If7a63e550d5d27fe6716cc63c85426cd2250732f
Bashate is a style checker program for bash scripts. This addition
improves the quality of the current bash scripts and ensures that
any future change will follow the same standards.
Change-Id: Ia346f77632d4ac7beb288fa3aacea221d7969c87
Neutron API accepts also protocol numbers as protocols for security
groups. This patch makes support for it in OVS firewall driver. iptables
driver already supports it.
Fullstack test covering SCTP connection was added and it requires
ip_conntrack_proto_sctp kernel module in order to make conntrack work
with SCTP.
Change-Id: I6c5665a994c4a50ddbb95cd1360be0de0a6c7e40
Closes-bug: 1625516
This patch adds fullstack tests for DHCP agent HA functionallity.
There are two tests added:
* One is checking if network will be properly
rescheduled to new agent if existing DHCP agent will be down,
* Second is checking if network handled by 2 DHCP agents will have properly
working DHCP service even if one DHCP agent will be down
Change-Id: Iaad373cafd6f83f2c1f8e7ac58dc70070e7aabaf
After devstack change (see Depends-On below),
it isn't necessary anymore.
Depends-On: I3ff136fc8330c92007cdfe91b77d7f9865eabd8d
Change-Id: Iec6f1fb59bf1f656100947f50311afcee4636ca2
Also, set ENABLED_SERIVICES before sourcing devstack files
because they uses it. This is a preparation for an upcoming
change in devstack. [1]
[1] I3ff136fc8330c92007cdfe91b77d7f9865eabd8d
Change-Id: Ida1f83b6b3ef9b76be13c063c7e35a8703214078