Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Open vSwitch 2.5 : kernel version newer than 4.3.x
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tuxdream
n00b
n00b


Joined: 23 Mar 2009
Posts: 35

PostPosted: Mon Sep 12, 2016 7:52 pm    Post subject: Open vSwitch 2.5 : kernel version newer than 4.3.x Reply with quote

Hi all,

I try to install Open Virtual Switch according to this article QEMU with Open vSwitch network.

But, the emerge command fails with this output :

Code:

 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.4.6-gentoo/build
 * Found sources for kernel version:
 *     4.4.6-gentoo
 * Checking for suitable kernel configuration options...
 *   CONFIG_IPV6:        is not set when it should be.
 *   CONFIG_OPENVSWITCH:         should not be set. But it is.
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.

 configure: error: Linux kernel in /lib/modules/4.4.6-gentoo/build is version 4.4.6, but version newer than 4.3.x is not supported (please refer to the FAQ for advice)


How to solve this issue ?
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1050
Location: Somewhere in Denmark

PostPosted: Mon Sep 12, 2016 8:50 pm    Post subject: Re: Open vSwitch 2.5 : kernel version newer than 4.3.x Reply with quote

tuxdream wrote:
Hi all,

I try to install Open Virtual Switch according to this article QEMU with Open vSwitch network.

But, the emerge command fails with this output :

Code:

 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.4.6-gentoo/build
 * Found sources for kernel version:
 *     4.4.6-gentoo
 * Checking for suitable kernel configuration options...
 *   CONFIG_IPV6:        is not set when it should be.
 *   CONFIG_OPENVSWITCH:         should not be set. But it is.
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.

 configure: error: Linux kernel in /lib/modules/4.4.6-gentoo/build is version 4.4.6, but version newer than 4.3.x is not supported (please refer to the FAQ for advice)


How to solve this issue ?


From the FAQ https://github.com/openvswitch/ovs/blob/master/FAQ.md#releases
Code:
Q: What Linux kernel versions does each Open vSwitch release work with?

A: The following table lists the Linux kernel versions against which the given versions of the Open vSwitch kernel module will successfully build. The Linux kernel versions are upstream kernel versions, so Linux kernels modified from the upstream sources may not build in some cases even if they are based on a supported version. This is most notably true of Red Hat Enterprise Linux (RHEL) kernels, which are extensively modified from upstream.

Open vSwitch   Linux kernel
1.4.x   2.6.18 to 3.2
1.5.x   2.6.18 to 3.2
1.6.x   2.6.18 to 3.2
1.7.x   2.6.18 to 3.3
1.8.x   2.6.18 to 3.4
1.9.x   2.6.18 to 3.8
1.10.x   2.6.18 to 3.8
1.11.x   2.6.18 to 3.8
2.0.x   2.6.32 to 3.10
2.1.x   2.6.32 to 3.11
2.3.x   2.6.32 to 3.14
2.4.x   2.6.32 to 4.0
2.5.x   2.6.32 to 4.3
2.6.x   3.10 to 4.7

Seems like you have to wait for OpenvSwitch 2.6.x for 4.3+ support (alternatively downgrade your kernel)

Although they also say that it should build by most kernels later than 2.6.32?

There is also this from the FAQ
Code:
Q: I get an error like this when I configure Open vSwitch:

   configure: error: Linux kernel in <dir> is version <x>, but
   version newer than <y> is not supported (please refer to the
   FAQ for advice)
What should I do?

A: You have the following options:

Use the Linux kernel module supplied with the kernel that you are using. (See also the following FAQ.)

If there is a newer released version of Open vSwitch, consider building that one, because it may support the kernel that you are building against. (To find out, consult the table in the previous FAQ.)

The Open vSwitch "master" branch may support the kernel that you are using, so consider building the kernel module from "master".

All versions of Open vSwitch userspace are compatible with all versions of the Open vSwitch kernel module, so you do not have to use the kernel module from one source along with the userspace programs from the same source.
Back to top
View user's profile Send private message
tuxdream
n00b
n00b


Joined: 23 Mar 2009
Posts: 35

PostPosted: Tue Sep 13, 2016 8:32 pm    Post subject: Reply with quote

Thanks Freke !

The version 2.6 seems to be already available : https://github.com/openvswitch/ovs/tree/branch-2.6
But the ebuild for OVS 2.6 is not yet available.

So, in waiting for the next version, I understand that we must install OVS 2.5 in userspace. I'm right ?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3493

PostPosted: Wed Sep 14, 2016 6:48 pm    Post subject: Reply with quote

Most ebuilds derive versions and URLs from their names.
Copy the most recent ebuild you have to your local overlay, bump the version number in it's name and run ebuild digest <ebuild name>.
Wait for it to build the manifest and cheer up, for you have just made (haha, stolen) your first ebuild! Bravo!
There's a good chance it will just work.
Back to top
View user's profile Send private message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 671

PostPosted: Wed Sep 14, 2016 9:21 pm    Post subject: Reply with quote

While there is a branch-2.6 in upstream git, there is no 2.6 release tarball AFAICT.

I had the same need to run openvswitch and didn't want to downgrade my 4.7.3 kernel that far, so I'm using a live ebuild from upstream git branch-2.6.

Here is the diff, not ready for general use because of two things I haven't yet taken the time to fully understand:
Code:
$ diff -u /usr/portage/net-misc/openvswitch/openvswitch-2.5.0.ebuild net-misc/openvswitch/openvswitch-9999.ebuild
--- /usr/portage/net-misc/openvswitch/openvswitch-2.5.0.ebuild  2016-09-07 13:43:57.817994201 -0700
+++ net-misc/openvswitch/openvswitch-9999.ebuild        2016-09-13 20:53:48.039354543 -0700
@@ -6,11 +6,13 @@
 
 PYTHON_COMPAT=( python2_7 )
 
-inherit eutils linux-info linux-mod python-single-r1 systemd autotools
+inherit git-r3 eutils linux-info linux-mod python-single-r1 systemd autotools
 
 DESCRIPTION="Production quality, multilayer virtual switch"
 HOMEPAGE="http://openvswitch.org"
-SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+SRC_URI=""
+EGIT_REPO_URI="git://github.com/openvswitch/ovs.git"
+EGIT_REPO_BRANCH="branch-2.6"
 
 LICENSE="Apache-2.0 GPL-2"
 SLOT="0"
@@ -42,7 +44,7 @@
        if use modules ; then
                CONFIG_CHECK+=" ~!OPENVSWITCH"
                kernel_is ge 2 6 32 || die "Linux >= 2.6.32 and <= 4.3 required for userspace modules"
-               kernel_is le 4 3 999 || die "Linux >= 2.6.32 and <= 4.3 required for userspace modules"
+               kernel_is le 4 8 999 || die "Linux >= 2.6.32 and <= 4.8 required for userspace modules"
                linux-mod_pkg_setup
        else
                CONFIG_CHECK+=" ~OPENVSWITCH"
@@ -53,9 +55,6 @@
 
 src_prepare() {
        # Never build kernelmodules, doing this manually
-       sed -i \
-               -e '/^SUBDIRS/d' \
-               datapath/Makefile.in || die "sed failed"
        epatch "${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
        eautoreconf
 }


1. I don't think there's an upper bound on kernel version when using this branch, I just picked 4.8.999 to get it working with a kernel_is le function I don't yet understand the semantics of.

2. I don't know why the 2.5.0 package doesn't build kernel modules, so I went ahead and built them. The Makefile.in sed target doesn't exist in upstream git branch-2.6, so something has to change here.

I'm unclear whether there's a distinction between the kernel module and various modules enabling non-core functionality. In any case, the above ebuild emerged successfully for me, TBD whether it is functioning correctly.

For convenience, here is the WIP openvswitch-9999.ebuild in its entirety. I'd be glad if a Gentoo Developer would comit an improved version to portage. Happy to file a bug if there's merit.

Code:
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

PYTHON_COMPAT=( python2_7 )

inherit git-r3 eutils linux-info linux-mod python-single-r1 systemd autotools

DESCRIPTION="Production quality, multilayer virtual switch"
HOMEPAGE="http://openvswitch.org"
SRC_URI=""
EGIT_REPO_URI="git://github.com/openvswitch/ovs.git"
EGIT_REPO_BRANCH="branch-2.6"

LICENSE="Apache-2.0 GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="debug modules monitor +ssl"

RDEPEND="
   || (
      >=sys-apps/openrc-0.10.5
      sys-apps/systemd
   )
   ssl? ( dev-libs/openssl:= )
   monitor? (
      ${PYTHON_DEPS}
      dev-python/twisted-core
      dev-python/twisted-conch
      dev-python/twisted-web
      dev-python/PyQt4[${PYTHON_USEDEP}]
      dev-python/zope-interface[${PYTHON_USEDEP}] )
   debug? ( dev-lang/perl )"
DEPEND="${RDEPEND}
   virtual/pkgconfig"

CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
BUILD_TARGETS="all"

pkg_setup() {
   if use modules ; then
      CONFIG_CHECK+=" ~!OPENVSWITCH"
      kernel_is ge 2 6 32 || die "Linux >= 2.6.32 and <= 4.3 required for userspace modules"
      kernel_is le 4 8 999 || die "Linux >= 2.6.32 and <= 4.8 required for userspace modules"
      linux-mod_pkg_setup
   else
      CONFIG_CHECK+=" ~OPENVSWITCH"
      linux-info_pkg_setup
   fi
   use monitor && python-single-r1_pkg_setup
}

src_prepare() {
   # Never build kernelmodules, doing this manually
   epatch "${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
   eautoreconf
}
src_configure() {
   set_arch_to_kernel
   use monitor || export ovs_cv_python="no"
   #pyside is staticly disabled
   export ovs_cv_pyuic4="no"

   local linux_config
   use modules && linux_config="--with-linux=${KV_OUT_DIR}"

   PYTHON=python2.7 econf ${linux_config} \
      --with-rundir=/var/run/openvswitch \
      --with-logdir=/var/log/openvswitch \
      --with-pkidir=/etc/ssl/openvswitch \
      --with-dbdir=/var/lib/openvswitch \
      $(use_enable ssl) \
      $(use_enable !debug ndebug)
}

src_compile() {
   default

#   use monitor && python_fix_shebang \
#      utilities/ovs-{pcap,tcpundump,test,vlan-test} \
#      utilities/bugtool/ovs-bugtool
   if use monitor; then
      sed -i \
         's/^#\!\ python2\.7/#\!\/usr\/bin\/env\ python2\.7/' \
         utilities/ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpundump,test,vlan-test} \
         utilities/bugtool/ovs-bugtool || die "sed died :("
   fi

   use modules && linux-mod_src_compile
}

src_install() {
   default

   if use monitor ; then
      python_domodule "${ED}"/usr/share/openvswitch/python/*
      rm -r "${ED}/usr/share/openvswitch/python"
      python_optimize "${ED}/usr/share/ovsdbmonitor"
   fi
   # not working without the brcompat_mod kernel module which did not get
   # included in the kernel and we can't build it anymore
   rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"

   keepdir /var/{lib,log}/openvswitch
   keepdir /etc/ssl/openvswitch
   fperms 0750 /etc/ssl/openvswitch

   rm -rf "${ED}/var/run"
   use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
   use debug || rm "${ED}/usr/bin/ovs-parse-leaks"

   newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
   newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
   newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
   newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd

   systemd_dounit "${FILESDIR}/ovsdb-server.service"
   systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
   systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf

   insinto /etc/logrotate.d
   newins rhel/etc_logrotate.d_openvswitch openvswitch

   use modules && linux-mod_src_install
}

pkg_postinst() {
   use modules && linux-mod_pkg_postinst

   for pv in ${REPLACING_VERSIONS}; do
      if ! version_is_at_least 1.9.0 ${pv} ; then
         ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
         ewarn "    /etc/openvswitch"
         ewarn "to"
         ewarn "    /var/lib/openvswitch"
         ewarn "Please copy/move the database manually before running the schema upgrade."
         ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
      fi
   done

   elog "Use the following command to create an initial database for ovsdb-server:"
   elog "   emerge --config =${CATEGORY}/${PF}"
   elog "(will create a database in /var/lib/openvswitch/conf.db)"
   elog "or to convert the database to the current schema after upgrading."
}

pkg_config() {
   local db="${EPREFIX}/var/lib/openvswitch/conf.db"
   if [ -e "${db}" ] ; then
      einfo "Database '${db}' already exists, doing schema migration..."
      einfo "(if the migration fails, make sure that ovsdb-server is not running)"
      "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
   else
      einfo "Creating new database '${db}'..."
      "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
   fi
}

The ebuild produces the following installed files:
Code:
sudo equery files openvswitch
 * Searching for openvswitch ...
 * Contents of net-misc/openvswitch-9999:
/etc
/etc/bash_completion.d
/etc/bash_completion.d/ovs-appctl-bashcomp.bash
/etc/bash_completion.d/ovs-vsctl-bashcomp.bash
/etc/conf.d
/etc/conf.d/ovs-vswitchd
/etc/conf.d/ovsdb-server
/etc/init.d
/etc/init.d/ovs-vswitchd
/etc/init.d/ovsdb-server
/etc/logrotate.d
/etc/logrotate.d/openvswitch
/etc/ssl
/etc/ssl/openvswitch
/etc/ssl/openvswitch/.keep_net-misc_openvswitch-0
/lib
/lib/modules
/lib/modules/4.7.3-gentoo
/lib/modules/4.7.3-gentoo/net
/lib/modules/4.7.3-gentoo/net/openvswitch.ko
/usr
/usr/bin
/usr/bin/ovn-controller
/usr/bin/ovn-controller-vtep
/usr/bin/ovn-docker-overlay-driver
/usr/bin/ovn-docker-underlay-driver
/usr/bin/ovn-nbctl
/usr/bin/ovn-northd
/usr/bin/ovn-sbctl
/usr/bin/ovn-trace
/usr/bin/ovs-appctl
/usr/bin/ovs-docker
/usr/bin/ovs-dpctl
/usr/bin/ovs-ofctl
/usr/bin/ovs-pki
/usr/bin/ovs-testcontroller
/usr/bin/ovs-vsctl
/usr/bin/ovsdb-client
/usr/bin/ovsdb-tool
/usr/bin/vtep-ctl
/usr/include
/usr/include/openflow
/usr/include/openflow/intel-ext.h
/usr/include/openflow/netronome-ext.h
/usr/include/openflow/nicira-ext.h
/usr/include/openflow/openflow-1.0.h
/usr/include/openflow/openflow-1.1.h
/usr/include/openflow/openflow-1.2.h
/usr/include/openflow/openflow-1.3.h
/usr/include/openflow/openflow-1.4.h
/usr/include/openflow/openflow-1.5.h
/usr/include/openflow/openflow-common.h
/usr/include/openflow/openflow.h
/usr/include/openvswitch
/usr/include/openvswitch/compiler.h
/usr/include/openvswitch/dynamic-string.h
/usr/include/openvswitch/flow.h
/usr/include/openvswitch/geneve.h
/usr/include/openvswitch/hmap.h
/usr/include/openvswitch/json.h
/usr/include/openvswitch/list.h
/usr/include/openvswitch/match.h
/usr/include/openvswitch/meta-flow.h
/usr/include/openvswitch/netdev.h
/usr/include/openvswitch/ofp-actions.h
/usr/include/openvswitch/ofp-errors.h
/usr/include/openvswitch/ofp-msgs.h
/usr/include/openvswitch/ofp-parse.h
/usr/include/openvswitch/ofp-print.h
/usr/include/openvswitch/ofp-prop.h
/usr/include/openvswitch/ofp-util.h
/usr/include/openvswitch/ofpbuf.h
/usr/include/openvswitch/packets.h
/usr/include/openvswitch/shash.h
/usr/include/openvswitch/thread.h
/usr/include/openvswitch/token-bucket.h
/usr/include/openvswitch/tun-metadata.h
/usr/include/openvswitch/type-props.h
/usr/include/openvswitch/types.h
/usr/include/openvswitch/util.h
/usr/include/openvswitch/uuid.h
/usr/include/openvswitch/vconn.h
/usr/include/openvswitch/version.h
/usr/include/openvswitch/vlog.h
/usr/include/ovn
/usr/include/ovn/actions.h
/usr/include/ovn/expr.h
/usr/include/ovn/lex.h
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/ovs-vswitchd.service
/usr/lib/systemd/system/ovsdb-server.service
/usr/lib/tmpfiles.d
/usr/lib/tmpfiles.d/openvswitch.conf
/usr/lib64
/usr/lib64/libofproto.a
/usr/lib64/libofproto.la
/usr/lib64/libopenvswitch.a
/usr/lib64/libopenvswitch.la
/usr/lib64/libovn.a
/usr/lib64/libovn.la
/usr/lib64/libovsdb.a
/usr/lib64/libovsdb.la
/usr/lib64/libsflow.a
/usr/lib64/libsflow.la
/usr/lib64/libvtep.a
/usr/lib64/libvtep.la
/usr/lib64/pkgconfig
/usr/lib64/pkgconfig/libofproto.pc
/usr/lib64/pkgconfig/libopenvswitch.pc
/usr/lib64/pkgconfig/libovsdb.pc
/usr/lib64/pkgconfig/libsflow.pc
/usr/sbin
/usr/sbin/ovs-vlan-bug-workaround
/usr/sbin/ovs-vswitchd
/usr/sbin/ovsdb-server
/usr/share
/usr/share/doc
/usr/share/doc/openvswitch-9999
/usr/share/doc/openvswitch-9999/AUTHORS.bz2
/usr/share/doc/openvswitch-9999/NEWS.bz2
/usr/share/doc/openvswitch-9999/README-lisp.md.bz2
/usr/share/doc/openvswitch-9999/README-native-tunneling.md.bz2
/usr/share/doc/openvswitch-9999/README.md.bz2
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/ovs-pcap.1.bz2
/usr/share/man/man1/ovs-tcpundump.1.bz2
/usr/share/man/man1/ovsdb-client.1.bz2
/usr/share/man/man1/ovsdb-server.1.bz2
/usr/share/man/man1/ovsdb-tool.1.bz2
/usr/share/man/man5
/usr/share/man/man5/ovn-nb.5.bz2
/usr/share/man/man5/ovn-sb.5.bz2
/usr/share/man/man5/ovs-vswitchd.conf.db.5.bz2
/usr/share/man/man5/vtep.5.bz2
/usr/share/man/man7
/usr/share/man/man7/ovn-architecture.7.bz2
/usr/share/man/man8
/usr/share/man/man8/ovn-controller-vtep.8.bz2
/usr/share/man/man8/ovn-controller.8.bz2
/usr/share/man/man8/ovn-ctl.8.bz2
/usr/share/man/man8/ovn-nbctl.8.bz2
/usr/share/man/man8/ovn-northd.8.bz2
/usr/share/man/man8/ovn-sbctl.8.bz2
/usr/share/man/man8/ovn-trace.8.bz2
/usr/share/man/man8/ovs-appctl.8.bz2
/usr/share/man/man8/ovs-ctl.8.bz2
/usr/share/man/man8/ovs-dpctl-top.8.bz2
/usr/share/man/man8/ovs-dpctl.8.bz2
/usr/share/man/man8/ovs-l3ping.8.bz2
/usr/share/man/man8/ovs-ofctl.8.bz2
/usr/share/man/man8/ovs-parse-backtrace.8.bz2
/usr/share/man/man8/ovs-pki.8.bz2
/usr/share/man/man8/ovs-tcpdump.8.bz2
/usr/share/man/man8/ovs-test.8.bz2
/usr/share/man/man8/ovs-testcontroller.8.bz2
/usr/share/man/man8/ovs-vlan-bug-workaround.8.bz2
/usr/share/man/man8/ovs-vlan-test.8.bz2
/usr/share/man/man8/ovs-vsctl.8.bz2
/usr/share/man/man8/ovs-vswitchd.8.bz2
/usr/share/man/man8/vtep-ctl.8.bz2
/usr/share/openvswitch
/usr/share/openvswitch/ovn-nb.ovsschema
/usr/share/openvswitch/ovn-sb.ovsschema
/usr/share/openvswitch/scripts
/usr/share/openvswitch/scripts/ovn-ctl
/usr/share/openvswitch/scripts/ovs-check-dead-ifs
/usr/share/openvswitch/scripts/ovs-ctl
/usr/share/openvswitch/scripts/ovs-lib
/usr/share/openvswitch/scripts/ovs-save
/usr/share/openvswitch/scripts/ovs-vtep
/usr/share/openvswitch/vswitch.ovsschema
/usr/share/openvswitch/vtep.ovsschema
/var
/var/lib
/var/lib/openvswitch
/var/lib/openvswitch/.keep_net-misc_openvswitch-0
/var/log
/var/log/openvswitch
/var/log/openvswitch/.keep_net-misc_openvswitch-0
Back to top
View user's profile Send private message
tuxdream
n00b
n00b


Joined: 23 Mar 2009
Posts: 35

PostPosted: Fri Sep 16, 2016 10:24 pm    Post subject: Reply with quote

I try this ebuild but I've an error :

Code:

 * Cannot find $EPATCH_SOURCE!  Value for $EPATCH_SOURCE is:
 *
 *   /usr/local/portage/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch
 *   ( xcp-interface-reconfigure-2.3.2.patch )

 * ERROR: net-misc/openvswitch-9999::x-portage failed (prepare phase):
 *   Cannot find $EPATCH_SOURCE!
 *
 * Call stack:
 *     ebuild.sh, line  133:  Called src_prepare
 *   environment, line 5458:  Called epatch '/usr/local/portage/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch'
 *   environment, line 2023:  Called die
 * The specific snippet of code:
 *                   die "Cannot find \$EPATCH_SOURCE!";
Back to top
View user's profile Send private message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 671

PostPosted: Sat Sep 17, 2016 3:48 am    Post subject: Reply with quote

You need to copy the files dir from /usr/portage/net-misc/openvswitch to the local overlay where you have your ebuild.
Back to top
View user's profile Send private message
tuxdream
n00b
n00b


Joined: 23 Mar 2009
Posts: 35

PostPosted: Sat Sep 17, 2016 10:41 am    Post subject: Reply with quote

I have this error with "modules" use flag :

Code:

In file included from /var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/compat/include/linux/kernel.h:4:0,
                 from include/linux/uio.h:12,
                 from include/linux/socket.h:7,
                 from /var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c:27:
/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c: In function ‘nf_ct_frag6_expire’:
include/linux/kernel.h:813:27: error: ‘struct net’ has no member named ‘nf_frag’
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                           ^
/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c:108:8: note: in expansion of macro ‘container_of’
  net = container_of(fq->q.net, struct net, nf_frag.frags);
        ^
include/linux/kernel.h:813:48: warning: initialization from incompatible pointer type
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                ^
/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c:108:8: note: in expansion of macro ‘container_of’
  net = container_of(fq->q.net, struct net, nf_frag.frags);
        ^
In file included from /var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/compat/include/linux/compiler-gcc.h:5:0,
                 from include/linux/compiler.h:56,
                 from /var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/compat/include/linux/compiler.h:4,
                 from include/uapi/linux/stddef.h:1,
                 from include/linux/stddef.h:4,
                 from /var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/compat/include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from include/uapi/linux/types.h:13,
                 from include/linux/types.h:5,
                 from /var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/compat/include/linux/types.h:4,
                 from /var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c:25:
include/linux/compiler-gcc.h:158:2: error: ‘struct net’ has no member named ‘nf_frag’
  __builtin_offsetof(a, b)
  ^
include/linux/stddef.h:16:32: note: in expansion of macro ‘__compiler_offsetof’
 #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                ^
include/linux/kernel.h:814:29: note: in expansion of macro ‘offsetof’
  (type *)( (char *)__mptr - offsetof(type,member) );})
                             ^
/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c:108:8: note: in expansion of macro ‘container_of’
  net = container_of(fq->q.net, struct net, nf_frag.frags);
        ^
/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c: In function ‘fq_find’:
/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c:135:25: error: ‘struct net’ has no member named ‘nf_frag’
  q = inet_frag_find(&net->nf_frag.frags, &nf_frags, &arg, hash);
                         ^
/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c: In function ‘nf_ct_net_exit’:
/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999/datapath/linux/nf_conntrack_reasm.c:562:26: error: ‘struct net’ has no member named ‘nf_frag’
  inet_frags_exit_net(&net->nf_frag.frags, &nf_frags);
                          ^


Here, the kernel configuration to solve this error :
Code:

  [*] Networking support  --->
        Networking options  --->
           <*>   The IPv6 protocol  --->
           [*] Network packet filtering framework (Netfilter)  --->
                  IPv6: Netfilter Configuration  --->
                     <*> IP6 tables support (required for filtering)
                     <*>   "frag" Fragmentation header match support
Back to top
View user's profile Send private message
tuxdream
n00b
n00b


Joined: 23 Mar 2009
Posts: 35

PostPosted: Sat Sep 17, 2016 5:31 pm    Post subject: Reply with quote

Here, the error with "Monitor" USE flag :

Code:

PYTHONPATH=./python":"$PYTHONPATH PMonitor USE flag :


PYTHONPATH=./python":"$PYTHONPATH PYTHONDONTWRITEBYTECODE=yes python2.7 ./ovsdb/ovsdb-doc \
        --er-diagram=ovn/ovn-nb.pic \
        --version=2.6.90 \
        ./ovn/ovn-nb.ovsschema \
        ./ovn/ovn-nb.xml > ovn/ovn-nb.5.tmp && \
mv ovn/ovn-nb.5.tmp ovn/ovn-nb.5
touch -c manpage-check
make[2]: Leaving directory '/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999'
make[1]: Leaving directory '/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999'
sed: no input files
/var/tmp/portage/net-misc/openvswitch-9999/temp/environment: line 5423: s/^#\!\ python2\.7/#\!\/usr\/bin\/env\ python2\.7/: No such file or directory
utilities/ovs-pcap: exactly 1 non-option argument required (use --help for help)
/var/tmp/portage/net-misc/openvswitch-9999/temp/environment: utilities/bugtool/ovs-bugtool: python2.7: bad interpreter: No such file or directory
 * ERROR: net-misc/openvswitch-9999::x-portage failed (compile phase):
 *   sed died :(
 *
 * Call stack:
 *     ebuild.sh, line 133:  Called src_compile
 *   environment, line 5425:  Called die
 * The specific snippet of code:
 *           utilities/bugtool/ovs-bugtool || die "sed died :(";
 *
 * If you need support, post the output of `emerge --info '=net-misc/openvswitch-9999::x-portage'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/openvswitch-9999::x-portage'`.
 * The complete build log is located at '/var/tmp/portage/net-misc/openvswitch-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/openvswitch-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999'
 * S: '/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999'

 * Messages for package net-misc/openvswitch-9999:

 * ERROR: net-misc/openvswitch-9999::x-portage failed (compile phase):
 *   sed died :(
 *
 * Call stack:
 *     ebuild.sh, line 133:  Called src_compile
 *   environment, line 5425:  Called die
 * The specific snippet of code:
 *           utilities/bugtool/ovs-bugtool || die "sed died :(";
 *
YTHONDONTWRITEBYTECODE=yes python2.7 ./ovsdb/ovsdb-doc \
        --er-diagram=ovn/ovn-nb.pic \
        --version=2.6.90 \
        ./ovn/ovn-nb.ovsschema \
        ./ovn/ovn-nb.xml > ovn/ovn-nb.5.tmp && \
mv ovn/ovn-nb.5.tmp ovn/ovn-nb.5
touch -c manpage-check
make[2]: Leaving directory '/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999'
make[1]: Leaving directory '/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999'
sed: no input files
/var/tmp/portage/net-misc/openvswitch-9999/temp/environment: line 5423: s/^#\!\ python2\.7/#\!\/usr\/bin\/env\ python2\.7/: No such file or directory
utilities/ovs-pcap: exactly 1 non-option argument required (use --help for help)
/var/tmp/portage/net-misc/openvswitch-9999/temp/environment: utilities/bugtool/ovs-bugtool: python2.7: bad interpreter: No such file or directory
 * ERROR: net-misc/openvswitch-9999::x-portage failed (compile phase):
 *   sed died :(
 *
 * Call stack:
 *     ebuild.sh, line 133:  Called src_compile
 *   environment, line 5425:  Called die
 * The specific snippet of code:
 *           utilities/bugtool/ovs-bugtool || die "sed died :(";
 *
 * If you need support, post the output of `emerge --info '=net-misc/openvswitch-9999::x-portage'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/openvswitch-9999::x-portage'`.
 * The complete build log is located at '/var/tmp/portage/net-misc/openvswitch-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/openvswitch-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999'
 * S: '/var/tmp/portage/net-misc/openvswitch-9999/work/openvswitch-9999'

 * Messages for package net-misc/openvswitch-9999:

 * ERROR: net-misc/openvswitch-9999::x-portage failed (compile phase):
 *   sed died :(
 *
 * Call stack:
 *     ebuild.sh, line 133:  Called src_compile
 *   environment, line 5425:  Called die
 * The specific snippet of code:
 *           utilities/bugtool/ovs-bugtool || die "sed died :(";
 *
Back to top
View user's profile Send private message
tuxdream
n00b
n00b


Joined: 23 Mar 2009
Posts: 35

PostPosted: Sat Sep 24, 2016 7:41 am    Post subject: Reply with quote

Hi everybody,

Now, I have "emerged" Open vSwitch 2.6.90 with success.

However, I can't start the services :

Code:

# systemctl start ovs-controller


Code:

# systemctl status ovs-controller
● ovs-controller.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)


Code:

# ls -la /usr/lib64/systemd/system/ovs*
-rw-r--r-- 1 root root 480 20 sept. 22:32 /usr/lib64/systemd/system/ovsdb-server.service
-rw-r--r-- 1 root root 307 20 sept. 22:32 /usr/lib64/systemd/system/ovs-vswitchd.service


The script for OVS controller is missing. :(
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 995
Location: Quebec, Canada

PostPosted: Thu Jan 26, 2017 10:47 pm    Post subject: Reply with quote

Documentation is out of date

ovs-vswitchd and ovsdb-server are the services you need to use now.
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum