2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00
Commit Graph

348 Commits

Author SHA1 Message Date
Yalei Li
bdd58e62ea rhel: Fix libunwind dev package.
There is no unwind-devel package, only libunwind-devel package is found.
No error is reported with libunwind-devel during compilation.

Fixes: 7e0c91eb07 ("debian and rhel: Add libunwind dev package.")
Signed-off-by: Yalei Li <liyl43@chinatelecom.cn>
Acked-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2021-01-13 15:54:43 +01:00
Greg Rose
7bfb1952b9 Update scripts to support RHEL 7.9
Add support for RHEL7.9 GA release with kernel 3.10.0-1160

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2020-11-18 20:04:01 -08:00
Jaime Caamaño Ruiz
9d15c02a8b rhel: Fix reload of OVS_USER_ID on startup.
OVS_USER_ID was being picked up from a previously existing
openvswitch.useropts rendering innefective any configuration change
through sysconfig.

There is no ordering between Exec* and Environment* stanzas of systemd,
full Enviroment* is always loaded before each Exec*. We make
sure that openvswitch.useropts is removed in a first Exec so that a
fresh OVS_USER_ID can be picked up from config in successive Exec*.

Fixes: 94e1e8b ("rhel: run ovn with the same user as ovs")
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Acked-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2020-09-15 22:47:08 +02:00
Jaime Caamaño Ruiz
d3daf73db3 rhel: Fix logrotate group when dpdk is enabled.
Otherwise logrotate will fail to generate the rotated log files.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2020-09-15 21:29:05 +02:00
Roi Dayan
9ecaa5cb71 rhel: openvswitch-fedora.spec.in: Fix installed but not packaged.
With the cited commit, we get an error from rpmbuild about installed
but not packaged /usr/lib64/libopenvswitchavx512.a.
Fix it by treating it as the other la files.

Fixes: 352b6c7116 ("dpif-lookup: add avx512 gather implementation.")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2020-07-17 01:46:49 +02:00
William Tu
51119374ce rhel: Fix syntax error when matching version.
Remove the extra 'fi' in the script.

VMware-BZ: #2582834
Fixed: fecb28051b ("rhel: Support RHEL 7.8 kernel module rpm build.")
Reported-by: Abhijeet Malawade <amalawade@vmware.com>
Acked-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
2020-06-22 11:40:07 -07:00
William Tu
fecb28051b rhel: Support RHEL 7.8 kernel module rpm build.
Add support for RHEL7.8 GA release with kernel 3.10.0-1127.

VMware-BZ: #2582834
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
2020-06-18 09:12:34 -07:00
Ilya Maximets
82c9d9993d netdev-dpdk: Remove deprecated ring port type.
'dpdkr' ring ports was deprecated in 2.13 release and was not
actually used for a long time.  Remove support now.

More details in
commit b4c5f00c33 ("netdev-dpdk: Deprecate ring ports.")

Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2020-03-06 12:41:04 +01:00
Timothy Redaelli
0c4d144a98 Remove dependency on python3-six
Since Python 2 support was removed in 1ca0323e7c ("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
Yi-Hung Wei
391b52f3c3 rhel: Support RHEL 7.8 kernel module rpm build
This patch supports RHEL 7.8 kernel module rpm package building.

$ make rpm-fedora-kmod \
RPMBUILD_OPT='-D "kversion 3.10.0-1101.el7.x86_64"'

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
2019-12-13 15:58:26 -08:00
Yifeng Sun
1aaf467bd4 rhel: Fix ovs-kmod-manage.sh that may create invalid soft links
Current code iterates every kernel under '/lib/modules' for a matched
version. As a result, this script may create invalid soft links if the
matched kernel doesn't have openvswitch-kmod RPM installed.

This patch fixes it.

VMWare-BZ: #2257534

Fixes: c3570519 ("rhel: add 4.4 kernel in kmod build with mulitple versions, fedora")
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
2019-11-18 12:31:58 -08:00
Roi Dayan
ed1617406c rhel: openvswitch-fedora.spec.in: Fix output redirect to null device
Add missing slash.

Fixes: 0447019df7 ("fedora-spec: added systemd post/postun/pre/preun sections")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
2019-10-29 09:45:55 +01:00
Yifeng Sun
454dc17c75 rhel: Support RHEL7.7 build and packaging
This patch provides essential fixes for OVS to support
RHEL7.7's new kernel.

make rpm-fedora-kmod \
RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'

Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-10-24 14:26:21 -07:00
Numan Siddique
a6028d3abb rhel: Remove the cond 'build_python3'
A previous patch removed python2 support from ovs. So we can remove
this condition and make python3 mandatory for builds. Without this
patch, make rpm-fedora on centos 7 fails unless  we pass
RPMBUILD_OPT="--with build_python3".

Signed-off-by: Numan Siddique <numans@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-10-21 09:05:17 -07:00
William Tu
7e0c91eb07 debian and rhel: Add libunwind dev package.
The patch add libunwind dev package to debian and rhel.

Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
2019-10-18 17:15:23 -07:00
Ben Pfaff
36e5d97f9b ovs-vlan-bug-workaround: Remove.
This workaround only applied to kernels earlier than 2.6.37, but OVS
only supports 3.10 and later.

As the original author of this code, I won't miss it.

Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-10-14 15:34:53 -07:00
Ben Pfaff
05bf1dbb98 ovn: Remove remaining pieces.
A preceding commit removed the last remaining dependencies on OVN code,
so remove the OVN code.

Acked-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-09-30 13:13:26 -07: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
Ben Pfaff
ab45148905 Recommend Sphinx from Python 3 in documentation and packaging.
Acked-by: Numan Siddique <nusididq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-09-20 08:34:34 -07:00
Mark Michelson
f3e24610ea Remove OVN.
OVN is separated into its own repo. This commit removes the OVN source,
OVN tests, and OVN documentation. It also removes mentions of OVN from
most documentation. The only place where OVN has been left is in
changelogs/NEWS, since we shouldn't mess with the history of the
project.

There is an exception here. The ovsdb-cluster tests rely on ovn-nbctl
and ovn-sbctl to run. Therefore those ovn utilities, as well as their
dependencies remain in the repo with this commit.

Acked-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-09-06 14:54:58 -07:00
Greg Rose
d0fa7d7f12 rhel: Revert RHEL 7.4 comp_ver change
I looked at the wrong list of kernels when I changed the value for the
RHEL 7.4 comp_ver variable.  Revert that part of commit e64c2c1
("rhel: Fix ovs-kmod-manage.sh to work with RHEL 7.3").

Fixes: e64c2c1 ("rhel: Fix ovs-kmod-manage.sh to work with RHEL 7.3")
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2019-09-02 22:22:40 -07:00
Greg Rose
e64c2c1ea6 rhel: Fix ovs-kmod-manage.sh to work with RHEL 7.3
Add case for RHEL 7.3.  This also fixes commit 22abff2 where I forgot to
update the comp_ver variable for RHEL 7.5 and while I was in there I
updated comp_ver for the RHEL 7.4 case as well.

Fixes: 22abff2 ("rhel: Add case for RHEL 7.5 major version to...")
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-08-29 12:10:08 -07:00
Greg Rose
22abff2064 rhel: Add case for RHEL 7.5 major version to kmod manage script
A Centos 7.5 kernel with an unencountered set of minor build numbers
caused an upgrade bug.  Adding the case for the rhel 7.5 kmod management
script fixes the problem.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2019-08-27 22:44:53 -07:00
Ashish Varma
4afd1d8769 rhel: Fixed a bug for checking the correct major version and revision.
Fixed a bug where checking for major version 3.10 and major revision not
equal to 327 or 693 or 957 should have gone to the default else at the end.
In the current code, the default else condition will not get executed
for kernel with major version 3.10 and major revision not equal
to 327/693/957 resulting in failure to load the kernel module.

Fixes: 402efbe4e1 ("rhel: Add 4.12 kernel support in ovs-kmod-manage.sh")
Signed-off-by: Ashish Varma <ashishvarma.ovs@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-07-08 14:10:01 -07:00
Greg Rose
26b3641c9a rhel: Fix upgrade path
There is a bug in the upgrade path from the old kmod-openvswitch SysV
based RPM to the new openvswitch-kmod systemd based RPM. Since the
name of the package is changed it is not possible to use the yum
or rpm upgrade options.  This prevents passing in a 1 or 2 to the
%postun scriptlet section of the older RPM and that causes the section
to be treated as an 'erase'.  The old kmod-openvswitch %postun section
proceeds to erase the symlinks in ../weak-updates/openvwswitch that
the installation of the new package had just created.

Fix this by adding a %posttrans tag to the systemd spec file.  This
scriptlet is called after the symlinks have just been erased and
it calls the ovs-kmod-manage.sh script to recreate the symlinks and
run depmod -a again so that the correct kernel modules will be
found and loaded.

VMware-BZ: #236987

Cc: Aaron Conole <aconole@redhat.com>
Cc: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2019-06-25 16:12:22 -07:00
Jaime Caamaño Ruiz
7a65e5a925 rhel: let *-ctl handle runtime directory
Recent versions of systemd restores RuntimeDirectory ownership to the
unit's User in between execution of *Exec directives (see [1]). Using
ExecStartPre to reset RuntimeDirectory ownership to OVS_USER no longer
works as expected.

The ctl scripts already handle creation of the runtime directory with
correct ownership and permissions so we can basically remove
RuntimeDirectory from systemd unit file. There is still need to handle
ownsership to cover some upgrade scenarios, but success of that will be
optional as the directory itself wont exist at first time run.

[1] https://github.com/systemd/systemd/issues/12713

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-10 13:50:57 -07:00
Jaime Caamaño Ruiz
0d5dd7c2d5 rhel: Fix ovn database dir optional on first run
OVN database directory is createid on first run so make ownership
handling optional.

Fixes: 94e1e8be31 ("rhel: run ovn with the same user as ovs")
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-10 13:48:04 -07:00
Jaime Caamaño Ruiz
0186c3807c rhel: set useropts optional for ovsdb-server
systemd assesses the presssence of all EnvironmentFile before execution
of Exec* directives, thus useropts needs to be optional even though it
will always be created at ExecStartPre.

Fixes: 94e1e8be31 ("rhel: run ovn with the same user as ovs")
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-10 13:47:50 -07:00
Jaime Caamaño Ruiz
cdce093e69 rhel: useropts should be owned by package
So that is properly cleaned up after package is uninstalled.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-10 09:19:30 -07:00
Jaime Caamaño Ruiz
94e1e8be31 rhel: run ovn with the same user as ovs
Both ovn and ovs share the same log and run directories which are owned
by the user running ovs so it makes sense that ovn runs under that user
too to diminish security concerns and possible problems with log rotation.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-09 17:25:46 -07:00
Jaime Caamaño Ruiz
27e25e18c1 rhel: secure openvswitch useropts
The openvswitch useropts file is being stored in a directory where the
openvswitch user has write permissions. The openvswitch user can then
manipulate the file to change the user under which switchd daemon runs.

This patch changes the file to /var/openvswitch.useropts preventing any
manipulation.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-09 17:25:45 -07:00
Jaime Caamaño Ruiz
dd9b0ed538 rhel: start ovn-controller-vtep with ovn-ctl
Use ovn-ctl to start ovn-controller-vtep from the corresponding systemd
unit file.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-09 17:25:43 -07:00
Jaime Caamaño Ruiz
ea8519fcc7 ovn-controller-vtep: Fix wrong value for ovnsb-db argument
Fix help output of ovn-controller-vtep that was suggesting the
openvswitch database instead of the ovn southbound database for the
ovnsb-db argument.

Also fix the corresponding systemd unit that was passing the openvswitch
database instead of the ovn southbound database for the ovnsb-db
argument.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-09 17:16:44 -07:00
Yifeng Sun
52d12cc459 rhel7.6: Support kmod build and load for mulitple kernel versions
RHEL 7.6's new kernel 3.10.0-957.12.1.el7 introduced some ABI changes.
This leads to an issue that OVS kernel module built against
kernels newer than 12.1 cannot be loaded on systems running kernels
older than 12.1, vice versa.

By inspecting datapath/linux/openvswitch.mod.c, signatures of
the following kernel functions have changed in 3.10.0-957.12.1.el7:
    nf_ct_get_tuple
    nf_ct_invert_tuplepr
    __nf_ct_l4proto_find

This patch enables OVS to build kernel modules against multiple
kernel versions and enables RHEL 7.6 system to load the compatible
module at runtime.

make rpm-fedora-kmod \
    RPMBUILD_OPT='-D "kversion 3.10.0-957.10.1.el7.x86_64 \
    3.10.0-957.12.1.el7.x86_64"'

Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-06-05 13:21:27 -07:00
Yi-Hung Wei
402efbe4e1 rhel: Add 4.12 kernel support in ovs-kmod-manage.sh
This patch extends c3570519ec ("rhel: add 4.4 kernel in kmod build
with mulitple versions, fedora") that updates ovs-kmod-manage.sh to
support SLES 12 SP4 kernel (4.12.x, x>=14).

For some distros, openvswitch-kmod rpm package may contain multiple
ovs kernel modules built against different kernels to deal with kernel
ABI changes and kernel module compatibility issues.  For rpm that
packages with multiple kernel modules, ovs-kmod-manage.sh is invoked
during the rpm post installation stage to 1) select the proper kernel
module to be used; 2) create symbolic links to the proper kernel module
in the weak-updates directory if needed.

For SLES 12 SP4, since the weak-modules utility is not available, even
though there is no ovs related kernel ABI changes for its
currently 5 available kernels from 4.12.14-94.41.1 to 4.12.14-95.16.1,
we still want to invoke ovs-kmod-manage.sh to create weak-updates
symbolic links if the kernel that build the rpm package is different
from the installed kernel.

Notice that ovs-kmod-manage.sh assumes the oldest compatible kernel
is used to build the kernel module rpm. For example, on SLES 12 SP4
it would be,

$ rpmbuild -bb -D 'kversion 4.12.14-94.41-default' \
    rhel/openvswitch-kmod-fedora.spec

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2019-05-20 01:38:32 -07:00
Gurucharan Shetty
dab29add2d fedora: Handle upgrades from rhel package.
Currently we have rhel/openvswitch.spec.in that provides
sysv scripts. The fedora package provides systemd scripts.
If one upgrades openvswitch package from sysv to systemd,
you will end up in a situation where old OVS daemons are
running, but systemd does not know about it.  One "restart"
is needed for systemd to see the old daemons. Another "restart"
or "force-reload-kmod" is needed to actually use the new
daemons.

This commit, just takes care of the first restart. The "real"
restart/force-reload-kmod will still have to be done outside
the package installation.

Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Ansis Atteka <aatteka@ovn.org>
2019-05-14 01:03:35 -07:00
Gurucharan Shetty
dcd0f1e877 fedora: Ability to auto enable openvswitch service.
We currently have rhel/openvswitch.spec.in that automatically
enables openvswitch service when the package is installed using
chkconfig.

But fedora rpm may not enable openvswitch service automatically.
The macro currently being used in fedora rpm (systemd_post) will
look for preset files in /etc/systemd/system-preset/ to figure
out whether openvswitch service needs to be automatically enabled.
But, the fedora package does not provide such a file. The argument
is that people may want to install the package for binaries and
not necessarily to run OVS.

If someone now wants to install the fedora package and automatically
enable openvswitch, he will have to create a new package that OVS
package depends on to install the preset file. This is unwieldy.

This commit, provides a rpm build time option to enable the openvswitch
service automatically. If you now run the below command, openvswitch
service will be automatically enabled during package installation.

make rpm-fedora RPMBUILD_OPT="--with autoenable"

Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Ansis Atteka <aatteka@ovn.org>
2019-05-14 01:02:46 -07:00
Numan Siddique
a53a7e03ad rhel ovn: Remove ovn-common rpm
ovn-fedora spec generates the rpms - ovn, ovn-common, ovn-host etc
in which ovn is an empty package. The ovn fedora spec file here [1]
has moved all the ovn-common files to the 'ovn' package.
This patch does the same.

[1] - https://src.fedoraproject.org/rpms/ovn/blob/master/f/ovn.spec

Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
CC: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-04-16 16:24:47 -07:00
Ansis Atteka
068c3bade1 rhel: if rpms were built without libcapng then let processes to run as root
Otherwise, Open vSwitch will fail to start with the following
error "libcap-ng is not configured at compile time" when it
attempts to downgrade to Open vSwitch user.

Also, if packages were built in a way where processes are
supposed to be running only as root, then there is no point
in creating "openvswitch" user in the first place.

Signed-off-by: Ansis Atteka <aatteka@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2019-04-16 12:38:05 -07:00
Ansis Atteka
a76ef11dea rhel: Include all header files in the Fedora's devel package
While the header files added by this patch into Fedora's devel
rpm package can be considered private, the other devel packages
for RHEL/CentOS and Debian/Ubuntu distros include them.

So this patch simply makes the Fedora devel package consistent with
the other devel packages.

Signed-off-by: Ansis Atteka <aatteka@ovn.org>
2019-04-02 09:53:31 -07:00
Timothy Redaelli
b16b5caff7 rhel: Fix sphinx BuildRequires on Fedora Rawhide
On Fedora Rawhide only python3-sphinx is available, but currently
python2-sphinx is used.

This commit changes the BuildRequires for sphinx to use
/usr/bin/sphinx-build directly instead of python2-sphinx in order to make
it work on current Fedora Rawhide too.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-03-22 14:47:24 -07:00
Timothy Redaelli
0bdc0bf75e rhel: Fix tests on mock and koji
Currently many tests fails on mock/koji since /etc/resolv.conf is not
present. The unexpected warning causes them to abort.

After this patch an empty resolv.conf is created and used before issuing
"make check".

Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-28 14:39:58 -08:00
Timothy Redaelli
f385abded5 rhel: Use PIDFile on forking systemd service files
Currently, PIDFile is not used in systemd service files with
Type=forking. This means sometimes systemd fails to restart a daemon
that is killed (with SIGKILL) or that is crashed.

This commit adds PIDFile to all systemd service file with Type=forking
in order to always have the correct PID to monitor.

Reported-at: https://bugzilla.redhat.com/1653717
Reported-by: Candido Campos <ccamposr@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-28 14:29:21 -08:00
Flavio Leitner
b82a90e266 rhel: limit stack size to 2M.
The default stack size in Fedora/RHEL is 8M, which means when ovs-vswitchd
daemon starts and uses --mlockall (default), it will dirty all memory
regions for all threads which is proportionally to the number of CPUs.

On a big host this increases memory usage to many hundreds of megabytes
while OVS actually requires much less.

This patch relies on systemd to limit to 2M/thread. That is much more
than the minimum documented at function ovs_thread_create():

    /* Some small systems use a default stack size as small as 80 kB, but OVS
     * requires approximately 384 kB according to the following analysis:
     * https://mail.openvswitch.org/pipermail/ovs-dev/2016-January/308592.html
     *
     * We use 512 kB to give us some margin of error. */

Acked-By: Timothy Redaelli <tredaelli@redhat.com>
Tested-By: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-28 11:29:21 -08:00
Timothy Redaelli
175b9a6401 rhel: Add an example to specify custom options
Add an example to specify custom options of ovs-vswitchd and
ovsdb-server.
In the example, the log level for file and console destinations is set to dbg.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-02-11 17:52:19 -08:00
Martin Xu
9fe4b2fbd2 rhel: bug fix upgrade path in kmod fedora spec file
This patch removes the "Conflicts" tag and adds "Obsoletes" tag.

With the conflicts tag, when a user attempts to install or upgrade with
the same version as already installed, the conflict kicks in. Otherwise,
such is allowed with --replacepkgs.

Obsoletes is needed for the upgrade path from kmod-openvswitch to
openvswitch-kmod.

Fixes: 22c33c3039 (rhel: support kmod build against mulitple kernel
versions, fedora)

VMware-BZ: #2249788

Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
CC: Yi-Hung Wei <yihung.wei@gmail.com>
CC: Yifeng Sun <pkusunyifeng@gmail.com>
CC: Zak Whittington <zwhitt.vmware@gmail.com>
CC: Ben Pfaff <blp@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-23 11:55:07 -08:00
Numan Siddique
78203a9cd3 rhel: Split OpenvSwitch and OVN packages
Up until now, OVN rpms were generated as sub packages of OpenvSwitch.
This patch now splits it and makes OVN rpms independent.

A new spec file - ovn-fedora.spec.in is added for this.
The openvswitch-fedora.spec.in has been modified to create only
OpenvSwitch packages.

Since we are not splitting the OVN code, the spec files run the
same build procedure. Only the required binaries/files are copied
into the rpms.

The new package names will be ovn, ovn-common, ovn-central, ovn-host,
ovn-vtep and ovn-docker.

Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Acked-by: Timothy Redaelli <tredaelli@redhat.com>
Tested-By: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-16 16:42:15 -08:00
Timothy Redaelli
96edaf5f58 rhel: Add ovs-actions manpage to rhel and Fedora spec files
Fixes: be51cd4173 ("ovs-actions: New document describing OVS actions in detail.")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2019-01-15 09:52:36 -08:00
luzhipeng-zte
8c93a1ad45 fix rpmbuild fails for rhel
This patch fixes the rpm build fail for rhel. The error is:
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/openvswitch-2.10.0-1.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/share/openvswitch/scripts/ovs-monitor-ipsec

Signed-off-by: ZhiPeng LU <luzhipeng@uniudc.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-27 09:56:26 -08:00
Martin Xu
9b58a50636 rhel: Add 'SYSTEMD_NO_WRAP=yes' in ovs init script for SLES
The variable equivalent to RHEL's 'SYSTEMCTL_SKIP_REDIRECT=yes' on SLES
12 is 'SYSTEMD_NO_WRAP=yes'

VMware-BZ: #2245358
Reviewed-by: Markos Chandras <mchandras@suse.de>
CC: Markos Chandras <mchandras@suse.de>
CC: Ansis Atteka <aatteka@ovn.org>
CC: Ben Pfaff <blp@ovn.org>
Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-13 11:26:29 -08:00