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
Subprojects have had enough time to switch to neutron-lib for
the deprecated items from these modules.
Change-Id: Ib2f4acf7e0153667389c57a52f2db33a23758b24
Iptables functional tests fail on Xenial and other newer kernels if
br_netfilter kernel module is not loaded, in which case sysctl knobs to
enable bridge firewalling are not available, and attempt to set them
with _enable_netfilter_for_bridges fails.
We should load the kernel module before running those tests. Luckily,
devstack has a function for just that (plus more).
Change-Id: I602d8cd02c73b18e9d719b19998e36059ae28cd8
Depends-On: Id6bfd9595f0772a63d1096ef83ebbb6cd630fafd
Related-Bug: #1622914
The deprecation shim created by Doug turns out to be rather useful.
It emits a warning when an global (attribute of a module) is
referenced but that global has been moved to another module.
This update makes the following changes to the shim:
- Rename it to _MovedGlobals to better describe what it is a
debtcollector for.
- Use inspect to get the original reference and to check that
_MovedGlobals is called from the last line of a module.
- Save the old reference automatically in the instance to prevent it
from getting garbage collected.
- Beef up the _moved_global() method for moving/renaming individual
globals, allowing it to move and rename or rename in place.
Change-Id: I868aa4a3129dd05467a103364088efbb86bc5d0f
This tools list the constants and exceptions that have moved
to neutron-lib. Add it to pep8 to raise awareness of moved
globals.
Related Blueprint: neutron-lib
Change-Id: Ic6439f98d4bf8f566debf26eca3337f359119d5a