24 Commits

Author SHA1 Message Date
Victor Morales
a14439549f Add bashate support
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
2017-02-25 06:29:55 +00:00
Jenkins
f760bd792f Merge "configure_for_func_testing.sh: Remove neutron-legacy inclusion" 2017-02-03 21:02:24 +00:00
Jakub Libosvar
d5c07fe512 ovsfw: Support protocol numbers instead of just tcp and udp
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
2017-01-20 11:17:40 -05:00
Jenkins
edd0c130d9 Merge "Replace nc command with ncat" 2017-01-07 03:15:48 +00:00
Sławek Kapłoński
a12de8975e Fullstack tests for DHCP agent HA
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
2017-01-04 22:48:46 +00:00
Jakub Libosvar
8f37f2d34e Replace nc command with ncat
Ncat has better capabilities like SCTP which nc doesn't have.

Change-Id: I7a3a955465aa05032ead63459191167cfe3f98bd
2017-01-03 16:09:14 +00:00
YAMAMOTO Takashi
74e7145b60 configure_for_func_testing.sh: Remove neutron-legacy inclusion
After devstack change (see Depends-On below),
it isn't necessary anymore.

Depends-On: I3ff136fc8330c92007cdfe91b77d7f9865eabd8d
Change-Id: Iec6f1fb59bf1f656100947f50311afcee4636ca2
2016-12-01 22:40:02 +09:00
YAMAMOTO Takashi
c15c4e4ede configure_for_func_testing.sh: Source lib/neutron as well
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
2016-12-01 20:40:19 +09:00
Ihar Hrachyshka
80eb375ba1 Fixed functional iptables firewall tests for newer kernels
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
2016-09-29 13:39:18 +00:00
Michael Johnson
44ef44c0ff Update devstack plugin for dependent packages
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
2016-03-16 23:45:02 -07:00
Ihar Hrachyshka
317f5b2dfc Remove unused -constraints tox targets
Now that gate does not rely on -constraints targets [1], we should be
safe to remove them.

[1] Iea3a0b1f740d5679ebfa135f2bf5b89c52008716

Change-Id: I59855f1b15d54323dcc7c4759904be7124a1df1a
2016-03-07 17:21:05 +01:00
Sławek Kapłoński
2254acef06 Add fullstack resources for linuxbridge agent
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
2016-02-19 13:12:25 +00:00
Akihiro Motoki
477b390b32 Allow to control to use constraint env for functional jobs
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
2015-12-25 23:40:22 +09:00
armando-migliaccio
fce50f3beb Run functional gate jobs in a constrained environment
This patch modifies the gate hooks to run jobs with upper constraints.

Change-Id: I9eb1eb8e61381e9bb45678af8a24fa88a99e2c8f
2015-12-22 19:31:59 -08:00
YAMAMOTO Takashi
7977041fa8 configure_for_func_testing.sh: Fix arguments for get_packages
Closes-Bug: #1515035
Change-Id: Ie14e0acd67921cb4dc16a4e25a19d23b78345076
2015-11-11 08:00:22 +09:00
Henry Gessau
468de2d767 More instructions for neutron-db-manage revision --autogenerate
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
2015-11-08 19:42:56 -05:00
marios
31bdb9bffd Adds base in-tree functional testing of the dhcp agent (OVS)
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
2015-10-22 18:14:14 +03:00
Assaf Muller
8a9de547ed Remove disable_service from DBs configuration
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
2015-10-12 20:22:00 +02:00
Ihar Hrachyshka
2e1b0ea403 ovsdb: attempt to enable connection_uri for native impl on startup
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
2015-06-25 10:09:42 +02:00
Paul Michali
a4ada8e0a9 Enhance configure_for_func_testing.sh for *aaS use
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
2015-05-04 15:23:12 -04:00
Maru Newby
e37dcd4c76 Remove check for bash usage
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
2015-04-07 15:15:33 +00:00
Maru Newby
b278feada2 Fix functional configure script
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
2015-03-30 21:17:19 +00:00
Terry Wilson
0df884ac93 Add rootwrap daemon mode support
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
2015-03-12 21:12:07 -05:00
Maru Newby
540e4d791f Automate host configuration for functional testing
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
2015-02-14 05:13:03 +00:00