From f1f7ac1e39e6bc9924499163bbe36aa704a3fd8b Mon Sep 17 00:00:00 2001 From: Dumitru Ceara Date: Fri, 22 Mar 2024 00:15:11 +0100 Subject: [PATCH] rhel: Update docs. Remove openvswitch related left overs. Remove documentation about installation on older RHEL versions. RHEL 6.x will reach the end of its ELS, Extended Life Cycle Support on July 1st: https://access.redhat.com/articles/4665701#1-can-you-describe-the-red-hat-enterprise-linux-6-life-cycle-1 Signed-off-by: Dumitru Ceara Acked-by: Mark Michelson --- Documentation/automake.mk | 1 - Documentation/howto/docker.rst | 2 +- Documentation/index.rst | 1 - Documentation/intro/install/fedora.rst | 7 +- Documentation/intro/install/index.rst | 1 - Documentation/intro/install/rhel.rst | 237 ---------------- rhel/.gitignore | 7 - rhel/README.RHEL.rst | 359 ------------------------- rhel/automake.mk | 1 - 9 files changed, 2 insertions(+), 614 deletions(-) delete mode 100644 Documentation/intro/install/rhel.rst delete mode 100644 rhel/README.RHEL.rst diff --git a/Documentation/automake.mk b/Documentation/automake.mk index b00876737b..673b24a062 100644 --- a/Documentation/automake.mk +++ b/Documentation/automake.mk @@ -12,7 +12,6 @@ DOC_SOURCE = \ Documentation/intro/install/fedora.rst \ Documentation/intro/install/general.rst \ Documentation/intro/install/ovn-upgrades.rst \ - Documentation/intro/install/rhel.rst \ Documentation/intro/install/windows.rst \ Documentation/tutorials/index.rst \ Documentation/tutorials/ovn-openstack.rst \ diff --git a/Documentation/howto/docker.rst b/Documentation/howto/docker.rst index f47fa7850f..15bf07c947 100644 --- a/Documentation/howto/docker.rst +++ b/Documentation/howto/docker.rst @@ -296,7 +296,7 @@ The "underlay" mode Depending on your VM, you can make the above step persistent across reboots. For example, if your VM is Debian/Ubuntu-based, read `openvswitch-switch.README.Debian` found in `debian` folder. If your VM is - RHEL-based, refer to :doc:`/intro/install/rhel`. + RHEL-based, refer to :doc:`/intro/install/fedora`. 3. Start the Open vSwitch network driver diff --git a/Documentation/index.rst b/Documentation/index.rst index 730595c050..98bfd5894a 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -65,7 +65,6 @@ Deeper Dive - **Testing** :doc:`topics/testing` - **Packaging:** :doc:`intro/install/debian` | - :doc:`intro/install/rhel` | :doc:`intro/install/fedora` The Open Virtual Network (OVN) Project diff --git a/Documentation/intro/install/fedora.rst b/Documentation/intro/install/fedora.rst index 5b2a37cffd..a0c372251c 100644 --- a/Documentation/intro/install/fedora.rst +++ b/Documentation/intro/install/fedora.rst @@ -22,7 +22,7 @@ Avoid deeper levels because they do not render well. =========================================== -Fedora, RHEL 7.x Packaging for OVN +Fedora, RHEL 7.x+ Packaging for OVN =========================================== This document provides instructions for building and installing OVN @@ -129,11 +129,6 @@ Installing RPM packages can be installed by using the command ``rpm -i``. Package installation requires superuser privileges. -Refer to the `RHEL README`__ for additional usage and configuration -information. - -__ https://github.com/openvswitch/ovs/blob/master/rhel/README.RHEL.rst - Reporting Bugs -------------- diff --git a/Documentation/intro/install/index.rst b/Documentation/intro/install/index.rst index 3e2e415f90..b94a1e1b47 100644 --- a/Documentation/intro/install/index.rst +++ b/Documentation/intro/install/index.rst @@ -55,7 +55,6 @@ provided below. distributions debian fedora - rhel Upgrades -------- diff --git a/Documentation/intro/install/rhel.rst b/Documentation/intro/install/rhel.rst deleted file mode 100644 index d68709a704..0000000000 --- a/Documentation/intro/install/rhel.rst +++ /dev/null @@ -1,237 +0,0 @@ -.. - Licensed under the Apache License, Version 2.0 (the "License"); you may - not use this file except in compliance with the License. You may obtain - a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations - under the License. - - Convention for heading levels in OVN documentation: - - ======= Heading 0 (reserved for the title in a document) - ------- Heading 1 - ~~~~~~~ Heading 2 - +++++++ Heading 3 - ''''''' Heading 4 - - Avoid deeper levels because they do not render well. - -======================================== -RHEL 5.6, 6.x Packaging for Open vSwitch -======================================== - -This document describes how to build and install Open vSwitch on a Red Hat -Enterprise Linux (RHEL) host. If you want to install Open vSwitch on a generic -Linux host, refer to :doc:`general` instead. - -We have tested these instructions with RHEL 5.6 and RHEL 6.0. - -For RHEL 7.x (or derivatives, such as CentOS 7.x), you should follow the -instructions in the :doc:`fedora`. The Fedora spec files are used for RHEL -7.x. - -.. _rhel-prerequisites: - -Prerequisites -------------- - -You may build from an Open vSwitch distribution tarball or from an Open vSwitch -Git tree. - -The default RPM build directory, ``_topdir``, has five directories in the -top-level. - -BUILD/ - where the software is unpacked and built -RPMS/ - where the newly created binary package files are written -SOURCES/ - contains the original sources, patches, and icon files -SPECS/ - contains the spec files for each package to be built -SRPMS/ - where the newly created source package files are written - -Before you begin, note the RPM sources directory on your version of RHEL. The -command ``rpmbuild --showrc`` will show the configuration for each of those -directories. Alternatively, the command ``rpm --eval '%{_topdir}'`` shows the -current configuration for the top level directory and the command ``rpm --eval -'%{_sourcedir}'`` does the same for the sources directory. On RHEL 5, the -default RPM ``_topdir`` is ``/usr/src/redhat`` and the default RPM sources -directory is ``/usr/src/redhat/SOURCES``. On RHEL 6, the default ``_topdir`` is -``$HOME/rpmbuild`` and the default RPM sources directory is -``$HOME/rpmbuild/SOURCES``. - -Build Requirements ------------------- - -You will need to install all required packages to build the RPMs. -The command below will install RPM tools and generic build dependencies:: - - $ yum install @'Development Tools' rpm-build yum-utils - -Then it is necessary to install Open vSwitch specific build dependencies. -The dependencies are listed in the SPEC file, but first it is necessary -to replace the VERSION tag to be a valid SPEC. - -The command below will create a temporary SPEC file:: - - $ sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch.spec.in > /tmp/ovs.spec - -And to install specific dependencies, use yum-builddep tool:: - - $ yum-builddep /tmp/ovs.spec - -Once that is completed, remove the file ``/tmp/ovs.spec``. - -If python-sphinx package is not available in your version of RHEL, you can -install it via pip with 'pip install sphinx'. - -Open vSwitch requires python 2.7 or newer which is not available in older -distributions. In the case of RHEL 6.x and its derivatives, one option is -to install python34 from `EPEL`_. - -.. _EPEL: https://fedoraproject.org/wiki/EPEL - -.. _rhel-bootstrapping: - -Bootstrapping and Configuring ------------------------------ - -If you are building from a distribution tarball, skip to :ref:`rhel-building`. -If not, you must be building from an Open vSwitch Git tree. Determine what -version of Autoconf is installed (e.g. run ``autoconf --version``). If it is -not at least version 2.63, then you must upgrade or use another machine to -build the packages. - -Assuming all requirements have been met, build the tarball by running:: - - $ ./boot.sh - $ ./configure - $ make dist - -You must run this on a machine that has the tools listed in -:ref:`general-build-reqs` as prerequisites for building from a Git tree. -Afterward, proceed with the rest of the instructions using the distribution -tarball. - -Now you have a distribution tarball, named something like -``openvswitch-x.y.z.tar.gz``. Copy this file into the RPM sources directory, -e.g.:: - - $ cp openvswitch-x.y.z.tar.gz $HOME/rpmbuild/SOURCES - -Broken ``build`` symlink -~~~~~~~~~~~~~~~~~~~~~~~~ - -Some versions of the RHEL 6 kernel-devel package contain a broken ``build`` -symlink. If you are using such a version, you must fix the problem before -continuing. - -To find out whether you are affected, run:: - - $ cd /lib/modules/ - $ ls -l build/ - -where ```` is the version number of the RHEL 6 kernel. - -.. note:: - The trailing slash in the final command is important. Be sure to include - it. - -If the ``ls`` command produces a directory listing, your kernel-devel package -is OK. If it produces a ``No such file or directory`` error, your kernel-devel -package is buggy. - -If your kernel-devel package is buggy, then you can fix it with:: - - $ cd /lib/modules/ - $ rm build - $ ln -s /usr/src/kernels/ build - -where ```` is the name of an existing directory under -``/usr/src/kernels``, whose name should be similar to ```` but may -contain some extra parts. Once you have done this, verify the fix with the -same procedure you used above to check for the problem. - -.. _rhel-building: - -Building --------- - -You should have a distribution tarball named something like -openvswitch-x.y.z.tar.gz. Copy this file into the RPM sources directory:: - - $ cp openvswitch-x.y.z.tar.gz $HOME/rpmbuild/SOURCES - -Make another copy of the distribution tarball in a temporary directory. Then -unpack the tarball and ``cd`` into its root:: - - $ tar xzf openvswitch-x.y.z.tar.gz - $ cd openvswitch-x.y.z - -Userspace -~~~~~~~~~ - -To build Open vSwitch userspace, run:: - - $ rpmbuild -bb rhel/openvswitch.spec - -This produces two RPMs: "openvswitch" and "openvswitch-debuginfo". - -The above command automatically runs the Open vSwitch unit tests. To disable -the unit tests, run:: - - $ rpmbuild -bb --without check rhel/openvswitch.spec - -.. note:: - If the build fails with ``configure: error: source dir - /lib/modules/2.6.32-279.el6.x86_64/build doesn't exist`` or similar, then - the kernel-devel package is missing or buggy. - -Kernel Module -~~~~~~~~~~~~~ - -On RHEL 6, to build the Open vSwitch kernel module run:: - - $ rpmbuild -bb rhel/kmod-openvswitch-rhel6.spec - -You might have to specify a kernel version and/or variants, e.g.: - - $ rpmbuild -bb \ - -D "kversion 2.6.32-131.6.1.el6.x86_64" \ - -D "kflavors default debug kdump" \ - rhel/kmod-openvswitch-rhel6.spec - -This produces an "kmod-openvswitch" RPM for each kernel variant, in this -example: "kmod-openvswitch", "kmod-openvswitch-debug", and -"kmod-openvswitch-kdump". - -.. _rhel-script-integrations: - -Red Hat Network Scripts Integration ------------------------------------ - -A RHEL host has default firewall rules that prevent any Open vSwitch tunnel -traffic from passing through. If a user configures Open vSwitch tunnels like -Geneve, GRE, VXLAN, LISP etc., they will either have to manually add iptables -firewall rules to allow the tunnel traffic or add it through a startup script -Refer to the "enable-protocol" command in the ovs-ctl(8) manpage for more -information. - -In addition, simple integration with Red Hat network scripts has been -implemented. Refer to `README.RHEL.rst`__ in the source tree or -/usr/share/doc/openvswitch/README.RHEL.rst in the installed openvswitch package -for details. - -__ https://github.com/openvswitch/ovs/blob/master/rhel/README.RHEL.rst - -Reporting Bugs --------------- - -Report problems to bugs@openvswitch.org. diff --git a/rhel/.gitignore b/rhel/.gitignore index e6f72859f3..0881d1c842 100644 --- a/rhel/.gitignore +++ b/rhel/.gitignore @@ -1,8 +1 @@ -openvswitch-dkms.spec -openvswitch-kmod-rhel5.spec -kmod-openvswitch-rhel6.spec -openvswitch-kmod-fedora.spec -openvswitch.spec -openvswitch-fedora.spec ovn-fedora.spec -usr_lib_systemd_system_ovs-vswitchd.service diff --git a/rhel/README.RHEL.rst b/rhel/README.RHEL.rst deleted file mode 100644 index 1cd2065eff..0000000000 --- a/rhel/README.RHEL.rst +++ /dev/null @@ -1,359 +0,0 @@ -=================================== -Red Hat network scripts integration -=================================== - -The RPM packages for Open vSwitch provide some integration with Red Hat's -network scripts. Using this integration is optional. - -To use the integration for a Open vSwitch bridge or interface named ````, -create or edit ``/etc/sysconfig/network-scripts/ifcfg-``. This is a -shell script that consists of a series of ``VARIABLE=VALUE`` assignments. The -following OVS-specific variable names are supported: - -DEVICETYPE - Always set to "ovs". - -TYPE - If this is "OVSBridge", then this file represents an OVS bridge named . - Otherwise, it represents a port on an OVS bridge and TYPE must have one of - the following values: - - * ``OVSPort``, if ```` is a physical port (e.g. eth0) or - virtual port (e.g. vif1.0). - - * ``OVSIntPort``, if ```` is an internal port (e.g. a tagged - VLAN). - - * ``OVSBond``, if ```` is an OVS bond. - - * ``OVSTunnel``, if ```` is an OVS tunnel. - - * ``OVSPatchPort``, if ```` is a patch port - - Additionally the following DPDK port types may be available, depends on OVS - build- and runtime configuration: - - * ``OVSDPDKPort``, if ```` is a physical DPDK NIC port (name must start - with ``dpdk`` and end with portid, eg ``dpdk0``) - - * ``OVSDPDKRPort``, if ```` is a DPDK ring port (name must start with - ``dpdkr`` and end with portid, e.g. ``dpdkr0``) - - * ``OVSDPDKVhostUserPort`` if ```` is a DPDK vhost-user port - - * ``OVSDPDKBond`` if ```` is an OVS DPDK bond. - -OVS_BRIDGE - If TYPE is anything other than "OVSBridge", set to the name of the OVS bridge - to which the port should be attached. - -OVS_OPTIONS - Optionally, extra options to set in the "Port" table when adding the port to - the bridge, as a sequence of column[:key]=value options. For example, - "tag=100" to make the port an access port for VLAN 100. See the - documentation of "add-port" in ovs-vsctl(8) for syntax and the section on the - Port table in ovs-vswitchd.conf.db(5) for available options. - -OVS_EXTRA - Optionally, additional ovs-vsctl commands, separated by ``--`` (double dash). - -BOND_IFACES - For "OVSBond" and "OVSDPDKBond" interfaces, a list of physical interfaces to - bond together. - -OVS_TUNNEL_TYPE - For "OVSTunnel" interfaces, the type of the tunnel. For example, "gre", - "vxlan", etc. - -OVS_TUNNEL_OPTIONS - For "OVSTunnel" interfaces, this field should be used to specify the tunnel - options like remote_ip, key, etc. - -OVS_PATCH_PEER - For "OVSPatchPort" devices, this field specifies the patch's peer on the - other bridge. - -OVS_PORT_MODE - For "OVSDPDKVhostUserPort" devices, this field can be set to "client" which - indicates that the port will be used in client mode. - -OVS_PORT_PATH - For "OVSDPDKVhostUserPort" devices, this field specifies the path to the - vhost-user server socket. It will only be used if OVS_PORT_MODE is set to - "client". - -Note ----- - -* ``ifdown`` on a bridge will not bring individual ports on the bridge down. - "ifup" on a bridge will not add ports to the bridge. This behavior should be - compatible with standard bridges (with ``TYPE=Bridge``). - -* If ``ifup`` on an interface is called multiple times, one can see ``RTNETLINK - answers: File exists`` printed on the console. This comes from ifup-eth - trying to add zeroconf route multiple times and is harmless. - -* ``ifup`` on OVSDPDKPort or OVSDPDKBond may result in change of bridge mac address. - Since OVS changes the device state to DOWN before changing its mac address this - result in loss of bridge configuration (e.g. routes). ``ifup-ovs`` perform post-up - operation on the bridge again to restore configuration. - -Examples --------- - -Standalone bridge: - -:: - - ==> ifcfg-ovsbridge0 <== - DEVICE=ovsbridge0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSBridge - BOOTPROTO=static - IPADDR=A.B.C.D - NETMASK=X.Y.Z.0 - HOTPLUG=no - -Enable DHCP on the bridge: - -* Needs ``OVSBOOTPROTO`` instead of ``BOOTPROTO``. -* All the interfaces that can reach the DHCP server as a space separated list - in ``OVSDHCPINTERFACES``. - -:: - - DEVICE=ovsbridge0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSBridge - OVSBOOTPROTO="dhcp" - OVSDHCPINTERFACES="eth0" - HOTPLUG=no - - -Adding Internal Port to ovsbridge0: - -:: - - ==> ifcfg-intbr0 <== - DEVICE=intbr0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSIntPort - OVS_BRIDGE=ovsbridge0 - HOTPLUG=no - -Internal Port with fixed IP address: - -:: - - DEVICE=intbr0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSIntPort - OVS_BRIDGE=ovsbridge0 - BOOTPROTO=static - IPADDR=A.B.C.D - NETMASK=X.Y.Z.0 - HOTPLUG=no - -Internal Port with DHCP: - -* Needs ``OVSBOOTPROTO`` or ``BOOTPROTO``. -* All the interfaces that can reach the DHCP server as a space separated list - in ``OVSDHCPINTERFACES``. - -:: - - DEVICE=intbr0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSIntPort - OVS_BRIDGE=ovsbridge0 - OVSBOOTPROTO="dhcp" - OVSDHCPINTERFACES="eth0" - HOTPLUG=no - -Adding physical ``eth0`` to ``ovsbridge0`` described above: - -:: - - ==> ifcfg-eth0 <== - DEVICE=eth0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSPort - OVS_BRIDGE=ovsbridge0 - BOOTPROTO=none - HOTPLUG=no - -Tagged VLAN interface on top of ``ovsbridge0``: - -:: - - ==> ifcfg-vlan100 <== - DEVICE=vlan100 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSIntPort - BOOTPROTO=static - IPADDR=A.B.C.D - NETMASK=X.Y.Z.0 - OVS_BRIDGE=ovsbridge0 - OVS_OPTIONS="tag=100" - OVS_EXTRA="set Interface $DEVICE external-ids:iface-id=$(hostname -s)-$DEVICE-vif" - HOTPLUG=no - -Bonding: - -:: - - ==> ifcfg-bond0 <== - DEVICE=bond0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSBond - OVS_BRIDGE=ovsbridge0 - BOOTPROTO=none - BOND_IFACES="gige-1b-0 gige-1b-1 gige-21-0 gige-21-1" - OVS_OPTIONS="bond_mode=balance-tcp lacp=active" - HOTPLUG=no - -:: - - ==> ifcfg-gige-* <== - DEVICE=gige-* - ONBOOT=yes - HOTPLUG=no - -An Open vSwitch Tunnel: - -:: - - ==> ifcfg-gre0 <== - DEVICE=ovs-gre0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSTunnel - OVS_BRIDGE=ovsbridge0 - OVS_TUNNEL_TYPE=gre - OVS_TUNNEL_OPTIONS="options:remote_ip=A.B.C.D" - -Patch Ports: - -:: - - ==> ifcfg-patch-ovs-0 <== - DEVICE=patch-ovs-0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSPatchPort - OVS_BRIDGE=ovsbridge0 - OVS_PATCH_PEER=patch-ovs-1 - -:: - - ==> ifcfg-patch-ovs-1 <== - DEVICE=patch-ovs-1 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSPatchPort - OVS_BRIDGE=ovsbridge1 - OVS_PATCH_PEER=patch-ovs-0 - -User bridge: - -:: - - ==> ifcfg-obr0 <== - DEVICE=obr0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSUserBridge - BOOTPROTO=static - IPADDR=A.B.C.D - NETMASK=X.Y.Z.0 - HOTPLUG=no - -DPDK NIC port: - -:: - - ==> ifcfg-dpdk0 <== - DPDK vhost-user port: - DEVICE=dpdk0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSDPDKPort - OVS_BRIDGE=obr0 - -:: - - ==> ifcfg-vhu0 <== - DEVICE=vhu0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSDPDKVhostUserPort - OVS_BRIDGE=obr0 - -:: - - ==> ifcfg-bond0 <== - DEVICE=bond0 - ONBOOT=yes - DEVICETYPE=ovs - TYPE=OVSDPDKBond - OVS_BRIDGE=ovsbridge0 - BOOTPROTO=none - BOND_IFACES="dpdk0 dpdk1" - OVS_OPTIONS="bond_mode=active-backup" - HOTPLUG=no - - -Red Hat systemd integration ---------------------------- - -The RPM packages for Open vSwitch provide support for systemd integration. It's -recommended to use the openvswitch.service to start and stop the Open vSwitch -daemons. The below table shows systemd's behavior: - -=============================== ============== ============== ============== =============== =============== - - Process Status systemctl <> status -------------------------------- ----------------------------- ---------------------------------------------- -Action ovs-vswitch ovsdb-server openvswitch ovs-vswitchd ovsdb-server -=============================== ============== ============== ============== =============== =============== -systemctl start openvswitch* started started active, exited active, running active, running -crash of vswitchd crash, started re-started active, exited active, running active, running -crash of ovsdb re-started crash, started active, exited active, running active, running -systemctl restart openvswitch re-started re-started active, exited active, running active, running -systemctl restart ovs-vswitchd re-started re-started active, exited active, running active, running -systemctl restart ovsdb-server re-started re-started active, exited active, running active, running -systemctl stop openvswitch stopped stopped inactive, dead inactive, dead inactive, dead -systemctl stop ovs-vswitchd stopped stopped inactive, dead inactive, dead inactive, dead -systemctl stop ovsdb-server stopped stopped inactive, dead inactive, dead inactive, dead -systemctl start ovs-vswitchd* started started inactive, dead active, running active, running -systemctl start ovsdb-server* not started started inactive, dead inactive, dead active, running -=============================== ============== ============== ============== =============== =============== - - -\* These commands where executed when no Open vSwitch related processes where -running. All other commands where executed when Open vSwitch was successfully -running. - - -Non-root User Support ------------------------ -Fedora and RHEL support running the Open vSwitch daemons as a non-root user. -By default, a fresh installation will create an *openvswitch* user, along -with any additional support groups needed (such as *hugetlbfs* for DPDK -support). - -This is controlled by modifying the ``OVS_USER_ID`` option. Setting this -to 'root:root', or commenting the variable out will revert this behavior. - - -Reporting Bugs --------------- - -Please report problems to bugs@openvswitch.org. diff --git a/rhel/automake.mk b/rhel/automake.mk index 992de3dc70..445dcd2fd4 100644 --- a/rhel/automake.mk +++ b/rhel/automake.mk @@ -6,7 +6,6 @@ # without warranty of any kind. EXTRA_DIST += \ - rhel/README.RHEL.rst \ rhel/automake.mk \ rhel/etc_logrotate.d_ovn \ rhel/ovn-fedora.spec \