<div dir="ltr">Thanks for starting this Russell.<div><br></div><div>Some answers inline.</div><div><br></div><div>Salvatore<br><div class="gmail_extra"><br><div class="gmail_quote">On 27 March 2015 at 00:54, Russell Bryant <span dir="ltr"><<a href="mailto:rbryant@redhat.com" target="_blank">rbryant@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Gary and Kyle, I saw in my IRC backlog that you guys were briefly<br>
talking about testing the Neutron ovn ml2 driver.  I suppose it's time<br>
to add some more code to the devstack integration to install the current<br>
ovn branch and set up ovsdb-server to serve up the right database for<br>
this.  I'll try to work on that tomorrow.  Of course, note that all we<br>
can set up right now is the northbound database.  None of the code that<br>
reacts to updates to that database is merged yet.  We can still go ahead<br>
and test our code and make sure the expected data makes it there, though.<br></blockquote><div><br></div><div>In theory this should be enough! </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Here's some more detail about the pieces ...<br>
<br>
When I was writing ovn-nbctl [1], I was testing using ovs-sandbox.  It's<br>
a script that sets up a handy development environment for ovs.  It has<br>
ovn support if you pass the "-o" option [2].  To run it, it would be<br>
something like ...<br>
<br>
  $ git clone <a href="https://github.com/openvswitch/ovs.git" target="_blank">https://github.com/openvswitch/ovs.git</a><br>
  $ cd ovs<br>
  $ git checkout ovn<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">  $ ./boot.sh<br>
  $ ./configure<br>
  $ make<br>
  $ make SANDBOXFLAGS="-o" sandbox<br></blockquote><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
>From there you can run ovn-nbctl.  Here's a script to demonstrate the<br>
various commands:<br>
<br>
  <a href="https://gist.github.com/russellb/946953e8675063c0c756" target="_blank">https://gist.github.com/russellb/946953e8675063c0c756</a><br>
<br>
To set this up outside of ovs-sandbox, you need to first create the OVN<br>
northbound database:<br>
<br>
  $ ovsdb-tool create ovnnb.db ovs-git-tree/ovn/ovn-nb.ovsschema<br>
<br>
Then you need to tell ovsdb-server to use it.  By default ovsdb-server<br>
will only serve up conf.db.  It can take a list of dbs as positional<br>
arguments, though.  You can see that's what the ovs-sandbox script is doing.<br>
<br></blockquote><div>Do you reckon this steps should be performed by devstack (or to be more precise the neutron-ovn devstack plugin that we should develop) or shall we assume OVN is already configured? For me both ways work. However some developers (like Russell I guess) will be working both on OVN and the neutron plugin, so maybe I'm not sure having devstack doing the OVN setup might be helpful for them; on the other hand this might come somewhat handy for setting up CI jobs. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
So, you can either change the command used to start ovsdb-server on your<br>
system, or start up another instance of it with its own unix socket and<br>
tcp port.<br>
<br>
There was also a question on IRC about the format of the database option<br>
for the ML2 driver.  The value is passed directly to ovn-nbctl.  The<br>
format is the same as is used for ovs-vsctl (and probably others).<br></blockquote><div><br></div><div>In the ovs-dev mailing list you said (correctly imo) that openstack should not use nbctl but rather talk directly through ovsdb with the OVN controller.</div><div>It seems here you're stating the ML2 driver will pass down the database connection info to nbctl.</div><div>I don't know if that's your intention, but I would rather avoid having another plugin that uses command line for everything.This would save us the pain of having to scrape through command output, and more importantly will avoid the overhead associated with rootwrap (daemonized or not).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
When running in ovs-sandbox, ovn-nbctl's help output shows:<br>
<br>
  --db=DATABASE             connect to DATABASE<br>
                            (default:<br>
unix:/home/rbryant/src/ovs/tutorial/sandbox/db.sock)<br>
<br>
and further down, it provides some more detail:<br>
<br>
  Active database connection methods:<br>
    tcp:IP:PORT             PORT at remote IP<br>
    ssl:IP:PORT             SSL PORT at remote IP<br>
    unix:FILE               Unix domain socket named FILE<br>
  Passive database connection methods:<br>
    ptcp:PORT[:IP]          listen to TCP PORT on IP<br>
    pssl:PORT[:IP]          listen for SSL on PORT on IP<br>
    punix:FILE              listen on Unix domain socket FILE<br>
<br>
<br>
[1] <a href="http://openvswitch.org/pipermail/dev/2015-March/052757.html" target="_blank">http://openvswitch.org/pipermail/dev/2015-March/052757.html</a><br>
[2] <a href="http://openvswitch.org/pipermail/dev/2015-March/052353.html" target="_blank">http://openvswitch.org/pipermail/dev/2015-March/052353.html</a><br>
<span class=""><font color="#888888"><br>
--<br>
Russell Bryant<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></span></blockquote></div><br></div></div></div>