2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 13:58:14 +00:00

24 Commits

Author SHA1 Message Date
Timothy Redaelli
0c4d144a98 Remove dependency on python3-six
Since Python 2 support was removed in 1ca0323e7c29 ("Require Python 3 and
remove support for Python 2."), python3-six is not needed anymore.

Moreover python3-six is not available on RHEL/CentOS7 without using EPEL
and so this patch is needed in order to release OVS 2.13 on RHEL7.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-12-20 12:23:06 -08:00
Ben Pfaff
1ca0323e7c Require Python 3 and remove support for Python 2.
Python 2 reaches end-of-life on January 1, 2020, which is only
a few months away.  This means that OVS needs to stop depending
on in the next release that should occur roughly that same time.
Therefore, this commit removes all support for Python 2.  It
also makes Python 3 a mandatory build dependency.

Some of the interesting consequences:

- HAVE_PYTHON, HAVE_PYTHON2, and HAVE_PYTHON3 conditionals have
  been removed, since we now know that Python3 is available.

- $PYTHON and $PYTHON2 are removed, and $PYTHON3 is always
  available.

- Many tests for Python 2 support have been removed, and the ones
  that depended on Python 3 now run unconditionally.  This allowed
  several macros in the testsuite to be removed, making the code
  clearer.  This does make some of the changes to the testsuite
  files large due to indentation level changes.

- #! lines for Python now use /usr/bin/python3 instead of
  /usr/bin/python.

- Packaging depends on Python 3 packages.

Acked-by: Numan Siddique <nusiddiq@redhat.com>
Tested-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-09-27 09:23:50 -07:00
David Marchand
253e4dc068 conntrack: fix tcp seq adjustments when mangling commands.
The ftp alg deals with packets in two ways for the command connection:
either they are inspected and can be mangled when nat is enabled
(CT_FTP_CTL_INTEREST) or they just go through without being modified
(CT_FTP_CTL_OTHER).

For CT_FTP_CTL_INTEREST packets, we must both adjust the packet tcp seq
number by the connection current offset, then prepare for the next
packets by setting an accumulated offset in the ct object.  However,
this was not done for multiple CT_FTP_CTL_INTEREST packets for the same
connection.
This is relevant for handling multiple child data connections that also
need natting.

The tests are updated so that some ftp+NAT tests send multiple port
commands or other similar commands for a single control connection.
Wget is not able to do this, so switch to lftp.

Fixes: bd5e81a0e596 ("Userspace Datapath: Add ALG infra and FTP.")
Co-authored-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-18 16:16:10 -08:00
Ben Pfaff
5a0e4aec1a treewide: Convert leading tabs to spaces.
It's always been OVS coding style to use spaces rather than tabs for
indentation, but some tabs have snuck in over time.  This commit converts
them to spaces.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
2018-06-11 15:32:00 -07:00
Leif Madsen
db8dcbaf1c packaging: Make Fedora spec file CentOS compatible
On CentOS, the package names aren't prefixed with python2, but rather
are prefixed with simply python. This change addresses that and fixes
up some documentation that was outdated, and updates the Vagrantfile
to use the proper spec file and package names.

Fixes: bb1a7ca21107 ("fedora: Add python3-openvswitch split package")
Signed-off-by: Leif Madsen <lmadsen@redhat.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
2017-03-08 11:13:19 -05:00
Timothy Redaelli
2fde4546d1 vagrant: Use official boxes for Fedora and Centos
Change CentOS version to last 7 (7.3 at the moment),
since old kernel-devel version is no longer available.

Add net-tools to CentOS since netstat is needed for some tests.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Andy Zhou <azhou@ovn.org>
2017-03-07 17:08:28 -08:00
Timothy Redaelli
bb1a7ca211 fedora: Add python3-openvswitch split package
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1412694
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Russell Bryant <russell@ovn.org>
2017-02-23 15:52:03 -05:00
Joe Stringer
40c7b2fc0d lib: Add support for tftp ct helper.
The kernel datapath provides support for TFTP helpers, so add support
for this ALG to the commandline and OpenFlow encoding/decoding.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2017-01-03 09:32:58 -08:00
Thadeu Lima de Souza Cascardo
888e071e7d vagrant: add CentOS 7.2 support
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-10-12 12:33:39 -07:00
Thadeu Lima de Souza Cascardo
3d982663b7 vagrant: cleanup before building
Clean the source directory before building, otherwise, build might fail if it
has been configured already.

Only do it if there is a Makefile present, as suggested by Ben Pfaff.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-10-09 12:45:13 -07:00
Thadeu Lima de Souza Cascardo
960e99dcdd vagrant: use RECHECK=yes for system checks
Use RECHECK=yes for both kernel and userspace datapath tests.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2016-10-07 15:48:57 -07:00
Thadeu Lima de Souza Cascardo
7c127f28a8 vagrant: Add Debian Jessie support.
Now, vagrant up will test both Fedora 23 and Debian Jessie (8.0), which
uses Linux 3.16.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
2016-09-13 12:23:13 -07:00
Daniele Di Proietto
e4f2c62126 system-userspace-macros: Check the exit code of ethtool.
If the ethtool command is not available on the system we should fail,
since the userspace testsuite cannot work properly without disabling
offloads.

Also, add ethtool to the list of installed packages on Vagrantfile, to
ensure that offloads don't cause test failures in the vagrant VM when
the kernel is updated.

Fixes: ddcf96d2dcc1 ("system-tests: Disable offloads in userspace tests.")
Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Joe Stringer <joe@ovn.org>
2016-08-05 13:59:36 -07:00
Joe Stringer
06c58061d4 packaging: Remove PyQt4 dependency.
This doesn't seem to have been necessary since ovsdbmonitor was removed
in commit 7868fbc6c97c ("ovsdbmonitor: Remove."). Drop the dependency.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-07-15 13:52:14 -07:00
Joe Stringer
e259119c19 vagrant: Add 'nc' to installed programs.
netcat is used in several tests, but when creating a new vagrant VM we
haven't been installing it. Do so.

Signed-off-by: Joe Stringer <joe@ovn.org>
Tested-by: William Tu <u9012063@gmail.com>
Acked-by: Andy Zhou <azhou@ovn.org>
2016-06-29 13:45:20 +02:00
Joe Stringer
1a523ec4fb vagrant: Enable silent-rules for configure.
In the majority of cases, developers debugging their code using vagrant
will be more interested in compiler errors/warnings than the exact
invocation of the compiler. By enabling silent-rules, the verbosity of
compilation is lowered and it is easier to identify these pieces of
information.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ryan Moats <rmoats@us.ibm.com>
2016-05-25 17:40:13 -07:00
Joe Stringer
53de7528be vagrant: Update default box to Fedora-23.
This brings a newer kernel (4.2) and newer iproute2, allowing more of
the tests to run by default.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
2016-05-25 17:40:13 -07:00
Joe Stringer
6a6b35fcf0 vagrant: Update dependencies.
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
2016-05-25 17:40:11 -07:00
Mark D. Gray
d64c5e8608 Vagrantfile: Update to Fedora 22 base box
Fedora 20 base box is no longer available at chef/fedora20.

Signed-off-by: Mark D. Gray <mark.d.gray@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2015-11-29 18:27:31 -08:00
Daniele Di Proietto
548f9fe7d2 Vagrantfile: Add test_ovs_system_userspace provision.
Add 'test_ovs_system_userspace' provision.  Command:
        # vagrant provision --provision-with=test_ovs_system_userspace

will run "make check-system-userspace" in the vagrant launched VM.

It may be more convenient to run this tests inside a vm rather than in
the host, because they interact with system networking.

Suggested-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-08-07 12:58:42 -07:00
Andy Zhou
3314f01ee9 Vagrantfile: add test_ovs_kmod provision
Add 'test_ovs_kmod' provision.  Command:
   # vagrant provision --provision-with=test_ovs_kmod

will run "make check-kmod" in the vagrant launched VM.

It turns out to be more convenient to test within as root. Switch
Vagrantfile provisions to run as root user.  However, vagrant can
still be launched as normal user.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-16 13:20:34 -08:00
Thomas Graf
d06c1ff8ea vagrant: Build kernel module RPM
Installs the kernel-devel package of the currently running kernel and
builds the kmod RPM in the "install_rpm" phase.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2015-01-10 00:54:18 +01:00
Motonori Shindo
ecf68fa449 vagrant: make sure to bootstrap before configure_ovs.
The order of execution in Vagrantfile is "outside-in" meaning that
all commands in outer scope are executed first and then the commands
in inner scope. Because of this ordering, "configure_ovs" is executed
before "bootstrap_fedora", resulting in "configure_ovs" to fail as
it is not bootsrapped yet. This change fixes this problem by removing
the nested scope in Vagrant.configure block. Multi-machine is not used
so we don't need config.vm.define block.

Signed-off-by: Motonori Shindo <motonori@shin.do>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-09 12:08:59 +01:00
Andy Zhou
b56b256641 vagrant: switch to use out of tree build
Vagrant shared folder, at least on the default virtual box, does not
support the creation of the socket files. If one were to build OVS
under /vagrant, 'make check' would not work.

Out of tree builds can be used to work around this issue.
See Install.md for instructions.

Since out of tree builds requires a clean source tree, Vagrantfile can
not be a generated file. This commit removes Vagrantfile.in, commit
Vagrantfile instead.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-08 15:36:39 -08:00