[ovs-discuss] RHEL patch to support GRE tunnels

Gurucharan Shetty shettyg at nicira.com
Mon Oct 14 22:49:39 UTC 2013


On Mon, Oct 14, 2013 at 12:21 PM, Madko <madko77 at gmail.com> wrote:
> Thank you Gurucharan,
>
> is it also possible to add this tiny nano patch ?
>
> --- rhel/openvswitch.spec.in    2013-10-15 04:57:10.434000000 +0200
> +++ ../../openvswitch-1.9.3/rhel/openvswitch.spec.in    2013-10-15
> 05:00:34.141000000 +0200
> @@ -19,6 +19,7 @@
>  Source: openvswitch-%{version}.tar.gz
>  Buildroot: /tmp/openvswitch-rpm
>  Requires: openvswitch-kmod, logrotate, python
> +BuildRequires: openssl-devel
>
>  %description
>  Open vSwitch provides standard network bridging functions and

I see how it can be useful. Do you mind sending the above patch to
dev at openvswitch.org?
You can  send it using "git send-email patch-name" with a subject, a
commit message
and a Signed-off-by name. Please read "SubmittingPatches" file to get
an idea on how to
to send a patch.

>
>
> To prevent the package to build if you don't have the openssl-devel package
> installed (which is the case by default on rhel) with a nice missing dependy
> error mentionning the name of the missing package. Or even better, to add
> the --with ssl option to rpmbuild with the following patch:
>
> --- git/openvswitch/rhel/openvswitch.spec.in    2013-10-15
> 05:07:13.339000000 +0200
> +++ ./openvswitch-1.9.3/rhel/openvswitch.spec.in    2013-10-15
> 05:27:46.798000000 +0200
> @@ -7,6 +7,8 @@
>  # notice and this notice are preserved.  This file is offered as-is,
>  # without warranty of any kind.
>
> +%bcond_without ssl
> +
>  Name: openvswitch
>  Summary: Open vSwitch daemon/database/utilities
>  Group: System Environment/Daemons
> @@ -19,6 +21,7 @@
>  Source: openvswitch-%{version}.tar.gz
>  Buildroot: /tmp/openvswitch-rpm
>  Requires: openvswitch-kmod, logrotate, python
> +%{?with_ssl:BuildRequires: openssl-devel}
>
>  %description
>  Open vSwitch provides standard network bridging functions and
> @@ -29,7 +32,7 @@
>  %setup -q
>
>  %build
> -./configure --prefix=/usr --sysconfdir=/etc
> --localstatedir=%{_localstatedir} --enable-ssl
> +./configure --prefix=/usr --sysconfdir=/etc
> --localstatedir=%{_localstatedir} %{?with_ssl:--enable-ssl}
>  make %{_smp_mflags}
>
> Then rpmbuild -bb openvswitch.spec still builds openvswitch with ssl
> enabled. rpmbuild -bb --with ssl openvswitch.spec does the same. But
> rpmbuild -bb --without ssl openvswitch.spec builds with no ssl support (and
> no buildRequires on openssl-devel of course). This patch was tested on
> RHEL6.

Between the first and second option, I would go with the first one.
But Ben may feel differently.
So if you want, you can send both of the patches.

>
>
> Best regards,
>
>
>
> 2013/10/14 Gurucharan Shetty <shettyg at nicira.com>
>>
>> Looks correct to me. I rebased this patch against master, added a
>> couple of documentation lines and sent it here for review with your
>> name added to AUTHORS.
>>
>> http://openvswitch.org/pipermail/dev/2013-October/032785.html
>>
>> On Fri, Oct 11, 2013 at 9:16 AM, Madko <madko77 at gmail.com> wrote:
>> > ok :)
>> >
>> > diff --git a/rhel/etc_sysconfig_network-scripts_ifdown-ovs
>> > b/rhel/etc_sysconfig_network-scripts_ifdown-ovs
>> > index d2a2f4b..8e768c8 100755
>> > --- a/rhel/etc_sysconfig_network-scripts_ifdown-ovs
>> > +++ b/rhel/etc_sysconfig_network-scripts_ifdown-ovs
>> > @@ -42,7 +42,7 @@ case "$TYPE" in
>> >
>> >                 retval=$?
>> >                 ovs-vsctl -t ${TIMEOUT} -- --if-exists del-br "$DEVICE"
>> >                 ;;
>> > -       OVSPort|OVSIntPort|OVSBond)
>> > +       OVSPort|OVSIntPort|OVSBond|OVSTunnel)
>> >
>> >                 ${OTHERSCRIPT} ${CONFIG} $2
>> >                 retval=$?
>> >                 ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port
>> > "$OVS_BRIDGE" "$DEVICE"
>> > diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs
>> > b/rhel/etc_sysconfig_network-scripts_ifup-ovs
>> > index 8904c59..b30448b 100755
>> > --- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
>> > +++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
>> > @@ -117,6 +117,12 @@ case "$TYPE" in
>> >
>> >                 ${OTHERSCRIPT} ${CONFIG} ${2}
>> >                 OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
>> >                 ;;
>> > +       OVSTunnel)
>> > +               /sbin/ifup "$OVS_BRIDGE"
>> > +               ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port
>> > "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE"
>> > type=$OVS_TUNNEL_TYPE $OVS_TUNNEL_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
>> >
>> > +               ${OTHERSCRIPT} ${CONFIG} ${2}
>> > +               ;;
>> > +
>> >         *)
>> >                 echo $"Invalid OVS interface type $TYPE"
>> >                 exit 1
>> > diff --git a/rhel/README.RHEL b/rhel/README.RHEL
>> > index ba2774a..1dbce62 100644
>> > --- a/rhel/README.RHEL
>> > +++ b/rhel/README.RHEL
>> > @@ -125,6 +125,17 @@ DEVICE=gige-*
>> >  ONBOOT=yes
>> >  HOTPLUG=no
>> >
>> > +GRE 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"
>> > +
>> >  Reporting Bugs
>> >  --------------
>> >
>> > Signed-off-by: Edouard Bourguignon <madko at linuxed.net>
>> >
>> > I also add the exemple to the README.RHEL.
>> >
>> > btw, I know it's a bit off-topic, but do you know if it's possible to
>> > make
>> > an ovs gre port to point to an native gre interface on a remote host?
>> > The
>> > remote host doesn't have openvswitch... tcpdump shows some gre traffic
>> > on
>> > the remote host, but marked as "Unknown Ethernet type" or TEB on more
>> > recent
>> > tcpdump. Any idea?
>> >
>> >
>> > Best regards,
>> >
>> >
>> > 2013/10/11 Ben Pfaff <blp at nicira.com>
>> >>
>> >> On Fri, Oct 11, 2013 at 01:25:02PM +0200, Madko wrote:
>> >> > Sure, so I have to change TYPE=OVSGre to TYPE=OVSTunnel,
>> >> > OVS_GRE_OPTIONS
>> >> > to
>> >> > OVS_TUNNEL_OPTIONS and may be add a OVS_TUNNEL_TYPE to have something
>> >> > like:
>> >> > ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE"
>> >> > "$DEVICE"
>> >> > $OVS_OPTIONS -- set Interface "$DEVICE" type=$OVS_TUNNEL_TYPE
>> >> > $OVS_TUNNEL_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
>> >> >
>> >> > is that correct?
>> >>
>> >> That sounds good.
>> >
>> >
>> >
>> >
>> > --
>> > Edouard Bourguignon
>
>
>
>
> --
> Edouard Bourguignon



More information about the discuss mailing list