All of lore.kernel.org
 help / color / mirror / Atom feed
* Openvswitch 2.13 and python3
@ 2020-04-07 14:57 Éloi Bail
  2020-04-14 19:02 ` [meta-virtualization] " Mark Asselstine
  0 siblings, 1 reply; 4+ messages in thread
From: Éloi Bail @ 2020-04-07 14:57 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]

Hi guys, 

I am integrating ovs/dpdk on Yocto Zeus. 
As I am using a custom Linux Kernel 4.19, I can't use ovs 2.11 and used the mainline version. 

FYI I struggled with EXTRA_OECONF to point to my Linux Kernel as mentionned in [ http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/recipes-networking/openvswitch/openvswitch.inc?h=master#n45 | Openvswitch recipe ] . 
EXTRA_OECONF_append_pn-openvswitch needs to be used in distro instead of EXTRA_OECONF_pn-openvswitch += 

Now my ovs/dpdk is correctly installed on my Yocto image. 

However, ovs utilities seem to have wrong shebang (#! python3). The shebang is based on PYTHON3 variable. For instance: [ https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1 | https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1 ] 
PYTHON3 variable is provided in EXTRA_OECONF from openvswitch.inc: 
EXTRA_OECONF += "\
	PYTHON=python3 \
	PYTHON3=python3 \
	PERL=${bindir}/perl \
	" 

Did you encounter this issue ? 

Also, OVS utilities - including test tools - still use python2 syntax but Openvswitch recipe RDEPEND on python3 only. I don't know if it is a known issue. 
I know that some recent work on python3 migration was done by ovs team but AFAIK, utilities scripts would require some work. 
I will give a try to migrate those scripts with [ https://docs.python.org/3.8/library/2to3.html | 2to3 ] tool. 

Please do not hesitate to contact me if you need some clarification. 

BR, 

Eloi 



[-- Attachment #2: Type: text/html, Size: 2441 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-virtualization] Openvswitch 2.13 and python3
  2020-04-07 14:57 Openvswitch 2.13 and python3 Éloi Bail
@ 2020-04-14 19:02 ` Mark Asselstine
  2020-04-15  6:45   ` Éloi Bail
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Asselstine @ 2020-04-14 19:02 UTC (permalink / raw)
  To: Éloi Bail; +Cc: meta-virtualization

On Tue, Apr 7, 2020 at 10:57 AM Éloi Bail
<eloi.bail@savoirfairelinux.com> wrote:
>
> Hi guys,
>
> I am integrating ovs/dpdk on Yocto Zeus.
> As I am using a custom Linux Kernel 4.19, I can't use ovs 2.11 and used the mainline version.
>
> FYI I struggled with EXTRA_OECONF to point to my Linux Kernel as mentionned in Openvswitch recipe.
> EXTRA_OECONF_append_pn-openvswitch  needs to be used in distro instead of EXTRA_OECONF_pn-openvswitch +=
>
> Now my ovs/dpdk is correctly installed on my Yocto image.
>
> However, ovs utilities seem to have wrong shebang (#! python3). The shebang is based on PYTHON3 variable. For instance: https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1
> PYTHON3 variable is provided in EXTRA_OECONF from openvswitch.inc:
>
> EXTRA_OECONF += "\
> PYTHON=python3 \
> PYTHON3=python3 \
> PERL=${bindir}/perl \
> "
>
> Did you encounter this issue ?
>
> Also, OVS utilities - including test tools - still use python2 syntax but Openvswitch recipe RDEPEND on python3 only. I don't know if it is a known issue.
> I know that some recent work on python3 migration was done by ovs team but AFAIK, utilities scripts would require some work.
> I will give a try to migrate those scripts with 2to3 tool.

We switched to use Python3 exclusively with OVS for quite a while now.
With the Yocto Project being mostly used in embedded environments size
was the driving factor, having py2 and py3 present was not desirable.
With Python2 being EOL'd at this point I suspect the upstream OVS
community will soon remove any traces of python2 from the project.
There is no value in spending any time on py2 with OVS at this point.
The package will build and operate just fine as it is.

Mark

>
> Please do not hesitate to contact me if you need some clarification.
>
> BR,
>
> Eloi
>
>
>
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-virtualization] Openvswitch 2.13 and python3
  2020-04-14 19:02 ` [meta-virtualization] " Mark Asselstine
@ 2020-04-15  6:45   ` Éloi Bail
  2020-04-15 12:56     ` Mark Asselstine
  0 siblings, 1 reply; 4+ messages in thread
From: Éloi Bail @ 2020-04-15  6:45 UTC (permalink / raw)
  To: mark asselstine; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 2246 bytes --]

> On Tue, Apr 7, 2020 at 10:57 AM Éloi Bail
> <eloi.bail@savoirfairelinux.com> wrote:

> > Hi guys,

> > I am integrating ovs/dpdk on Yocto Zeus.
>> As I am using a custom Linux Kernel 4.19, I can't use ovs 2.11 and used the
> > mainline version.

>> FYI I struggled with EXTRA_OECONF to point to my Linux Kernel as mentionned in
> > Openvswitch recipe.
>> EXTRA_OECONF_append_pn-openvswitch needs to be used in distro instead of
> > EXTRA_OECONF_pn-openvswitch +=

> > Now my ovs/dpdk is correctly installed on my Yocto image.

>> However, ovs utilities seem to have wrong shebang (#! python3). The shebang is
>> based on PYTHON3 variable. For instance:
> > https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1
> > PYTHON3 variable is provided in EXTRA_OECONF from openvswitch.inc:

> > EXTRA_OECONF += "\
> > PYTHON=python3 \
> > PYTHON3=python3 \
> > PERL=${bindir}/perl \
> > "

> > Did you encounter this issue ?

>> Also, OVS utilities - including test tools - still use python2 syntax but
>> Openvswitch recipe RDEPEND on python3 only. I don't know if it is a known
> > issue.
>> I know that some recent work on python3 migration was done by ovs team but
> > AFAIK, utilities scripts would require some work.
> > I will give a try to migrate those scripts with 2to3 tool.

> We switched to use Python3 exclusively with OVS for quite a while now.
> With the Yocto Project being mostly used in embedded environments size
> was the driving factor, having py2 and py3 present was not desirable.
> With Python2 being EOL'd at this point I suspect the upstream OVS
> community will soon remove any traces of python2 from the project.
> There is no value in spending any time on py2 with OVS at this point.
> The package will build and operate just fine as it is.

> Mark
Hi Mark, 

I can't disagree with that. Python2 must be dropped ! The work needs to be done on OVS side. 
I was just wondering if you were aware of the limitations regarding the usage 
of python2 OVS test tools and if you had any feedback from OVS team. 

However, I believe that the shebang issue (set to #! python3) should be resolved in meta-virtualization. 
Did you also see this issue ? 

Eloi 

[-- Attachment #2: Type: text/html, Size: 3287 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-virtualization] Openvswitch 2.13 and python3
  2020-04-15  6:45   ` Éloi Bail
@ 2020-04-15 12:56     ` Mark Asselstine
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Asselstine @ 2020-04-15 12:56 UTC (permalink / raw)
  To: Éloi Bail; +Cc: meta-virtualization

On Wednesday, April 15, 2020 2:45:57 A.M. EDT Éloi Bail wrote:
> > On Tue, Apr 7, 2020 at 10:57 AM Éloi Bail
> > 
> > <eloi.bail@savoirfairelinux.com> wrote:
> > > Hi guys,
> > > 
> > > I am integrating ovs/dpdk on Yocto Zeus.
> >> 
> >> As I am using a custom Linux Kernel 4.19, I can't use ovs 2.11 and used
> >> the
> >> 
> > > mainline version.
> >> 
> >> FYI I struggled with EXTRA_OECONF to point to my Linux Kernel as
> >> mentionned in>> 
> > > Openvswitch recipe.
> >> 
> >> EXTRA_OECONF_append_pn-openvswitch needs to be used in distro instead of
> >> 
> > > EXTRA_OECONF_pn-openvswitch +=
> > > 
> > > Now my ovs/dpdk is correctly installed on my Yocto image.
> >> 
> >> However, ovs utilities seem to have wrong shebang (#! python3). The
> >> shebang is>> 
> >> based on PYTHON3 variable. For instance:
> > > https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1
> > > PYTHON3 variable is provided in EXTRA_OECONF from openvswitch.inc:
> > > 
> > > EXTRA_OECONF += "\
> > > PYTHON=python3 \
> > > PYTHON3=python3 \
> > > PERL=${bindir}/perl \
> > > "
> > > 
> > > Did you encounter this issue ?
> >> 
> >> Also, OVS utilities - including test tools - still use python2 syntax but
> >> Openvswitch recipe RDEPEND on python3 only. I don't know if it is a known
> >> 
> > > issue.
> >> 
> >> I know that some recent work on python3 migration was done by ovs team
> >> but
> >> 
> > > AFAIK, utilities scripts would require some work.
> > > I will give a try to migrate those scripts with 2to3 tool.
> > 
> > We switched to use Python3 exclusively with OVS for quite a while now.
> > With the Yocto Project being mostly used in embedded environments size
> > was the driving factor, having py2 and py3 present was not desirable.
> > With Python2 being EOL'd at this point I suspect the upstream OVS
> > community will soon remove any traces of python2 from the project.
> > There is no value in spending any time on py2 with OVS at this point.
> > The package will build and operate just fine as it is.
> > 
> > Mark
> 
> Hi Mark,
> 
> I can't disagree with that. Python2 must be dropped ! The work needs to be
> done on OVS side. I was just wondering if you were aware of the limitations
> regarding the usage of python2 OVS test tools and if you had any feedback
> from OVS team.
> 
> However, I believe that the shebang issue (set to #! python3) should be
> resolved in meta-virtualization. Did you also see this issue ?

We use OVS  extensively, for example as a VRF in meta-overc, and throughout 
many telco type deployments, but by no means do we make use of every tool or 
part of the project. We have run into no issues or failures, outside of 
ignoring the py2 test results. When we did first make the switch to py3 we did 
send some changes upstream and they were receptive to moving to py3 as 
default, even well before py2 EOL was even being discussed.

If you did run into issues I would suggest you try to upstream them or send 
them to the list. If they are reasonable I am sure Bruce would have no issue 
hosting them on meta-virtualization.

Mark

> 
> Eloi





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-15 12:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 14:57 Openvswitch 2.13 and python3 Éloi Bail
2020-04-14 19:02 ` [meta-virtualization] " Mark Asselstine
2020-04-15  6:45   ` Éloi Bail
2020-04-15 12:56     ` Mark Asselstine

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.