Re: [ovs-discuss] Interface Type in Interface Table of OVS DB

2018-11-10 Thread Paul Greenberg
Ben,

It is 100% like that. In my case ovn-controller creates these geneve and vxlan 
interfaces, but it looks like that information never gets to Interface table, 
because “type” is empty there.

Best Regards,
Paul Greenberg


From: Ben Pfaff 
Sent: Saturday, November 10, 2018 2:29 PM
To: Paul Greenberg
Cc: ovs-discuss@openvswitch.org
Subject: Re: Interface Type in Interface Table of OVS DB

On Sat, Nov 10, 2018 at 07:15:02PM +, Paul Greenberg wrote:
> Hi Ben,
>
> Noticed the following behavior.
>
> When I run "ovs-vsctl list Interface", I get:
>
> > type : internal
>
> only for the bridge interface. The rest of the interface types are empty:
>
> > type : ""
>
> When I run "ovs-appctl dpif/show", the types are showing up properly, i.e. 
> system, geneve, vxlan.
>
> ovs_version: "2.10.90"
>
> Do you think this is a cosmetic bug?

I don't know any way you can have vxlan or geneve ports without setting
the interface type to vxlan or geneve. Please check again.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Interface Type in Interface Table of OVS DB

2018-11-10 Thread Paul Greenberg
Hi Ben,

Noticed the following behavior.

When I run "ovs-vsctl list Interface", I get:

> type: internal

only for the bridge interface. The rest of the interface types are empty:

> type: ""

When I run "ovs-appctl dpif/show", the types are showing up properly, i.e. 
system, geneve, vxlan.

ovs_version: "2.10.90"

Do you think this is a cosmetic bug?

Regards,
Paul




___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Prometheus Exporter for OVN

2018-10-16 Thread Paul Greenberg
Hi Vasiliy,

> Does it possible to monitor ovn service uptime? If uptime bigger then before 
> - service is restarted.

True, one can do that. Personally, I prefer gauges over counters for the 
monitoring.

> I think that it is not right way. Sometimes i want to write logs to syslog or 
> journald...

Then, you don't use that metric for alerting and scraping.

>  For what this mertic can be used? If i have debian and fedora systems and 
> this dir may changed over distributions

I run OVN on CentOS boxes and from time to time I change run_dir. It helps my 
awareness. If I do change run_dir, and it lasts for more than a day, I alert 
:-)

Regards,
Paul

From: Vasiliy Tolstov 
Sent: Friday, October 5, 2018 4:34 PM
To: green...@outlook.com
Cc: Василий Толстов; ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] Prometheus Exporter for OVN
 
>
> Here is the thinking on this one. The presence of pid file and the validation 
> that the process listed in the pid file are process checks. If the process is 
> 0, then it is down and one can monitor for that. Also, if the process ID of a 
> subsystem (say OVN NB) changed, then it means that service was restarted. I 
> guess the alert would be if a process is 0 or if the process ID changed, then 
> alert.
>

Does it possible to monitor ovn service uptime? If uptime bigger then
before - service is restarted.

> Per the log files. It happened on a number of occasions that a subsystem 
> crashed, but its process was still running. One way of detecting something 
> like that is watch for the log file being stale, i.e. log size does not 
> increment. There are obviously other ways to monitor that. Also, any spike in 
> log activity, i.e. sudden large increase in log file size, means something is 
> happening and it worth looking into it.

I think that it is not right way. Sometimes i want to write logs to
syslog or journald...

>
> > also system run dir. May be to monitor disk
> space, but i'm confused.
>
> That's really informational. Kinda know where system dir is.

For what this mertic can be used? If i have debian and fedora systems
and this dir may changed over distributions


--
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Prometheus Exporter for OVN

2018-10-03 Thread Paul Greenberg
Hi Vasiliy,

> Chassis info missed encap (useful) and options (may be useful).

Good point! Will add.

> Also pid file and log file path not useful (i don't understand how this use 
> in monitoring),

Here is the thinking on this one. The presence of pid file and the validation 
that the process listed in the pid file are process checks. If the process is 
0, then it is down and one can monitor for that. Also, if the process ID of a 
subsystem (say OVN NB) changed, then it means that service was restarted. I 
guess the alert would be if a process is 0 or if the process ID changed, then 
alert.

Per the log files. It happened on a number of occasions that a subsystem 
crashed, but its process was still running. One way of detecting something like 
that is watch for the log file being stale, i.e. log size does not increment. 
There are obviously other ways to monitor that. Also, any spike in log 
activity, i.e. sudden large increase in log file size, means something is 
happening and it worth looking into it.

> also system run dir. May be to monitor disk
space, but i'm confused.

That's really informational. Kinda know where system dir is.

Regards,
Paul

From: Vasiliy Tolstov 
Sent: Wednesday, October 3, 2018 7:20 AM
To: green...@outlook.com
Cc: Василий Толстов; ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] Prometheus Exporter for OVN
 
ср, 3 окт. 2018 г. в 2:35, Paul Greenberg :
>
> Hi Vasiliy,
>
> Thank you for the reply! I will take the conversation about the modifications 
> you mentioned into the repo.
>
> > I'm already have such splitting for libvirt exporter.
>
> Do you have the code published somewhere?

Yes, post link to repo issue.

>
> What metrics do you consider the most valuable when it comes to OVN (not 
> OVS)? Are they implemented?
>

Chassis info missed encap (useful) and options (may be useful).
Also pid file and log file path not useful (i don't understand how
this use in monitoring), also system run dir. May be to monitor disk
space, but i'm confused.


--
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] "ovs|01253|reconnect|ERR|tcp:127.0.0.1:50814: no response to inactivity probe after 5.01 seconds, disconnecting" messages and lost packets

2018-09-27 Thread Paul Greenberg
This specific error is triggered by the following. When a client connects to 
ovsdb json rpc server, it has to follow certain protocol. In this case, a the 
server sends probes, and the client must acknowledge them by sending the exact 
message it received from the server back to the server. If a client, does not 
do that in time, the server drops the client.

So something in this openstack driver is broken, because it does not respond to 
server probes.

Best Regards,
Paul Greenberg


From: 20230277700n behalf of
Sent: Thursday, September 27, 2018 3:40 PM
To: jp.met...@planethoster.info
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] "ovs|01253|reconnect|ERR|tcp:127.0.0.1:50814: no 
response to inactivity probe after 5.01 seconds, disconnecting" messages and 
lost packets


ovs-vswitchd is multi-threaded. ovsdb-server is single threaded.
(You did not answer my question about the file from which the logs were printed 
in your email)

Who is at 127.0.0.1:45928<http://127.0.0.1:45928/> and 
127.0.0.1:45930<http://127.0.0.1:45930/>?

On Thu, 27 Sep 2018 at 11:14, Jean-Philippe Méthot 
mailto:jp.met...@planethoster.info>> wrote:
Thank you for your reply.

This is Openstack with ml2 plugin. There’s no other 3rd party application used 
with our network, so no OVN or anything of the sort. Essentially, to give a 
quick idea of the topology, we have our vms on our compute nodes going through 
GRE tunnels toward network nodes where they are routed in network namespace 
toward a flat external network.

Generally, the above indicates that a daemon fronting a Open vSwitch database 
hasn't been able to connect to its client. Usually happens when CPU consumption 
is very high.

Our network nodes CPU are literally sleeping. Is openvswitch single-thread or 
multi-thread though? If ovs overloaded a single thread, it’s possible I may 
have missed it.

Jean-Philippe Méthot
Openstack system administrator
Administrateur système Openstack
PlanetHoster inc.




Le 27 sept. 2018 à 14:04, Guru Shetty mailto:g...@ovn.org>> a 
écrit :



On Wed, 26 Sep 2018 at 12:59, Jean-Philippe Méthot via discuss 
mailto:ovs-discuss@openvswitch.org>> wrote:
Hi,

I’ve been using openvswitch for my networking backend on openstack for several 
years now. Lately, as our network has grown, we’ve started noticing some 
intermittent packet drop accompanied with the following error message in 
openvswitch:

2018-09-26T04:15:20.676Z|5|reconnect|ERR|tcp:127.0.0.1:45928<http://127.0.0.1:45928/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:15:20.677Z|6|reconnect|ERR|tcp:127.0.0.1:45930<http://127.0.0.1:45930/>:
 no response to inactivity probe after 5 seconds, disconnecting

Open vSwitch is a project with multiple daemons. Since you are using OpenStack, 
it is not clear from your message, what type of networking plugin you are 
using. Do you use OVN?
Also, you did not mention from which file you have gotten the above errors.

Generally, the above indicates that a daemon fronting a Open vSwitch database 
hasn't been able to connect to its client. Usually happens when CPU consumption 
is very high.


2018-09-26T04:15:30.409Z|7|reconnect|ERR|tcp:127.0.0.1:45874<http://127.0.0.1:45874/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:15:33.661Z|8|reconnect|ERR|tcp:127.0.0.1:45934<http://127.0.0.1:45934/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:15:33.847Z|9|reconnect|ERR|tcp:127.0.0.1:45894<http://127.0.0.1:45894/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:16:03.247Z|00010|reconnect|ERR|tcp:127.0.0.1:45958<http://127.0.0.1:45958/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:16:21.534Z|00011|reconnect|ERR|tcp:127.0.0.1:45956<http://127.0.0.1:45956/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:16:21.786Z|00012|reconnect|ERR|tcp:127.0.0.1:45974<http://127.0.0.1:45974/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:16:47.085Z|00013|reconnect|ERR|tcp:127.0.0.1:45988<http://127.0.0.1:45988/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:16:49.618Z|00014|reconnect|ERR|tcp:127.0.0.1:45982<http://127.0.0.1:45982/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:16:53.321Z|00015|reconnect|ERR|tcp:127.0.0.1:45964<http://127.0.0.1:45964/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:17:15.543Z|00016|reconnect|ERR|tcp:127.0.0.1:45986<http://127.0.0.1:45986/>:
 no response to inactivity probe after 5 seconds, disconnecting
2018-09-26T04:17:24.767Z|00017|reconnect|ERR|tcp:127.0.0.1:45990<http://127.0.0.1:45990/>:
 no response to inactivity probe after 5 seconds,

[ovs-discuss] Prometheus Exporter for OVN

2018-09-26 Thread Paul Greenberg
For the people interested in the topic of monitoring OVN, please check out 
Prometheus exporter for OVN: ovn_exporter repo on github.

Tried including the metrics I thought relevant for the monitoring of OVN 
clustering/raft. Another helpful metric is "log_event_count". It is the number 
of recorded log messages associated with an OVN component by log severity level 
and source.

Anyone else using Prometheus for OVN monitoring? Statsd?

Best Regards,
Paul Greenberg
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] line 17: /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

2018-09-26 Thread Paul Greenberg
Hi Martin, thank you for the fix! It works :-) No issues.

Hi Ben, thank you for the “make dist” :-) will be using that going forward.

One thing that would be “nice to have” is auto-calculating “Release:” value in 
spec files. One way is counting the number of commits from the latest tag. Just 
a suggestion.

Best Regards,
Paul Greenberg


From: Ben Pfaff 
Sent: Thursday, September 20, 2018 5:50 PM
To: Paul Greenberg
Cc: Martin Xu; Gregory Rose; b...@openvswitch.org
Subject: Re: [ovs-discuss] line 17: 
/usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

On Thu, Sep 20, 2018 at 09:37:37PM +, Paul Greenberg wrote:
> Martin, here is how I do it:
>
> ./configure CFLAGS="-fPIC"
> make CFLAGS="-fPIC"

It's not necessary to put the CFLAGS setting on the "make" command line.
Since you set it on the configure command like, it will be the default
in the Makefile. You can see that with "grep":

blp@sigabrt:~/nicira/ovs/_tmp(0)$ grep ^CFLAGS Makefile
CFLAGS = -fPIC
blp@sigabrt:~/nicira/ovs/_tmp(0)$
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] line 17: /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

2018-09-20 Thread Paul Greenberg
Hi Martin, :+1.

You are running configure with the -fPIC flag. However, you also need to run 
make with it. If you do both, you will have the RPMs.

Best Regards,
Paul Greenberg


From: Martin Xu 
Sent: Thursday, September 20, 2018 5:09 PM
To: Paul Greenberg
Cc: Ben Pfaff; Gregory Rose; b...@openvswitch.org
Subject: Re: [ovs-discuss] line 17: 
/usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

Hi Paul,

Think I might have figured out what the problem is. The instructions on the 
blog: ./boot, ./configure and then make. Then making a tarball out of the 
result for the rpmbuild SOURCE.
By default, OVS uses /usr/local as the prefix, so during the "make" process, 
the @pkgdatadir@ is replaced by the /usr/local/share/openvswitch in the 
eventual file ovs-kmod-ctl (not the ovs-kmod-ctl.in<http://ovs-kmod-ctl.in>). I 
copied and pasted one line below from my command line while it's building:

-e 's,[@]pkgdatadir[@],/usr/local/share/openvswitch,g' \


This ovs-kmod-ctl is also packaged into the tarball and put int 
_topdir/SOURCES. So the subsequent command rpmbuild does not regenerate this 
file from ovs-kmod-ctl.in<http://ovs-kmod-ctl.in> . Now I don't know if that's 
a reasonable thing to do nor not in the build/compile world. What I usually do 
is "make dist" to generate the tarball, and it doesn't include this file, only 
the ovs-kmod-ctl. When I do rpmbuild, I can see it's replacing the pkgdatadir 
string with /usr/share/openvswitch.

I was not able to run through the instructions on that blog even with 
./configure CFLAGS="-fPIC". But I did an experiment with my own build, just add 
the ovs-kmod-ctl to the tarball. It didn't get regenerated.

As mentioned here on ovs website, you can change the prefix ./configure 
--prefix=/usr, then make. This time the ovs-kmod-ctl file has at line 17: . 
"/usr/share/openvswitch/scripts/ovs-lib" || exit 1
http://docs.openvswitch.org/en/latest/intro/install/general/#configuring

Since I ran into errors when I ran rpmbuild command, I couldn't verify my 
theory. I'm fairly confident it should solve your problem. I guess the question 
now is what changed since it was working for you before.


Martin

On Thu, Sep 20, 2018 at 12:24 PM Martin Xu 
mailto:martinxu9@gmail.com>> wrote:
I’m going through it now. I’ll let you know if I figured out something. So far 
I stumbled upon the PIC flag thing, I’m going through your other emails as well.

Martin

On Thu, Sep 20, 2018 at 11:35 AM Paul Greenberg 
mailto:green...@outlook.com>> wrote:
Hi Martin,

I always use the same process. It described here 
https://truesdn.blogspot.com/2018/08/how-to-compile-open-virtual-network-ovn.html?m=1

Regards,
Paul

Best Regards,
Paul Greenberg


From: Martin Xu mailto:martinxu9@gmail.com>>
Sent: Thursday, September 20, 2018 2:19 PM
To: Gregory Rose; Ben Pfaff
Cc: green...@outlook.com<mailto:green...@outlook.com>; 
b...@openvswitch.org<mailto:b...@openvswitch.org>
Subject: Re: [ovs-discuss] line 17: 
/usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

I don't think so. At least I didn't directly change anything related to this. 
Do you guys mind sharing the exact commands you used to build the RPM? I've 
tried building with the fedora spec file. I don't see it on mine after 
installation.

Sorry I'm replying out of order here, but I agree with Ben's email below. That 
seems to be the problem. I looked through some of our code.

The fedora spec file uses this macro %{_datadir} as the path prefix, and this 
could evaluate to /usr/share/ but can be overwritten or be something else on a 
particular system. That line 17 in ovs-kmod-ctl is written as this,

. "@pkgdatadir@/scripts/ovs-lib" || exit 1

At build time, the @pkgdatadir@ in some of our files (ovs-kmod-ctl is one of 
them) are being replaced. I haven't figured out exactly how to put my own 
string in there through configuration so that my installation goes into 
/usr/share and this string is replaced by /usr/local/share. I think basically 
that's problem seen here. Maybe some of the folks from redhat might know. Or if 
I can duplicate the issue myself, I might be able to figure out why.

Martin
On Mon, Sep 17, 2018 at 5:23 PM Gregory Rose 
mailto:gvrose8...@gmail.com>> wrote:

On 9/14/2018 3:36 PM, Paul Greenberg wrote:
> Running the latest:
>
> https://github.com/openvswitch/ovs/commit/cd2c1d3b1e03b41f0e2c964fcbdb1e82cde7c794
>
> An attempt to start "ovs-vswitchd.service" fails:
>
> ovs-ctl[2078]: /usr/share/openvswitch/scripts/ovs-kmod-ctl: line 17: 
> /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory
>
> The "/usr/local/share/openvswitch/scripts/ovs-lib" does not exists, but 
> "/usr/share/openvswitch/scripts/ovs-lib"
>
> Once I amended t

Re: [ovs-discuss] line 17: /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

2018-09-20 Thread Paul Greenberg
Hi Martin,

I always use the same process. It described here 
https://truesdn.blogspot.com/2018/08/how-to-compile-open-virtual-network-ovn.html?m=1

Regards,
Paul

Best Regards,
Paul Greenberg


From: Martin Xu 
Sent: Thursday, September 20, 2018 2:19 PM
To: Gregory Rose; Ben Pfaff
Cc: green...@outlook.com; b...@openvswitch.org
Subject: Re: [ovs-discuss] line 17: 
/usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

I don't think so. At least I didn't directly change anything related to this. 
Do you guys mind sharing the exact commands you used to build the RPM? I've 
tried building with the fedora spec file. I don't see it on mine after 
installation.

Sorry I'm replying out of order here, but I agree with Ben's email below. That 
seems to be the problem. I looked through some of our code.

The fedora spec file uses this macro %{_datadir} as the path prefix, and this 
could evaluate to /usr/share/ but can be overwritten or be something else on a 
particular system. That line 17 in ovs-kmod-ctl is written as this,

. "@pkgdatadir@/scripts/ovs-lib" || exit 1

At build time, the @pkgdatadir@ in some of our files (ovs-kmod-ctl is one of 
them) are being replaced. I haven't figured out exactly how to put my own 
string in there through configuration so that my installation goes into 
/usr/share and this string is replaced by /usr/local/share. I think basically 
that's problem seen here. Maybe some of the folks from redhat might know. Or if 
I can duplicate the issue myself, I might be able to figure out why.

Martin
On Mon, Sep 17, 2018 at 5:23 PM Gregory Rose 
mailto:gvrose8...@gmail.com>> wrote:

On 9/14/2018 3:36 PM, Paul Greenberg wrote:
> Running the latest:
>
> https://github.com/openvswitch/ovs/commit/cd2c1d3b1e03b41f0e2c964fcbdb1e82cde7c794
>
> An attempt to start "ovs-vswitchd.service" fails:
>
> ovs-ctl[2078]: /usr/share/openvswitch/scripts/ovs-kmod-ctl: line 17: 
> /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory
>
> The "/usr/local/share/openvswitch/scripts/ovs-lib" does not exists, but 
> "/usr/share/openvswitch/scripts/ovs-lib"
>
> Once I amended the line 17 to "/usr/share/openvswitch/scripts/ovs-lib", 
> things started working.

Martin,

I'm seeing this as well - do you think it's related to your recent changes?

Thanks,

- Greg

> ___
> discuss mailing list
> disc...@openvswitch.org<mailto:disc...@openvswitch.org>
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] line 17: /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

2018-09-14 Thread Paul Greenberg
Running the latest:

https://github.com/openvswitch/ovs/commit/cd2c1d3b1e03b41f0e2c964fcbdb1e82cde7c794

An attempt to start "ovs-vswitchd.service" fails:

ovs-ctl[2078]: /usr/share/openvswitch/scripts/ovs-kmod-ctl: line 17: 
/usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory
 
The "/usr/local/share/openvswitch/scripts/ovs-lib" does not exists, but 
"/usr/share/openvswitch/scripts/ovs-lib"

Once I amended the line 17 to "/usr/share/openvswitch/scripts/ovs-lib", things 
started working.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] can not be used when making a shared object; recompile with -fPIC

2018-09-14 Thread Paul Greenberg
Resolved by running "configure" while passing CFLAGS. 

$ ./configure CFLAGS="-fPIC"


From: ovs-discuss-boun...@openvswitch.org  
on behalf of Paul Greenberg 
Sent: Friday, September 14, 2018 4:02 PM
To: b...@openvswitch.org
Subject: Re: [ovs-discuss] can not be used when making a shared object; 
recompile with -fPIC

I partially resolved the issue is by adding "--with-pic" when running 
"configure".

$ ./boot.sh
$ ./configure --with-pic
$ make

However, now the following errors show up. My guess is that "--with-pic" was 
not picked by the utilities.

/usr/bin/ld: utilities/ovs-appctl.o: relocation R_X86_64_32 against 
`.rodata.str1.1' can not be used when making a shared object; recompile with 
-fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-appctl] Error 1
make[2]: *** Waiting for unfinished jobs
/usr/bin/ld: utilities/ovs-dpctl.o: relocation R_X86_64_32 against 
`.rodata.str1.8' can not be used when making a shared object; recompile with 
-fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-dpctl] Error 1
/usr/bin/ld: utilities/ovs-testcontroller.o: relocation R_X86_64_32S against 
`.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-testcontroller] Error 1
/usr/bin/ld: utilities/ovs-ofctl.o: relocation R_X86_64_32 against 
`.rodata.str1.1' can not be used when making a shared object; recompile with 
-fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-ofctl] Error 1
make[2]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.vtj98t (%build)


RPM build errors:
 Bad exit status from /var/tmp/rpm-tmp.vtj98t (%build)




From: ovs-discuss-boun...@openvswitch.org  
on behalf of Paul Greenberg 
Sent: Friday, September 14, 2018 3:53 PM
To: b...@openvswitch.org
Subject: [ovs-discuss] can not be used when making a shared object; recompile 
with -fPIC

When building an RPM:

$ rpmbuild -v --define "_topdir ${OVS_BUILD_DIR}" -ba --nocheck 
./rhel/openvswitch-fedora.spec

I received the following build errors:

/usr/bin/ld: lib/.libs/libopenvswitch.a(backtrace.o): relocation R_X86_64_32 
against `.rodata.str1.1' can not be used when making a shared object; recompile 
with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-ofctl] Error 1
make[2]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.lvamA7 (%build)

Full trace:

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.V8u3KD
+ umask 022
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ rm -rf openvswitch-2.10.90
+ /usr/bin/gzip -dc 
/root/github.com/openvswitch/rpmbuild/openvswitch/SOURCES/openvswitch-2.10.90.tar.gz
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd openvswitch-2.10.90
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.lvamA7
+ umask 022
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ cd openvswitch-2.10.90
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic 
-I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic 
-I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat

Re: [ovs-discuss] can not be used when making a shared object; recompile with -fPIC

2018-09-14 Thread Paul Greenberg
I partially resolved the issue is by adding "--with-pic" when running 
"configure".

$ ./boot.sh
$ ./configure --with-pic
$ make

However, now the following errors show up. My guess is that "--with-pic" was 
not picked by the utilities.

/usr/bin/ld: utilities/ovs-appctl.o: relocation R_X86_64_32 against 
`.rodata.str1.1' can not be used when making a shared object; recompile with 
-fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-appctl] Error 1
make[2]: *** Waiting for unfinished jobs
/usr/bin/ld: utilities/ovs-dpctl.o: relocation R_X86_64_32 against 
`.rodata.str1.8' can not be used when making a shared object; recompile with 
-fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-dpctl] Error 1
/usr/bin/ld: utilities/ovs-testcontroller.o: relocation R_X86_64_32S against 
`.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-testcontroller] Error 1
/usr/bin/ld: utilities/ovs-ofctl.o: relocation R_X86_64_32 against 
`.rodata.str1.1' can not be used when making a shared object; recompile with 
-fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-ofctl] Error 1
make[2]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.vtj98t (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.vtj98t (%build)




From: ovs-discuss-boun...@openvswitch.org  
on behalf of Paul Greenberg 
Sent: Friday, September 14, 2018 3:53 PM
To: b...@openvswitch.org
Subject: [ovs-discuss] can not be used when making a shared object; recompile 
with -fPIC
 
When building an RPM:

$ rpmbuild -v --define "_topdir ${OVS_BUILD_DIR}" -ba --nocheck 
./rhel/openvswitch-fedora.spec

I received the following build errors:

/usr/bin/ld: lib/.libs/libopenvswitch.a(backtrace.o): relocation R_X86_64_32 
against `.rodata.str1.1' can not be used when making a shared object; recompile 
with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-ofctl] Error 1
make[2]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.lvamA7 (%build)

Full trace:

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.V8u3KD
+ umask 022
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ rm -rf openvswitch-2.10.90
+ /usr/bin/gzip -dc 
/root/github.com/openvswitch/rpmbuild/openvswitch/SOURCES/openvswitch-2.10.90.tar.gz
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd openvswitch-2.10.90
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.lvamA7
+ umask 022
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ cd openvswitch-2.10.90
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic 
-I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic 
-I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ '[' 1 == 1 ']'
+ '[' x86_64 == ppc64le ']'
++ find . -name config.guess -o -name config.sub
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./build-aux/config.guess
+ '[' -f /usr/lib/rpm/redhat/config.guess ']'
+ /usr/bin/rm -f ./build-aux/config.guess
++ basename ./build-aux/con

[ovs-discuss] can not be used when making a shared object; recompile with -fPIC

2018-09-14 Thread Paul Greenberg
When building an RPM:

$ rpmbuild -v --define "_topdir ${OVS_BUILD_DIR}" -ba --nocheck 
./rhel/openvswitch-fedora.spec

I received the following build errors:

/usr/bin/ld: lib/.libs/libopenvswitch.a(backtrace.o): relocation R_X86_64_32 
against `.rodata.str1.1' can not be used when making a shared object; recompile 
with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-ofctl] Error 1
make[2]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/root/github.com/openvswitch/rpmbuild/openvswitch/BUILD/openvswitch-2.10.90'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.lvamA7 (%build)

Full trace:

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.V8u3KD
+ umask 022
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ rm -rf openvswitch-2.10.90
+ /usr/bin/gzip -dc 
/root/github.com/openvswitch/rpmbuild/openvswitch/SOURCES/openvswitch-2.10.90.tar.gz
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd openvswitch-2.10.90
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.lvamA7
+ umask 022
+ cd /root/github.com/openvswitch/rpmbuild/openvswitch/BUILD
+ cd openvswitch-2.10.90
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic 
-I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic 
-I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ '[' 1 == 1 ']'
+ '[' x86_64 == ppc64le ']'
++ find . -name config.guess -o -name config.sub
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./build-aux/config.guess
+ '[' -f /usr/lib/rpm/redhat/config.guess ']'
+ /usr/bin/rm -f ./build-aux/config.guess
++ basename ./build-aux/config.guess
+ /usr/bin/cp -fv /usr/lib/rpm/redhat/config.guess ./build-aux/config.guess
'/usr/lib/rpm/redhat/config.guess' -> './build-aux/config.guess'
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./build-aux/config.sub
+ '[' -f /usr/lib/rpm/redhat/config.sub ']'
+ /usr/bin/rm -f ./build-aux/config.sub
++ basename ./build-aux/config.sub
+ /usr/bin/cp -fv /usr/lib/rpm/redhat/config.sub ./build-aux/config.sub
'/usr/lib/rpm/redhat/config.sub' -> './build-aux/config.sub'
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu 
--program-prefix= --disable-dependency-tracking --prefix=/usr 
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc 
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib 
--mandir=/usr/share/man --infodir=/usr/share/info --enable-libcapng 
--enable-ssl --with-pkidir=/var/lib/openvswitch/pki PYTHON=/usr/bin/python
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking for style of include used by make... GNU
checking for x86_64-redhat-linux-gnu-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for gcc option to accept ISO C99... -std=gnu99
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking for x86_64-redhat-linux-gnu-g++... no
checking for x86_64-redhat-linux-gnu-c++... no
checking for x86_64-redhat-linux-gnu-gpp... no
checking for 

Re: [ovs-discuss] Sphinx: SyntaxError: unqualified exec is not allowed in function 'run'

2018-09-14 Thread Paul Greenberg
The associated bug is: https://github.com/sphinx-doc/sphinx/issues/5417


The way I overcame this is by forcing an older version of sphinx.

pip uinstall sphinx
pip install sphinx==1.7.9



From: ovs-discuss-boun...@openvswitch.org  
on behalf of Paul Greenberg 
Sent: Friday, September 14, 2018 3:32 PM
To: b...@openvswitch.org
Subject: [ovs-discuss] Sphinx: SyntaxError: unqualified exec is not allowed in 
function 'run'
 
During "make", I run into the following issue.

# make
make  all-recursive
make[1]: Entering directory `/root/github.com/openvswitch/ovs'
Making all in datapath
make[2]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
make[2]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
make[2]: Entering directory `/root/github.com/openvswitch/ovs'
make[3]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: `distfiles' is up to date.
make[3]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
sphinx-build  -b html -W -n -d ./Documentation/_build/doctrees  ./Documentation 
./Documentation/_build/html && touch docs-check
Running Sphinx v1.8.0

Exception occurred:
  File "/usr/lib/python2.7/site-packages/sphinx/highlighting.py", line 26, in 

    from sphinx.ext import doctest
SyntaxError: unqualified exec is not allowed in function 'run' it contains a 
nested function with free variables (doctest.py, line 97)
The full traceback has been saved in /tmp/sphinx-err-OOGi8u.log, if you want to 
report the issue to the developers.
Please also report this if it was a user error, so that a better error message 
can be provided next time.
A bug report can be filed in the tracker at 
<https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[2]: *** [docs-check] Error 2
make[2]: Leaving directory `/root/github.com/openvswitch/ovs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/github.com/openvswitch/ovs'
make: *** [all] Error 2


The content of /tmp/sphinx-err-OOGi8u.log:

# Sphinx version: 1.8.0
# Python version: 2.7.5 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sphinx/cmd/build.py", line 303, in 
build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 224, in 
__init__
    self.setup_extension(extension)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 449, in 
setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python2.7/site-packages/sphinx/registry.py", line 472, in 
load_extension
    mod = __import__(extname, None, None, ['setup'])
  File "/usr/lib/python2.7/site-packages/sphinx/builders/applehelp.py", line 
20, in 
    from sphinx.builders.html import StandaloneHTMLBuilder
  File "/usr/lib/python2.7/site-packages/sphinx/builders/html.py", line 40, in 

    from sphinx.highlighting import PygmentsBridge
  File "/usr/lib/python2.7/site-packages/sphinx/highlighting.py", line 26, in 

    from sphinx.ext import doctest
SyntaxError: unqualified exec is not allowed in function 'run' it contains a 
nested function with free variables (doctest.py, line 97)
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Sphinx: SyntaxError: unqualified exec is not allowed in function 'run'

2018-09-14 Thread Paul Greenberg
During "make", I run into the following issue.

# make
make  all-recursive
make[1]: Entering directory `/root/github.com/openvswitch/ovs'
Making all in datapath
make[2]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
make[2]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
make[2]: Entering directory `/root/github.com/openvswitch/ovs'
make[3]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: `distfiles' is up to date.
make[3]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
sphinx-build  -b html -W -n -d ./Documentation/_build/doctrees  ./Documentation 
./Documentation/_build/html && touch docs-check
Running Sphinx v1.8.0

Exception occurred:
  File "/usr/lib/python2.7/site-packages/sphinx/highlighting.py", line 26, in 

from sphinx.ext import doctest
SyntaxError: unqualified exec is not allowed in function 'run' it contains a 
nested function with free variables (doctest.py, line 97)
The full traceback has been saved in /tmp/sphinx-err-OOGi8u.log, if you want to 
report the issue to the developers.
Please also report this if it was a user error, so that a better error message 
can be provided next time.
A bug report can be filed in the tracker at 
. Thanks!
make[2]: *** [docs-check] Error 2
make[2]: Leaving directory `/root/github.com/openvswitch/ovs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/github.com/openvswitch/ovs'
make: *** [all] Error 2


The content of /tmp/sphinx-err-OOGi8u.log:

# Sphinx version: 1.8.0
# Python version: 2.7.5 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sphinx/cmd/build.py", line 303, in 
build_main
args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 224, in 
__init__
self.setup_extension(extension)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 449, in 
setup_extension
self.registry.load_extension(self, extname)
  File "/usr/lib/python2.7/site-packages/sphinx/registry.py", line 472, in 
load_extension
mod = __import__(extname, None, None, ['setup'])
  File "/usr/lib/python2.7/site-packages/sphinx/builders/applehelp.py", line 
20, in 
from sphinx.builders.html import StandaloneHTMLBuilder
  File "/usr/lib/python2.7/site-packages/sphinx/builders/html.py", line 40, in 

from sphinx.highlighting import PygmentsBridge
  File "/usr/lib/python2.7/site-packages/sphinx/highlighting.py", line 26, in 

from sphinx.ext import doctest
SyntaxError: unqualified exec is not allowed in function 'run' it contains a 
nested function with free variables (doctest.py, line 97)
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Tunnel packets from unknown VTEPs

2018-08-22 Thread Paul Greenberg
Hi Ben,

Yes. This is a use case where you have a remote hardware VTEP that does not 
support OVSDB.

Regarding the second point, it is bidir.
First, one need to create a chassis entry in SB for each remote VXLAN HW VTEP. 
That would make the traffic arrive to the processing pipeline, otherwise it 
would not arrive. Then, one needs to add a flow that would take that packet to 
a port.That's a bit hacky, by doable. In a nutshell, (for other readers) OVN 
switches traffic based on dest port. However, VXLAN packet would not have a 
destination port.

For example, one could intercept traffic at table 8, resubmit to table 200. In 
table 200, there would be rules that would determine destination port, metadata 
updates, and the packet is resubmitted to table 9.

ovs-ofctl add-flow br-int 'table=8, priority=0, actions=resubmit(,200)'
ovs-ofctl add-flow br-int 'table=200, priority=0, actions=resubmit(,9)'


Second, one adds an entry on the logical switch in SB db and maps it to the 
previously created VTEP. Now you have a bidir communication.

Thank you for your answer regarding ovn-controller. That is what I was looking 
for  The section of code responsible for it would have been better  joking!

I totally understand the point of it being "one off".

Regards,
Paul



From: Ben Pfaff 
Sent: Tuesday, August 21, 2018 1:55 PM
To: Paul Greenberg
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] Tunnel packets from unknown VTEPs

On Tue, Aug 21, 2018 at 03:45:34PM +0000, Paul Greenberg wrote:
> Currently, when a VXLAN packet comes to a host, but the source ip
> (chassis) of the packet is not in OVN SB database, packets are being
> dropped prior to getting to openvswitch.
>
> How to make the packets reach the switch?

It would be necessary to make ovn-controller add a VXLAN port without
specifying a remote_ip.  This would require changes to the
ovn-controller C sources.

But this question raises two kinds of other issues.

First, OVN uses VXLAN only for connecting to hardware switches, which in
OVN are only useful for incorporating bare-metal physical hardware into
a logical network.  That's a pretty specialized use case.

Second, this would only be useful for one-way connectivity, because OVN
wouldn't have any idea when it should send packets back the other way.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Tunnel packets from unknown VTEPs

2018-08-21 Thread Paul Greenberg
All,

Currently, when a VXLAN packet comes to a host, but the source ip (chassis) of 
the packet is not in OVN SB database, packets are being dropped prior to 
getting to openvswitch.

How to make the packets reach the switch?

Best Regards,
Paul Greenberg
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] openvswitch-kmod: on uninstall, get depmod: ERROR: fstatat

2018-06-23 Thread Paul Greenberg
Hi Gregory,

As you pointed out, it fails to build. There are several reasons. One related 
to groff vs groff base, the other is related to Sphinx.

See below my notes on the subject.

Replace groff with groff-base, and comment out sphinx line in 
openvswitch-fedora.spec:

BuildRequires: groff-base graphviz
#BuildRequires: %{_py2}-sphinx
Remember to install sphinx with pip:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip install enum34
pip install ipaddress
pip install jsonschema
pip install pyasn1
pip install --ignore-installed Sphinx
Additionally, add the following line if running into ERROR: No build ID note 
found in error:

%undefine _missing_build_ids_terminate_build

Regards,
Paul

Best Regards,
Paul Greenberg

From: Gregory Rose 
Sent: Friday, June 22, 2018 6:36:25 PM
To: Paul Greenberg; ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] openvswitch-kmod: on uninstall, get depmod: ERROR: 
fstatat


On 6/21/2018 7:02 PM, Paul Greenberg wrote:
Hi Gregory, I compiled from fedora spec, but the underlying OS is RHEL 7.5

I'm using the instructions from ../Documentation/intro/install/fedora.rst and I 
can't get it to work at
all on my RHEL 7.5 machine - I can't even get it configured.  I run 'sudo 
yum-builddep /tmp/ovs.spec'
and get the following errors:

Error: No Package found for groff
Error: No Package found for python-sphinx
Error: No Package found for python-twisted-core
Error: No Package found for python-zope-interface

But they *are* installed.

[gvrose@Unknown ovs-experimental]$ sudo yum install groff-base -y
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Package groff-base-1.22.2-8.el7.x86_64 already installed and latest version
Nothing to do

[gvrose@Unknown ovs-experimental]$ pip install zope.interface
Requirement already satisfied: zope.interface in 
/usr/lib64/python2.7/site-packages (4.5.0)

[gvrose@Unknown ovs-experimental]$ pip install twisted
Requirement already satisfied: twisted in /usr/lib64/python2.7/site-packages 
(18.4.0)

[gvrose@Unknown ovs-experimental]$ pip install sphinx
Requirement already satisfied: sphinx in /usr/lib/python2.7/site-packages 
(1.7.5)

So there seem to definitely be some problems with making the fedora RPM on RHEL 
7.5.  Maybe some folks
from Red Hat can have a look?  Spec.in files aren't my forte.

- Greg


Best Regards,
Paul Greenberg

From: 
ovs-discuss-boun...@openvswitch.org<mailto:ovs-discuss-boun...@openvswitch.org> 
<mailto:ovs-discuss-boun...@openvswitch.org>
 on behalf of Gregory Rose <mailto:gvrose8...@gmail.com>
Sent: Thursday, June 21, 2018 5:23:12 PM
To: ovs-discuss@openvswitch.org<mailto:ovs-discuss@openvswitch.org>
Subject: Re: [ovs-discuss] openvswitch-kmod: on uninstall, get depmod: ERROR: 
fstatat

On 6/18/2018 8:14 PM, Paul Greenberg wrote:
> Build Fedora RPM from 2.9.90.

Which version of Fedora are you using?

Thanks,

- Greg

>
> On "yum remove", get the following errors:
>
>Erasing: openvswitch-kmod-2.9.90-1.el7.x86_64  
>   
>   3/6
> depmod: ERROR: fstatat(4, vport-gre.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-stt.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-geneve.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-lisp.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-vxlan.ko): No such file or directory
> depmod: ERROR: fstatat(4, openvswitch.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-gre.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-stt.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-geneve.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-lisp.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-vxlan.ko): No such file or directory
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> ___
> discuss mailing list
> disc...@openvswitch.org<mailto:disc...@openvswitch.org>
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

___
discuss mailing list
disc...@openvswitch.org<mailto:disc...@openvswitch.org>
https://mail.openvswitch.org/mailma

Re: [ovs-discuss] openvswitch-kmod: on uninstall, get depmod: ERROR: fstatat

2018-06-21 Thread Paul Greenberg
Hi Gregory, I compiled from fedora spec, but the underlying OS is RHEL 7.5

Best Regards,
Paul Greenberg

From: ovs-discuss-boun...@openvswitch.org  
on behalf of Gregory Rose 
Sent: Thursday, June 21, 2018 5:23:12 PM
To: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] openvswitch-kmod: on uninstall, get depmod: ERROR: 
fstatat

On 6/18/2018 8:14 PM, Paul Greenberg wrote:
> Build Fedora RPM from 2.9.90.

Which version of Fedora are you using?

Thanks,

- Greg

>
> On "yum remove", get the following errors:
>
>Erasing: openvswitch-kmod-2.9.90-1.el7.x86_64  
>   
>   3/6
> depmod: ERROR: fstatat(4, vport-gre.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-stt.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-geneve.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-lisp.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-vxlan.ko): No such file or directory
> depmod: ERROR: fstatat(4, openvswitch.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-gre.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-stt.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-geneve.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-lisp.ko): No such file or directory
> depmod: ERROR: fstatat(4, vport-vxlan.ko): No such file or directory
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> rmdir: failed to remove '.': Invalid argument
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVN IPAM

2018-06-19 Thread Paul Greenberg
Thank you, Guru! Will do.

Best Regards,
Paul Greenberg

From: Guru Shetty 
Sent: Tuesday, June 19, 2018 2:51:18 PM
To: Paul Greenberg
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVN IPAM

In tests/ovn.at<http://ovn.at>, search for "ipam".

On 17 June 2018 at 14:27, Paul Greenberg 
mailto:green...@outlook.com>> wrote:
All,

I want to get an IP address from OVN without using DHCP. I did not find a 
command line option to do so.

How could one do it through OVSDB queries? Did anyone attempt it?

Best Regards,
Paul Greenberg

___
discuss mailing list
disc...@openvswitch.org<mailto:disc...@openvswitch.org>
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] openvswitch-kmod: on uninstall, get depmod: ERROR: fstatat

2018-06-18 Thread Paul Greenberg
Build Fedora RPM from 2.9.90.

On "yum remove", get the following errors:

  Erasing: openvswitch-kmod-2.9.90-1.el7.x86_64 

 3/6
depmod: ERROR: fstatat(4, vport-gre.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-stt.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-geneve.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-lisp.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-vxlan.ko): No such file or directory
depmod: ERROR: fstatat(4, openvswitch.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-gre.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-stt.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-geneve.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-lisp.ko): No such file or directory
depmod: ERROR: fstatat(4, vport-vxlan.ko): No such file or directory
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
rmdir: failed to remove '.': Invalid argument
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] OVN IPAM

2018-06-17 Thread Paul Greenberg
All,

I want to get an IP address from OVN without using DHCP. I did not find a 
command line option to do so.

How could one do it through OVSDB queries? Did anyone attempt it?

Best Regards,
Paul Greenberg
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVSDB server echo

2018-06-15 Thread Paul Greenberg
> Does anything else suggest that "id" must be an integer or that “params" must 
> be nonempty?

Ben,

In terms of the RFC it complies with it. Initially, I was surprised to see 
“echo” in “id” field because I did not know which request it belongs to. After 
re-reading the RFC, it occurred to me that this is how it works.

Thank you for the clarification!

Best Regards,
Paul Greenberg


Best Regards,
Paul Greenberg

From: Ben Pfaff 
Sent: Friday, June 15, 2018 3:28:32 PM
To: Paul Greenberg
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVSDB server echo

On Fri, Jun 15, 2018 at 06:48:40PM +, Paul Greenberg wrote:
> All,
>
> While working on a Goland OVSDB library, I ran into the following issue.
>
> Per RFC 7047 Section 4.1.11, a server can send messages to verify if a 
> connection is alive.
>
> Typically, with a one shot execution client, a user created id (integer) and 
> payload for echo. Then the connection closes and no server echo will be 
> received.
>
> However, when a client maintains a persistent connection to OVSDB server, the 
> server can sent echo too. Here is what the server sends:
>
> {“id”:”echo”,”method”:”echo”,”params”:[]}
>
> My expectations were that the id would be an integer, and as opposed to 
> string. and the message would not be empty. For example, the message (params) 
> could be the ID of last processed message.
>
> Any opinions on the above? Unreasonable expectations?

The "id" here comes from JSON-RPC 1.0
(http://www.jsonrpc.org/specification_v1), which says that it may be any
type.  Does anything else suggest that "id" must be an integer or that
"params" must be nonempty?
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] OVSDB server echo

2018-06-15 Thread Paul Greenberg
All,

While working on a Goland OVSDB library, I ran into the following issue.

Per RFC 7047 Section 4.1.11, a server can send messages to verify if a 
connection is alive.

Typically, with a one shot execution client, a user created id (integer) and 
payload for echo. Then the connection closes and no server echo will be 
received.

However, when a client maintains a persistent connection to OVSDB server, the 
server can sent echo too. Here is what the server sends:

{“id”:”echo”,”method”:”echo”,”params”:[]}

My expectations were that the id would be an integer, and as opposed to string. 
and the message would not be empty. For example, the message (params) could be 
the ID of last processed message.

Any opinions on the above? Unreasonable expectations?

Best Regards,
Paul Greenberg
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVN Clustered Database Service Model

2018-06-14 Thread Paul Greenberg
Ack. Will compile 2.9.2.

Best Regards,
Paul Greenberg

From: Ben Pfaff 
Sent: Thursday, June 14, 2018 4:30:41 PM
To: Paul Greenberg
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVN Clustered Database Service Model

Schema version != ovs version

On Thu, Jun 14, 2018 at 08:05:15PM +, Paul Greenberg wrote:
> Schema version: 7.15.1
>
> Best Regards,
> Paul Greenberg
> 
> From: ovs-discuss-boun...@openvswitch.org 
>  on behalf of Paul Greenberg 
> 
> Sent: Thursday, June 14, 2018 3:55:17 PM
> To: Ben Pfaff
> Cc: ovs-discuss@openvswitch.org
> Subject: Re: [ovs-discuss] OVN Clustered Database Service Model
>
> Hi Ben, it is 2.9.0. What is the minimally required version?
>
> Best Regards,
> Paul Greenberg
> 
> From: Ben Pfaff 
> Sent: Thursday, June 14, 2018 3:52:03 PM
> To: Paul Greenberg
> Cc: ovs-discuss@openvswitch.org
> Subject: Re: [ovs-discuss] OVN Clustered Database Service Model
>
> On Thu, Jun 14, 2018 at 07:35:46PM +, Paul Greenberg wrote:
> > Any experience, and potentially notes, on how to set up clustered database?
> >
> > My initial attempt to run “ovsdb-tool create-cluster” (per man ovsdb) 
> > resulted in “unknown command”.
> >
> > Any help on the subject is being welcomed! :-)
>
> If you're getting "unknown command" from ovsdb-tool, then your ovsdb
> binaries are probably too old.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVN Clustered Database Service Model

2018-06-14 Thread Paul Greenberg
Schema version: 7.15.1

Best Regards,
Paul Greenberg

From: ovs-discuss-boun...@openvswitch.org  
on behalf of Paul Greenberg 
Sent: Thursday, June 14, 2018 3:55:17 PM
To: Ben Pfaff
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVN Clustered Database Service Model

Hi Ben, it is 2.9.0. What is the minimally required version?

Best Regards,
Paul Greenberg

From: Ben Pfaff 
Sent: Thursday, June 14, 2018 3:52:03 PM
To: Paul Greenberg
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVN Clustered Database Service Model

On Thu, Jun 14, 2018 at 07:35:46PM +, Paul Greenberg wrote:
> Any experience, and potentially notes, on how to set up clustered database?
>
> My initial attempt to run “ovsdb-tool create-cluster” (per man ovsdb) 
> resulted in “unknown command”.
>
> Any help on the subject is being welcomed! :-)

If you're getting "unknown command" from ovsdb-tool, then your ovsdb
binaries are probably too old.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVN Clustered Database Service Model

2018-06-14 Thread Paul Greenberg
Hi Ben, it is 2.9.0. What is the minimally required version?

Best Regards,
Paul Greenberg

From: Ben Pfaff 
Sent: Thursday, June 14, 2018 3:52:03 PM
To: Paul Greenberg
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVN Clustered Database Service Model

On Thu, Jun 14, 2018 at 07:35:46PM +, Paul Greenberg wrote:
> Any experience, and potentially notes, on how to set up clustered database?
>
> My initial attempt to run “ovsdb-tool create-cluster” (per man ovsdb) 
> resulted in “unknown command”.
>
> Any help on the subject is being welcomed! :-)

If you're getting "unknown command" from ovsdb-tool, then your ovsdb
binaries are probably too old.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] OVN Clustered Database Service Model

2018-06-14 Thread Paul Greenberg
All,

Any experience, and potentially notes, on how to set up clustered database?

My initial attempt to run “ovsdb-tool create-cluster” (per man ovsdb) resulted 
in “unknown command”.

Any help on the subject is being welcomed! :-)

Best Regards,
Paul Greenberg
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] GRE key rules

2018-05-30 Thread Paul Greenberg
Bilal,

Regarding n^2 interfaces, I think you can have a single GRE interface without 
remote_ip set. Instead, the interface is "flow" type interface. Otherwise, the 
diameter of your network is very limited, because of limited number of 
interfaces you can create.

It is similar to how Geneve interface works in OVN. There, you have a single 
point-to-multipoint Geneve tunnel interface. Additionally, there are rules to 
set outer header destination IP address.

Regards,
Paul

Best Regards,
Paul Greenberg

From: William Tu 
Sent: Wednesday, May 30, 2018 1:16:15 PM
To: Bilal Saleem
Cc: Paul Greenberg; ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] GRE key rules

On Tue, May 29, 2018 at 2:47 AM, Bilal Saleem  wrote:
> Thanks, Paul and William.
>
> But in my topology, there could be multiple hosts and for that, I might need
> to create n^2 tunnels (from each host to other hosts), and even if I go with
> that I think I need to know the remote IP addresses  (correct me If I am
> wrong) and that I don't know as I don't know how many hosts could be in
> topology.
>
> I am using C code to create a GRE packet rather than to let switch add gre
> headers fields, it is a requirement of the algorithm.
>
> I have used tunnel_id and tunnel_id_nxm field but does not work. all packets
> match the rules where the tunnel_id value is 0. I think that is because I am
> not creating a gre interface.
>
> Other questions:
> Do I have to create gre interface on each switch?
>
Yes, to use gre tunnel in OVS, you have to create gre interface.

> Is it possible to do this without creating gre tunnel interface at switch?
>
No.

William
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] GRE key rules

2018-05-28 Thread Paul Greenberg
Hi Bilal,

I think you might be looking for "tun_id" field matching. It is described in 
http://www.openvswitch.org/support/dist-docs/ovs-fields.7.txt
Tunnel ID Field Name:tun_id (aka tunnel_id)

William gave a sound advice.

However, consider the following. A controller creates rules for you. Thus, a 
tunnel OF port ID might be dynamic. The "in_port" might not help.
The "tun_id" matching is good enough. As it says in the docs for the "tun_id" 
field: "Prerequisites:  none". This means you can match on it without having 
input port.

Regards,
Paul

From: ovs-discuss-boun...@openvswitch.org  
on behalf of William Tu 
Sent: Monday, May 28, 2018 9:25 PM
To: Bilal Saleem
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] GRE key rules
  

On Mon, May 28, 2018 at 1:33 PM, Bilal Saleem  wrote:
> Hi,
>
> I am working on simple topology as follows:
>    C
>   /  | \
> Veth ports-S1 -- S2 -- S3  H1
>   \   /
>    S4
> I am sending raw packets cooked with GRE headers on Veth ports. I want to
> create rules based on GRE key value like this:
> match2 = parser.OFPMatch(in_port=2, eth_dst=dst, eth_type=0x0800,
> ip_proto=47, grekey=X)
> S1 will decide where to send the packet based on gre key information.
>

I'm not familiar with ryu controller, but  OVS supports GRE key options,
you can set it using ovs-vsctl, for example:
ovs-vsctl add-port br0 gre123 -- set Interface gre123 type=gre \
   options:remote_ip=1.1.2.92 options:key=456
ofport_request=3

for creating an OpenFlow rule matching gre key,
see Tunnel ID field in man ovs-fields(7)
for example:
ovs-ofctl add-flow br0 "in_port=2,tunnel_id=456, actions=1"

Regards,
William
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


discuss Info Page - Open vSwitch
mail.openvswitch.org
To see the collection of prior postings to the list, visit the discuss 
Archives.. Using discuss: To post a message to all the list members, send email 
to ovs-discuss@openvswitch.org.

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Openvswitch and LXC integration on Ubuntu 18.04

2018-05-14 Thread Paul Greenberg
It is not coming up because you do not have startup script for the interface. 
Perhaps you have it, but you need to modify it to fit your setup.
Check https://github.com/openvswitch/ovs/blob/master/debian/ifupdown.sh and 
https://github.com/openvswitch/ovs/blob/master/rhel/etc_sysconfig_network-scripts_ifdown-ovs
 for examples.

Regards,
Paul


Get Outlook for iOS<https://aka.ms/o0ukef>

From: den...@exemail.com.au <den...@exemail.com.au>
Sent: Monday, May 14, 2018 6:55:22 AM
To: Paul Greenberg
Cc: Orabuntu-LXC; ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] Openvswitch and LXC integration on Ubuntu 18.04

Paul

Thanks for that command.  I tried it and found that my br-int was not up .

After  "sudo ip link set br-int up" and "sudo ip addr add 192.168.1.1/24
dev br-int" it worked and I could ping as expected.

For Ubuntu 18.04 I have added the following to /etc/network/interfaces

allow-ovs br-int
iface br-int inet static
address 192.168.1.1
netmask 255.255.255.0
ovs_type OVSBridge

But on reboot br-int is not coming up correctly after reboot.

5: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether c6:8e:e2:7b:0f:4f brd ff:ff:ff:ff:ff:ff

Is this the correct way to define a Openvswitch bridge with IP on Ubuntu?


Thanks

Densha

It looks> Before you rebuild, I suggest you ping at the interval of 0.01,
then, take
> "ovs-ofctl dump-flows br-int" and save it to a file. The relevant columns
> are table and n_packets. Wait a couple of seconds, then take the dump
> again. Compare and find the entries that increment at the rate of your
> ping.
>
> If you don't see the hits in the tables - check iptables, kmod, etc.
>
> If you ser them, use trace to figure out why your traffic is being
> dropped.
>
> Regards,
> Paul
>
>
> Get Outlook for iOS<https://aka.ms/o0ukef>
> 
> From: ovs-discuss-boun...@openvswitch.org
> <ovs-discuss-boun...@openvswitch.org> on behalf of den...@exemail.com.au
> <den...@exemail.com.au>
> Sent: Saturday, May 12, 2018 11:45:57 PM
> To: Orabuntu-LXC
> Cc: ovs-discuss@openvswitch.org
> Subject: Re: [ovs-discuss] Openvswitch and LXC integration on Ubuntu 18.04
>
> Thanks.  I tried that and still unable to ping from the LXC container to
> the IP address set on the bridge.
>
> I will rebuild everything from scratch and retry.
>
>> Check sysctl settings.  Check/set these on the LXC host machine in the
>> /etc/sysctl.conf (or in a new file in the /etc/sysctl.d directory, e.g
>> you
>> could call it  /etc/sysctl.d/60-lxc.conf) :
>>
>> net.ipv4.conf.default.rp_filter=0
>> net.ipv4.conf.all.rp_filter=0
>> net.ipv4.ip_forward=1
>>
>> Reference:
>> https://thenewstack.io/solving-a-common-beginners-problem-when-pinging-from-an-openstack-instance/
>>
>>
>>
>> On Sat, May 12, 2018 at 7:09 AM, <den...@exemail.com.au> wrote:
>>
>>> Thanks for the response and links.  I will watch the OvS Con videos.
>>>
>>> I have now successfully started the container, but unable to ping out
>>> or
>>> into the container.
>>>
>>> I have modified my /var/lib/vm1/conf to be
>>>
>>> # Network configuration
>>> lxc.net.0.type = veth
>>> lxc.net.0.link = br-int <- Name of my internal container bridge
>>> lxc.net.0.flags = up
>>> lxc.net.0.name=eth0
>>> lxc.net.0.hwaddr = 00:16:3e:d2:23:a8 .<- This was in the conf when
>>> created.
>>>
>>>
>>> When I start the container - I can see the port be added to the bridge
>>> on
>>> the host system
>>>
>>> # sudo lxc-start -n vm1
>>> # sudo ovs-vsctl show
>>> c3d9247e-68f1-4ae1-be0e-4bb86fd2c541
>>> Bridge br-dmz
>>> Port br-dmz
>>> Interface br-dmz
>>> type: internal
>>> Bridge br-int
>>> Port "veth4U4B0B"  <- New port added when
>>> container starts
>>> Interface "veth4U4B0B"
>>> Port br-int
>>> Interface br-int
>>> type: internal
>>> Port "enp2s0"
>>> Interface "enp2s0"
>>> ovs_version: "2.9.0"
>>>
>>> The bridge br-int has self IP 192.168.10.1/24 - that I added using
>>> (after
>>> reboot)
>>>
>>> # sudo ip addr del 192.168.0.1/24 dev br-int
>>>
>>> 5: br-int: <BROADCAST,MULTICAST> mtu 1

Re: [ovs-discuss] Openvswitch and LXC integration on Ubuntu 18.04

2018-05-13 Thread Paul Greenberg
Before you rebuild, I suggest you ping at the interval of 0.01, then, take 
"ovs-ofctl dump-flows br-int" and save it to a file. The relevant columns are 
table and n_packets. Wait a couple of seconds, then take the dump again. 
Compare and find the entries that increment at the rate of your ping.

If you don't see the hits in the tables - check iptables, kmod, etc.

If you ser them, use trace to figure out why your traffic is being dropped.

Regards,
Paul


Get Outlook for iOS

From: ovs-discuss-boun...@openvswitch.org  
on behalf of den...@exemail.com.au 
Sent: Saturday, May 12, 2018 11:45:57 PM
To: Orabuntu-LXC
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] Openvswitch and LXC integration on Ubuntu 18.04

Thanks.  I tried that and still unable to ping from the LXC container to
the IP address set on the bridge.

I will rebuild everything from scratch and retry.

> Check sysctl settings.  Check/set these on the LXC host machine in the
> /etc/sysctl.conf (or in a new file in the /etc/sysctl.d directory, e.g you
> could call it  /etc/sysctl.d/60-lxc.conf) :
>
> net.ipv4.conf.default.rp_filter=0
> net.ipv4.conf.all.rp_filter=0
> net.ipv4.ip_forward=1
>
> Reference:
> https://thenewstack.io/solving-a-common-beginners-problem-when-pinging-from-an-openstack-instance/
>
>
>
> On Sat, May 12, 2018 at 7:09 AM,  wrote:
>
>> Thanks for the response and links.  I will watch the OvS Con videos.
>>
>> I have now successfully started the container, but unable to ping out or
>> into the container.
>>
>> I have modified my /var/lib/vm1/conf to be
>>
>> # Network configuration
>> lxc.net.0.type = veth
>> lxc.net.0.link = br-int <- Name of my internal container bridge
>> lxc.net.0.flags = up
>> lxc.net.0.name=eth0
>> lxc.net.0.hwaddr = 00:16:3e:d2:23:a8 .<- This was in the conf when
>> created.
>>
>>
>> When I start the container - I can see the port be added to the bridge
>> on
>> the host system
>>
>> # sudo lxc-start -n vm1
>> # sudo ovs-vsctl show
>> c3d9247e-68f1-4ae1-be0e-4bb86fd2c541
>> Bridge br-dmz
>> Port br-dmz
>> Interface br-dmz
>> type: internal
>> Bridge br-int
>> Port "veth4U4B0B"  <- New port added when
>> container starts
>> Interface "veth4U4B0B"
>> Port br-int
>> Interface br-int
>> type: internal
>> Port "enp2s0"
>> Interface "enp2s0"
>> ovs_version: "2.9.0"
>>
>> The bridge br-int has self IP 192.168.10.1/24 - that I added using
>> (after
>> reboot)
>>
>> # sudo ip addr del 192.168.0.1/24 dev br-int
>>
>> 5: br-int:  mtu 1500 qdisc noop state DOWN group
>> default qlen 1000
>> link/ether 00:01:80:82:f8:59 brd ff:ff:ff:ff:ff:ff
>> inet 192.168.10.1/24 scope global br-int
>>valid_lft forever preferred_lft forever
>>
>> and the new port
>>
>> 8: veth4U4B0B@if7:  mtu 1500 qdisc
>> noqueue master ovs-system state UP group default qlen 1000
>> link/ether fe:b8:87:1b:1e:5e brd ff:ff:ff:ff:ff:ff link-netnsid 0
>> inet6 fe80::fcb8:87ff:fe1b:1e5e/64 scope link
>>valid_lft forever preferred_lft forever
>>
>> Inside the container I set the IP of eth0 device using
>>
>> ubuntu@vm1:~$ sudo ip addr add 192.168.10.2/24 dev eth0
>>
>> ubuntu@vm1:~$ ip a
>> 7: eth0@if8:  mtu 1500 qdisc noqueue
>> state UP group default qlen 1000
>> link/ether 00:16:3e:d2:23:a8 brd ff:ff:ff:ff:ff:ff link-netnsid 0
>> inet 192.168.10.2/24 scope global eth0
>>valid_lft forever preferred_lft forever
>> inet6 fe80::216:3eff:fed2:23a8/64 scope link
>>valid_lft forever preferred_lft forever
>>
>> However I still cannot ping the self IP of the bridge.
>>
>> Is there anything obvious that I have configured wrong?
>>
>> Thanks
>>
>> Densha
>>
>>
>> > These materials might help:
>> >
>> > 1.  Presentation on running LXC on OpenvSwitch at OvS Con:
>> >
>> > https://www.youtube.com/watch?v=MXewSiDvQl4=221s (presentation I
>> gave
>> at
>> > OvS Con).
>> >
>> > I discuss in the preso that for LXC 2.1+, you now have the option to
>> > configure OpenvSwitch for LXC in two different ways.  You can
>> configure
>> it
>> > using, as you mentioned, the scripts (and this was the way we had to
>> do
>> it
>> > in LXC 1.0.x and  2.0.x.  This method has advantage that VLAN's can
>> also
>> > be
>> > configured pretty easily in these scripts too.
>> >
>> > lxc.net.0.script.up
>> > lxc.net.0.script.down
>> >
>> > Or, starting from 2.1.x you can also configure it directly in the LXC
>> > config using for example these parameters:
>> >
>> >   lxc.net.0.type = veth
>> >   lxc.net.0.link = ovsbr0
>> >   lxc.net.0.flags = up
>> >   lxc.net.0.name = eth0
>> >
>> > which is also discussed here:
>> > 

[ovs-discuss] ovs-dpctl-top: KeyError: 'src'

2018-05-06 Thread Paul Greenberg
Hi All,

Encountered the following bug with OVS/OVN 2.9.0:

```bash
# ovs-dpctl-top
Traceback (most recent call last):
  File "/usr/bin/ovs-dpctl-top", line 1290, in 
sys.exit(main())
  File "/usr/bin/ovs-dpctl-top", line 1282, in main
flows_top(args)
  File "/usr/bin/ovs-dpctl-top", line 1191, in flows_top
flows_read(ihdl, flow_db)
  File "/usr/bin/ovs-dpctl-top", line 593, in flows_read
flow_db.flow_line_add(line)
  File "/usr/bin/ovs-dpctl-top", line 988, in flow_line_add
self.flow_event(fields_dict, stats_old_dict, stats_dict)
  File "/usr/bin/ovs-dpctl-top", line 1080, in flow_event
matches = flow_aggregate(fields_dict, stats_new_dict)
  File "/usr/bin/ovs-dpctl-top", line 576, in flow_aggregate
field, stats_dict)
  File "/usr/bin/ovs-dpctl-top", line 250, in element_ipv4_get
element_show = fmt % (field_type, element["src"], element["dst"])
KeyError: 'src'


When troubleshooted, pprinted the following:

```
pprint.pprint(field_type);
pprint.pprint(element);
pprint.pprint(stats_dict);

'ipv4'
{'frag': 'no'}
{'bytes': '22344', 'packets': '228', 'used': '0.706s'}
```

The elements comes in with a single "frag" key only.

The flows are:

```bash
# ovs-dpctl dump-flows
recirc_id(0),in_port(2),eth(src=00:00:00:00:00:00/01:00:00:00:00:00,dst=02:55:e6:cd:c0:3b),eth_type(0x0800),ipv4(frag=no),
 packets:535, bytes:52430, used:0.792s, actions:3
recirc_id(0),in_port(3),eth(src=00:00:00:00:00:00/01:00:00:00:00:00,dst=02:34:2c:78:a6:51),eth_type(0x0800),ipv4(frag=no),
 packets:535, bytes:52430, used:0.792s, actions:2
recirc_id(0),in_port(3),eth(src=02:55:e6:cd:c0:3b,dst=02:34:2c:78:a6:51),eth_type(0x0806),arp(sip=10.1.1.35,tip=10.1.1.34,op=1/0xff,sha=02:55:e6:cd:c0:3b,tha=00:00:00:00:00:00),
 packets:0, bytes:0, used:never, 
actions:userspace(pid=4294962559,slow_path(action))
```

One way to overcome the error is:

```python
def element_ipv4_get(field_type, element, stats_dict):
""" Extract src and dst from a dump-flow element."""
fmt = "%s(src=%s,dst=%s)"

if "src" not in element:
element["src"] = "unknown"
if "dst" not in element:
element["dst"] = "unknown"
```
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] could not add network device ovn-xxxxxx-0 to ofproto (Address family not supported by protocol)

2018-04-27 Thread Paul Greenberg

When IPv6 is disables in `/boot/grub2/grub.cfg`:

```
linux16 ... ipv6.disable=1
```

Then GENEVE interface does not come up properly.

```
# ovs-vsctl show
Port "ovn-14a54f-0"
Interface "ovn-14a54f-0"
type: geneve
options: {csum="true", key=flow, remote_ip="10.10.10.10"}
error: "could not add network device ovn-14a54f-0 to ofproto 
(Address family not supported by protocol)"
```

Additionally, run the following commands:

```
# cat /proc/version
Linux version 3.10.0-514.21.1.el7.x86_64 
(mockbu...@x86-020.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red 
Hat 4.8.5-11) (GCC) ) #1 SMP Sat Apr 22 02:41:35 EDT 2017

# ovs-vswitchd --version
ovs-vswitchd (Open vSwitch) 2.9.0
```

When IPv6 is enabled, then OVN works properly.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss