Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 324589

Summary: openvswitch new package
Product: Gentoo Linux Reporter: Etaoin Shrdlu <shrdlu>
Component: New packagesAssignee: Tiziano Müller (RETIRED) <dev-zero>
Status: RESOLVED FIXED    
Severity: enhancement CC: alexanderyt, andreis.vinogradovs, cassio, dev-zero, gentoo, gentoo, hauschild.markus, kamil, manschwetus, xmw
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: sunrise-suggested
Package list:
Runtime testing required: ---
Attachments: first try of openvswitch ebuild
net-misc/openvswitch/openvswitch-1.2.0.ebuild
net-misc/openvswitch/files/ovsdb-server
net-misc/openvswitch/files/ovs-vswitchd
net-misc/openvswitch/files/ovsdb-server_conf
net-misc/openvswitch/files/ovs-vswitchd_conf
net-misc/openvswitch/openvswitch-1.4.0.ebuild
net-misc/openvswitch/openvswitch-9999.ebuild
net-misc/openvswitch/openvswitch-1.4.0-r1.ebuild
net-misc/openvswitch/openvswitch-1.4.0-r2.ebuild
net-misc/openvswitch/files/ovs-brcompatd

Description Etaoin Shrdlu 2010-06-18 12:23:16 UTC
If would be great to have an ebuild for openvswitch (http://openvswitch.org/) in portage. Quite cool and supports the most popular virtualization technologies.

Reproducible: Always
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-06-22 09:19:30 UTC
Hello, The Gentoo Team would like to firstly thank you for your ebuild 
submission. We also apologize for not being able to accommodate you in a timely
manner. There are simply too many new packages.

Allow me to use this opportunity to introduce you to Gentoo Sunrise. The 
sunrise overlay[1] is a overlay for Gentoo which we allow trusted users to 
commit to and all users can have ebuilds reviewed by Gentoo devs for entry 
into the overlay. So, the sunrise team is suggesting that you look into this 
and submit your ebuild to the overlay where even *you* can commit to. =)

Thanks,
On behalf of the Gentoo Sunrise Team,
Michael.

[1]: http://www.gentoo.org/proj/en/sunrise/
[2]: http://overlays.gentoo.org/proj/sunrise/wiki/SunriseFaq
Comment 2 Florian Manschwetus 2011-08-11 10:54:38 UTC
ok first, lots of information is given here http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.Linux;hb=HEAD
Comment 3 Florian Manschwetus 2011-08-11 10:55:16 UTC
Created attachment 282907 [details]
first try of openvswitch ebuild
Comment 4 Florian Manschwetus 2011-08-13 14:19:00 UTC
Created attachment 283171 [details]
net-misc/openvswitch/openvswitch-1.2.0.ebuild

More sophisticated ebuild
Comment 5 Florian Manschwetus 2011-08-13 14:20:20 UTC
Created attachment 283173 [details]
net-misc/openvswitch/files/ovsdb-server

init-script for db-server
Comment 6 Florian Manschwetus 2011-08-13 14:20:56 UTC
Created attachment 283177 [details]
net-misc/openvswitch/files/ovs-vswitchd

init-script for ovs-vswitchd
Comment 7 Florian Manschwetus 2011-08-13 14:21:40 UTC
Created attachment 283179 [details]
net-misc/openvswitch/files/ovsdb-server_conf

Service configuration for ovsdb-server
Comment 8 Florian Manschwetus 2011-08-13 14:22:10 UTC
Created attachment 283181 [details]
net-misc/openvswitch/files/ovs-vswitchd_conf

Service configuration for ovs-vswitchd
Comment 9 Florian Manschwetus 2011-08-13 14:23:19 UTC
Would be nice if someone with more ebuild experience could review this
Comment 10 Tiziano Müller (RETIRED) gentoo-dev 2011-12-18 20:50:37 UTC
as a side-node: I've added the init.d-scripts to my version of the ebuild in my dev-overlay. I hope I can look at them again and then move the ebuild to the tree.
Comment 11 Florian Manschwetus 2011-12-18 21:13:56 UTC
The ebuild works fine by renaming for 1.3.0 => just bumpp
Comment 12 Florian Manschwetus 2012-02-01 15:35:37 UTC
Created attachment 300669 [details]
net-misc/openvswitch/openvswitch-1.4.0.ebuild

updated open-vswitch ebuild, need to add test/hint for inkernel datapath when using >=linux-3.3
Comment 13 Florian Manschwetus 2012-02-01 15:36:03 UTC
Created attachment 300671 [details]
net-misc/openvswitch/openvswitch-9999.ebuild

live ebuild for openvswitch, need to add test/hint for inkernel datapath when using >=linux-3.3
Comment 14 Florian Manschwetus 2012-03-20 14:30:40 UTC
I'm currently working on patches for xen adding openvswitch support, I'll attach them tomorrow, they are working most of the way, just rmeoving the hvm-qemu tap interfaces fails for some reason, maybe I have time to dig into it (hint have a look for epatch_user to add this in a comfortable way). Additionally I started adding kernel-3.3 support, it works but I guess I somehow missusing the linux_info eclass
Comment 15 Florian Manschwetus 2012-03-20 14:31:29 UTC
Created attachment 305983 [details]
net-misc/openvswitch/openvswitch-1.4.0-r1.ebuild

see comment above ;)
Comment 16 Florian Manschwetus 2012-03-20 14:45:06 UTC
(In reply to comment #10)
> as a side-node: I've added the init.d-scripts to my version of the ebuild in
> my dev-overlay. I hope I can look at them again and then move the ebuild to
> the tree.

If I get it tomorrow. I'll merge my stuff with yours, to get to a common base.
Comment 17 Peter Große 2012-03-20 17:39:04 UTC
Created attachment 306033 [details]
net-misc/openvswitch/openvswitch-1.4.0-r2.ebuild

Added patched ebuild based on your work.

Changes:
* use python eclass and depend on python:2 since parts of openvswitch are not yet compatible to python:3
* add tcpdump as configurable runtime dependency (see README)
* add support for brcompat module (bridge compatibility layer) and related init script
* changed socket path from /var/lib/run/openvswitch to /var/run/openvswitch

Works fine with Xen 4.1.2 and vanilla kernel 3.2.5.

Ebuilds for openvswitch [1] and xen-tools [2] can be found in our little overlay. I should have filed bugs, I know...
Comment 18 Peter Große 2012-03-20 17:39:43 UTC
Created attachment 306035 [details]
net-misc/openvswitch/files/ovs-brcompatd
Comment 20 Florian Manschwetus 2012-03-20 22:04:35 UTC
(In reply to comment #17)
> Created attachment 306033 [details]
> net-misc/openvswitch/openvswitch-1.4.0-r2.ebuild
> 
> Added patched ebuild based on your work.
> 
> Changes:
> * use python eclass and depend on python:2 since parts of openvswitch are
> not yet compatible to python:3
> * add tcpdump as configurable runtime dependency (see README)
> * add support for brcompat module (bridge compatibility layer) and related
> init script
> * changed socket path from /var/lib/run/openvswitch to /var/run/openvswitch
> 
> Works fine with Xen 4.1.2 and vanilla kernel 3.2.5.
> 
> Ebuilds for openvswitch [1] and xen-tools [2] can be found in our little
> overlay. I should have filed bugs, I know...

Nice work, thx. I'll try to get a complete round up including the work of Tiziano tomorrow. Afterwards I'll cleanup the bug and provide also a new live ebuild. Hope now this hits tree fast as ovs has become a vanilla feature ;)
Comment 21 Florian Manschwetus 2012-03-20 22:08:41 UTC
Have had a short look at Peters xen-tools patches, really interesting, I modified existing scripts adding autodetection for ovs / brctl
Comment 22 Keith Amidon 2012-05-25 22:37:29 UTC
I'm running OVS on a laptop providing networking to some KVM VMs.  Occasionally, when the laptop is heavily loaded, networking performance will suffer excessively.  I believe this is due to the ovs-vswitchd being involved in flow setup and being starved for CPU.  I've been running with a tweaked version of the openvswitch-1.4.0-r2.ebuild attached here that is been revbumped to version 1.4.1 (which was released May 2nd) and which adds the following to /etc/conf.d/ovs-vswitchd.conf:

# The ovs-vswitchd process is involved in new flow creation.  If it
# is starved by other processes then networking will suffer which may
# further affect overall system performance.  Running ovs-vswitchd at
# a higher priority can mitigate this impact.
NICE_LEVEL=-10

and the following change to start() in /etc/init.d/ovs-vswitchd.conf:

start() {
	ebegin "Starting Open vSwitch daemon"
	start-stop-daemon --nice ${NICE_LEVEL} --start --quiet --exec /usr/sbin/ovs-vswitchd -- --pidfile --detach ${DB_SOCKET}
	eend ${?}
}

This setup seems to have resolved the issues I was experiencing.  It would be great if these changes could be incorporated into the consolidated ebuild that is in the works.
Comment 23 Tiziano Müller (RETIRED) gentoo-dev 2012-06-27 08:50:26 UTC
Version 1.6.1 (for kernel 3.3+) is now in the tree.
Thanks everyone.