# Open vSwitch 2.6

## tuxdream

For information, Open vSwitch 2.6.0 has been released yesterday !!!

Link :

http://openvswitch.org/pipermail/announce/2016-September/000087.html

http://openvswitch.org/releases/openvswitch-2.6.0.tar.gz

By the way, the version 2.5.1 is also released.

Now all that's missing is the ebduild.

----------

## fedeliallalinea

 *tuxdream wrote:*   

> Now all that's missing is the ebduild.

 

If you're in a rush you can try to create local overaly and copy ebuild of version 2.5.0 renaming with the new version, otherwise wait 24/48h to open new bug for version bump.

----------

## tuxdream

I have already done my local overlay for Open vSwitch 2.6.90. But now, I would like the official ebuild.

Thanks to Matthew, the ebuild is now available.

But,I have en error to emerge with "monitor" use flag

```

 * ERROR: net-misc/openvswitch-2.6.0::gentoo failed (install phase):

 *   No Python implementation set (EPYTHON is null).

 * 

 * Call stack:

 *     ebuild.sh, line  133:  Called src_install

 *   environment, line 5108:  Called python_domodule '/var/tmp/portage/net-misc/openvswitch-2.6.0/image//usr/share/openvswitch/python/ovs' '/var/tmp/portage/net-misc/openvswitch-2.6.0/image//usr/share/openvswitch/python/ovstest'

 *   environment, line 4175:  Called die

 * The specific snippet of code:

 *       [[ -n ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).';

 * 

  * QA Notice: command not found:

 * 

 *      /usr/portage/net-misc/openvswitch/openvswitch-2.6.0.ebuild: line 51: python-r1_pkg_setup: command not found

```

I use portage 2.3.0 with PYTHON_TARGETS="python2_7 python3_4".

How to install "python-r1_pkg_setup" ?

----------

## fedeliallalinea

 *tuxdream wrote:*   

> How to install "python-r1_pkg_setup" ?

 

python-r1_pkg_setup is not a package but a eclass function (you can find eclass in /usr/portage/eclass/). I believe is an error on ebuild at line 51:

```
use monitor && python-r1_pkg_setup
```

I think that correct code is or

```
use monitor && python-single-r1_pkg_setup
```

(like 2.5.0 ebuild version) or 

```
use monitor && python_pkg_setup
```

----------

## tuxdream

With "python_pkg_setup"

```

 * ERROR: net-misc/openvswitch-2.6.0::gentoo failed (setup phase):

 *   python_pkg_setup() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#pkg_setup

 * 

 * Call stack:

 *                  ebuild.sh, line 115:  Called pkg_setup

 *   openvswitch-2.6.0.ebuild, line  51:  Called python_pkg_setup

 *     python-utils-r1.eclass, line 1320:  Called die

 * The specific snippet of code:

 *      die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#pkg_setup"

 * 

 * If you need support, post the output of `emerge --info '=net-misc/openvswitch-2.6.0::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=net-misc/openvswitch-2.6.0::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/net-misc/openvswitch-2.6.0/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-misc/openvswitch-2.6.0/temp/die.env'.

 * Working directory: '/usr/lib64/python3.4/site-packages'

 * S: '/var/tmp/portage/net-misc/openvswitch-2.6.0/work/openvswitch-2.6.0'

```

With "python-single-r1_pkg_setup" :

```

 * ERROR: net-misc/openvswitch-2.6.0::gentoo failed (install phase):

 *   No Python implementation set (EPYTHON is null).

 * 

 * Call stack:

 *     ebuild.sh, line  115:  Called src_install

 *   environment, line 5109:  Called python_domodule '/var/tmp/portage/net-misc/openvswitch-2.6.0/image//usr/share/openvswitch/python/ovs' '/var/tmp/portage/net-misc/openvswitch-2.6.0/image//usr/share/openvswitch/python/ovstest'

 *   environment, line 4176:  Called die

 * The specific snippet of code:

 *       [[ -n ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).';

 * 

 * If you need support, post the output of `emerge --info '=net-misc/openvswitch-2.6.0::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=net-misc/openvswitch-2.6.0::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/net-misc/openvswitch-2.6.0/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-misc/openvswitch-2.6.0/temp/environment'.

 * Working directory: '/var/tmp/portage/net-misc/openvswitch-2.6.0/work/openvswitch-2.6.0'

 * S: '/var/tmp/portage/net-misc/openvswitch-2.6.0/work/openvswitch-2.6.0'

 * QA Notice: command not found:

 * 

 *      /usr/portage/net-misc/openvswitch/openvswitch-2.6.0.ebuild: line 51: python-single-r1_pkg_setup: command not found

```

----------

## fedeliallalinea

For use python-single-r1_pkg_setup function you need to change inherit line in ebuild from

```
inherit eutils linux-info linux-mod python-r1 systemd autotools
```

to

```
inherit eutils linux-info linux-mod python-single-r1 systemd autotools
```

----------

## tuxdream

```

# nano /usr/portage/net-misc/openvswitch/openvswitch-2.6.0.ebuild

line 09: inherit eutils linux-info linux-mod python-single-r1 systemd autotools

line 51: use monitor && python-single-r1_pkg_setup

```

```

# ebuild /usr/portage/net-misc/openvswitch/openvswitch-2.6.0.ebuild manifest

```

Now, I can emerge Open vSwitch.

----------

## tuxdream

first issue with OVS Database :

```

# start ovsdb-server

# systemctl status ovsdb-server

● ovsdb-server.service - Open vSwitch Database Server

   Loaded: loaded (/usr/lib64/systemd/system/ovsdb-server.service; static; vendor preset: disabled)

   Active: failed (Result: exit-code) since lun. 2016-10-03 19:51:07 CEST; 5s ago

     Docs: man:ovsdb-server

  Process: 19603 ExecStart=/usr/sbin/ovsdb-server --monitor --remote=punix:${DB_SOCKET} --remote=${REMOTE_DB} --private-key=${PRIVATE_KEY} --certificate=${CERTIFICATE} --bootstrap-ca-cert=${BOOTSTRAP_CA_CERT} (code=exited, status=1/FAILURE)

 Main PID: 19603 (code=exited, status=1/FAILURE)

ovsdb-server[19604]: ovs|00002|stream_unix|ERR|/var/run/openvswitch/db.sock: binding failed: No such file or directory

ovsdb-server[19604]: ovs|00003|ovsdb_jsonrpc_server|ERR|punix:/var/run/openvswitch/db.sock: listen failed: No such file or directory

ovsdb-server[19603]: 2016-10-03T17:51:07Z|00002|stream_unix|ERR|/var/run/openvswitch/db.sock: binding failed: No such file or directory

ovsdb-server[19603]: 2016-10-03T17:51:07Z|00003|ovsdb_jsonrpc_server|ERR|punix:/var/run/openvswitch/db.sock: listen failed: No such fil... directory

ovsdb-server[19603]: 2016-10-03T17:51:07Z|00004|fatal_signal|WARN|could not unlink "/var/run/openvswitch/ovsdb-server.19604.ctl" (No su...directory)

ovsdb-server[19603]: 2016-10-03T17:51:07Z|00005|stream_unix|ERR|/var/run/openvswitch/ovsdb-server.19604.ctl: binding failed: No such fi... directory

ovsdb-server[19603]: ovsdb-server: could not initialize control socket punix:/var/run/openvswitch/ovsdb-server.19604.ctl (No such file or directory)

systemd[1]: ovsdb-server.service: Main process exited, code=exited, status=1/FAILURE

systemd[1]: ovsdb-server.service: Unit entered failed state.

systemd[1]: ovsdb-server.service: Failed with result 'exit-code'.

```

Create the directory to solve this :

```

# mkdir /var/run/openvswitch/

```

----------

## hats0id

I even can not emerge openvswitch-2.6.0 on my system. Can you help me pls? I have got an error during compile:

```

SyntaxError: invalid syntax

  File "./ovsdb/ovsdb-idlc.in", line 135

    #include "uuid.h"''' % {'prefix': prefix.upper()}

                       ^

SyntaxError: invalid syntax

Makefile:6005: recipe for target 'lib/vswitch-idl.ovsidl' failed

make: *** [lib/vswitch-idl.ovsidl] Error 1

make: *** Waiting for unfinished jobs....

  File "./ovsdb/ovsdb-idlc.in", line 135

    #include "uuid.h"''' % {'prefix': prefix.upper()}

                       ^

SyntaxError: invalid syntax

Makefile:6342: recipe for target 'vtep/vtep-idl.ovsidl' failed

make: *** [vtep/vtep-idl.ovsidl] Error 1

Makefile:6171: recipe for target 'tests/idltest.ovsidl' failed

make: *** [tests/idltest.ovsidl] Error 1

  File "./ovsdb/ovsdb-idlc.in", line 135

    #include "uuid.h"''' % {'prefix': prefix.upper()}

```

----------

## davei

eselect python list

and set python2.7

 *hats0id wrote:*   

> I even can not emerge openvswitch-2.6.0 on my system. Can you help me pls? I have got an error during compile:
> 
> ```
> 
> SyntaxError: invalid syntax
> ...

 

----------

