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
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
Recent changes to the gate base images [1] removed a package
neutron requires (netcat-openbsd). This patch installs the
required package.
[1] https://review.openstack.org/#/c/292573
Closes-bug: #1558397
Change-Id: I4041478ca09bd124827782774b8520908ef07be0
Now that gate does not rely on -constraints targets [1], we should be
safe to remove them.
[1] Iea3a0b1f740d5679ebfa135f2bf5b89c52008716
Change-Id: I59855f1b15d54323dcc7c4759904be7124a1df1a
This patch adds resources, fixtures and base test_connectivity tests
for host with linuxbridge agent.
Model of host with linuxbridge agent is made in separate namespace
named "host-XXX". It has got connectivity with rabbit via ovs port.
Same port is used also to provide connectivity with different "hosts"
Co-Authored-By: Mathieu Rohon <mathieu.rohon@gmail.com>
Change-Id: I6230d8d09f77bd20674bf6c3be69fbc1627d66f8
Closes-bug: #1518675
VPNaaS functional tests now use dsvm-functional instead of
*-constraints. Always assuming *-constraints breaks the functional
jobs which is not run in a constrainted environment yet.
Paritial-Bug: #1529027
Change-Id: I3a4f1d61d13f1e444f7624d68d121d04d81eb724
More detailed instructions for --autogenerate, including how to rely
less on devstack. Also some tweaks to scripts and requirements to
simplify the process.
Closes-Bug: #1197570
Change-Id: I97043b30a8df7408a73af38c6a015fc0dcf82571
Adds some utility methods and a couple of base test cases that
can be added to. These first tests exercise the ovs driver (dnsmasq)
and so the code is organised accordingly - OVS specific test cases
are defined in a DHCPAgentOVSTestFramework
Partial-Bug: #1469065
Co-Authored-By: Cedric Brandily <zzelle@gmail.com>
Co-Authored-By: Sergey Belous <sbelous@mirantis.com>
Change-Id: Ic9d5a2f2b8014e4d81f5e5f6fa58b119a86de075
Remove disable_service from configure_for_func_testing.
A recent Devstack patch (Linked in bug report) checks
that a disabled service is not enabled later. This breaks
the code this patch touches. I believe the DBs were disabled
and enabled with the assumption that Devstack expects only
a single DB to be configured at a time, but that doesn't
seem to be the case. Simply removing the disable calls seems
to work fine.
Also exclude oslo.messaging==2.6.0 as per global-requirements.txt.
Closes-Bug: #1505259
Closes-Bug: #1505295
Depends-On: I47ab12f719fba41c2f0c03047b05eb28f4423682
Change-Id: I0fbcc1218e1aa9adbf89f6121c1c2e224ed93cab
The port is in most cases disabled, so to use it, we should first enable
it, and it means that we should still rely on ovs-vsctl for that initial
call.
Closes-Bug: #1468259
Change-Id: I097b1c441df1f7f1785b8744f27809617bb21c14
Modify the script so that it can be used by the *aaS functional tests.
This is done by allowing callers, namely other *aaS repos, to override
information, like the project name and virtual environment used (for
example, VPNaaS has two functional jobs with different virtual env).
Change-Id: I450273036e938a4acc9a7bc1dc193a9c207b2d58
Closes-Bug: #1446807
Arbitrarily restricting ourselves from using bash because developers on
platforms like netbsd don't want to install bash from ports doesn't
make sense. Any non-trivial shell script is likely to use features
like arrays or string manipulation that are poorly supported (if at
all) by sh, and the continued bumping of the number of expected bash
scripts is an indication that the check is not serving its purpose
anyway.
Along with removing the check, all shebang references to /bin/bash
have been replaced with /usr/bin/env bash in an attempt to be more
compatible across different hosts.
Change-Id: Ief72dc380cc88af38959c330897e2c127e33c332
Closes-Bug: #1440824
A recent change to devstack renamed lib/neutron to lib/neutron-legacy,
and this change updates the functional setup script to reflect the
change.
Change-Id: I5eb4b4052da4b0db128feb42feae50a8bc59f373
Closes-Bug: #1438426
This patch introduces support for rootwrap daemon mode. It adds
a new config option, AGENT.root_helper_daemon with no default. To
enable, set to something like:
root_helper_daemon = sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
The patch currently assumes that the root_helper_daemon value, and specifically
the rootwrap config, will not change once calls to execute() happen. While it
would not be hard to generate a rootwrap daemon client for each new config, I
couldn't think of a legitimate reason to support it and left it out as YAGNI.
This patch does change the behavior of the addl_env argument to create_process
and execute. Previously, an environment dict would be passed to Popen. If
a root helper was used, this environemnt would actually be passed to 'sudo'
which would filter it before passing it to the underlying command. In the case
of daemon mode, this would cause a problem as the enviornment is filtered by
sudo only once, at daemon startup. Any environment variables added at execute
time would then just be passed directly to the underyling command unfiltered.
oslo.rootwrap 1.6.0 fixes this issue by denying the passing of environment
variables to the daemon altogether. Instead, anything using rootwrap and needing
to pass additional environment variables should define an EnvFilter and run the
command with env var=val cmd. utils.execute/create_process have been modified to
run code in this way (which netns.execute already did).
No code in neutron currently uses both run_as_root=True and addl_env, so this
change does not require any change in code or filters.
DocImpact
Implements: blueprint rootwrap-daemon-mode
Change-Id: I567334bb611253c7b9d830d50c5be308a5153baf
This change adds a new script, configure_for_func_testing.sh, that
automates configuration of a host to support functional testing. The
script's functionality is consumed by a refactored version of
gate_hook.sh, and both minimizes runtime and removes the previous
dependency on the devstack-gate repo.
Additionally, the dsvm-functional tox env is no longer dependent on
devstack to deploy neutron's rootwrap configuration system-wide.
Rootwrap configuration is now deployed to the target tox venv on each
tox invocation.
Change-Id: Iaf43be458bdf3c4535f95ee5a3a3b47a744020a0