[ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Rana, JaiSingh
Hi,


Currently in Openvswitch-2.7.1, ovn-controller hard codes connection method for 
ovs-ofctl invokation as unix:file as  assumption is  there will be unix file 
created by vswitchd in OVS_RUNDIR for managing OF controller on bridge e.g. 
br-int.mgmt


There is an issue in our Openvswitch offload model where  vswitchd is running 
on nic  and ovn-controller on host.  As there is no option for telling 
ovn-controller to use tcp:port connection method for ovs-ofctl , flows are not 
being pushed to vswitchd.


For providing the patch, need some input. Should connection method be provided 
as an argument to ovn-controller or it can be written to 
/etc/sysconfig/openvswitch from where ovn-controller can read and use if option 
is present otherwise it defaults to unix file method.



Thanks,

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


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Rana, JaiSingh
Thanks Richardson for the suggestion.


This seems to be a better way than using some configuration file for picking 
connection method. I will look into code for changes required.


-Jai



From: Lance Richardson 
Sent: 13 July 2017 19:05
To: Rana, JaiSingh
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
ovs-ofctl invocation.

> From: "JaiSingh Rana" 
> To: ovs-discuss@openvswitch.org
> Sent: Thursday, 13 July, 2017 3:49:15 AM
> Subject: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl  
> invocation.
>
>
>
> Hi,
>
>
>
>
> Currently in Openvswitch-2.7.1, ovn-controller hard codes connection method
> for ovs-ofctl invokation as unix:file as assumption is there will be unix
> file created by vswitchd in OVS_RUNDIR for managing OF controller on bridge
> e.g. br-int.mgmt
>
>
>
>
> There is an issue in our Openvswitch offload model where vswitchd is running
> on nic and ovn-controller on host. As there is no option for telling
> ovn-controller to use tcp:port connection method for ovs-ofctl , flows are
> not being pushed to vswitchd.
>
>
>
>
> For providing the patch, need some input. Should connection method be
> provided as an argument to ovn-controller or it can be written to
> /etc/sysconfig/openvswitch from where ovn-controller can read and use if
> option is present otherwise it defaults to unix file method.
>
>

My suggestion would be to use external-ids in the local ovsdb, as is
currently done for ovn-remote and ovn-encap. Maybe something like:

ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd

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


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Rana, JaiSingh
Ben,
ovn-controller does invoke ovs-ofctl to push flows to vswitchd in 
ovn/controller/ofctrl.c and ovn/controller/pinctrl.c

 Therefore I guess naming this external id(TODO)as ovn-ofctl does make some 
sense. 

Thanks,
Jai





On July 13, 2017 10:23:14 PM Lance Richardson  wrote:

>> From: "Ben Pfaff" 
>> To: "Lance Richardson" 
>> Cc: "JaiSingh Rana" , ovs-discuss@openvswitch.org
>> Sent: Thursday, 13 July, 2017 12:47:47 PM
>> Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
>> ovs-ofctl invocation.
>> 
>> On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
>> > > From: "JaiSingh Rana" 
>> > > To: ovs-discuss@openvswitch.org
>> > > Sent: Thursday, 13 July, 2017 3:49:15 AM
>> > > Subject: [ovs-discuss] Remote connection method for ovn-controller
>> > > ovs-ofctlinvocation.
>> > > 
>> > > 
>> > > 
>> > > Hi,
>> > > 
>> > > 
>> > > 
>> > > 
>> > > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection
>> > > method
>> > > for ovs-ofctl invokation as unix:file as assumption is there will be unix
>> > > file created by vswitchd in OVS_RUNDIR for managing OF controller on
>> > > bridge
>> > > e.g. br-int.mgmt
>> > > 
>> > > 
>> > > 
>> > > 
>> > > There is an issue in our Openvswitch offload model where vswitchd is
>> > > running
>> > > on nic and ovn-controller on host. As there is no option for telling
>> > > ovn-controller to use tcp:port connection method for ovs-ofctl , flows
>> > > are
>> > > not being pushed to vswitchd.
>> > > 
>> > > 
>> > > 
>> > > 
>> > > For providing the patch, need some input. Should connection method be
>> > > provided as an argument to ovn-controller or it can be written to
>> > > /etc/sysconfig/openvswitch from where ovn-controller can read and use if
>> > > option is present otherwise it defaults to unix file method.
>> > > 
>> > > 
>> > 
>> > My suggestion would be to use external-ids in the local ovsdb, as is
>> > currently done for ovn-remote and ovn-encap. Maybe something like:
>> > 
>> > ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd
>> 
>> Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
>> ovs-ofctl.
>> 
>
> Well, I'm terrible with naming things, and should have added a comment to that
> effect :-) 
>
> My rationale for "ovn-ofctl" was shallowly based on the the related file,
> ovn/controller/ofctrl.c (well, I omitted the 'r' for some reason,.)
>
> What would be a more appropriate name?
>
> Thanks,
>Lance
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Rana, JaiSingh
Hi Ben, 
Sorry for the confusion. I meant ovn-controller invocation of function for 
pushing open-flows   from southdb to vswitchd which is running in nic using tcp 
connection and I agree with Lance that using external-ids for this purpose 
might be better idea.
Also for now, only this assumption i.e. ovn-controller and vswitchd are running 
on same host is blocking me. As as a proof of concept, i hardcoded tcp 
connection instead of unix socket file in ovn and now flows are getting updated 
in vswitchd. 
Other configuration change that is done is to setup OF controller on 
integration bridge with ptcp instead of tcp method. 

Thanks,
Jai


On July 13, 2017 10:35:07 PM Ben Pfaff  wrote:

> On Thu, Jul 13, 2017 at 12:53:11PM -0400, Lance Richardson wrote:
>> > From: "Ben Pfaff" 
>> > To: "Lance Richardson" 
>> > Cc: "JaiSingh Rana" , ovs-discuss@openvswitch.org
>> > Sent: Thursday, 13 July, 2017 12:47:47 PM
>> > Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
>> > ovs-ofctl   invocation.
>> > 
>> > On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
>> > > > From: "JaiSingh Rana" 
>> > > > To: ovs-discuss@openvswitch.org
>> > > > Sent: Thursday, 13 July, 2017 3:49:15 AM
>> > > > Subject: [ovs-discuss] Remote connection method for ovn-controller
>> > > > ovs-ofctl  invocation.
>> > > > 
>> > > > 
>> > > > 
>> > > > Hi,
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection
>> > > > method
>> > > > for ovs-ofctl invokation as unix:file as assumption is there will be 
>> > > > unix
>> > > > file created by vswitchd in OVS_RUNDIR for managing OF controller on
>> > > > bridge
>> > > > e.g. br-int.mgmt
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > There is an issue in our Openvswitch offload model where vswitchd is
>> > > > running
>> > > > on nic and ovn-controller on host. As there is no option for telling
>> > > > ovn-controller to use tcp:port connection method for ovs-ofctl , flows
>> > > > are
>> > > > not being pushed to vswitchd.
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > For providing the patch, need some input. Should connection method be
>> > > > provided as an argument to ovn-controller or it can be written to
>> > > > /etc/sysconfig/openvswitch from where ovn-controller can read and use 
>> > > > if
>> > > > option is present otherwise it defaults to unix file method.
>> > > > 
>> > > > 
>> > > 
>> > > My suggestion would be to use external-ids in the local ovsdb, as is
>> > > currently done for ovn-remote and ovn-encap. Maybe something like:
>> > > 
>> > > ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd
>> > 
>> > Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
>> > ovs-ofctl.
>> > 
>> 
>> Well, I'm terrible with naming things, and should have added a comment to 
>> that
>> effect :-) 
>> 
>> My rationale for "ovn-ofctl" was shallowly based on the the related file,
>> ovn/controller/ofctrl.c (well, I omitted the 'r' for some reason,.)
>> 
>> What would be a more appropriate name?
>
> I really should have directed that to the original poster, since he
> suggested that ovs-ofctl was involved.
>
> Probably, something that used words like "switch", "openflow", "remote",
> "connection", "ovs", etc., like "ovn-switch-connection".
>
> However, this is not going to be the only problem that the OP will
> encounter, since ovn-controller makes other assumptions that it is
> running on the ovs-switchd host.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] ovn-bridge-mappings configuration issue.

2017-08-21 Thread Rana, JaiSingh
Hi,


For configuring external gateway, ovn-controller man page says:

"

external_ids:ovn-bridge-mappings
 A list of key-value pairs that map a physical network name 
to a local ovs bridge that  provides  connectivity
 to  that  network.   An  example  value mapping two 
physical network names to two ovs bridges would be: phys‐
 net1:br-eth0,physnet2:br-eth1.
"

Created bridge br-ex and attached an interface p1p2 having external 
connectivity.


# ovs-vsctl --may-exist add-br br-ex -- set bridge br-ex protocols=OpenFlow13

# ovs-vsctl set open . external-ids:ovn-bridge-mappings=provider:br-ex
# ovs-vsctl --may-exist add-port br-ex p1p2


After configuring Openstack with external networks, ovn-controller on compute 
actually looks for bridge named "provider" in  ovn/controller/patch.c : 
add_bridge_mappings, which of-course is not created but throws error that 
"br-ex" not found as can be seen in ovn-controller.log

"2017-08-18T11:20:30.477Z|04536|patch|ERR| bridge not found for localnet port 
'provnet-03bf-ad69-4225-b69c-0cd23d7969af' with network name 'br-ex'"

When this external-id is defined as ovn-bridge-mappings=br-ex:br-ex, it works 
fine and no error is thrown.


Is this a bug or the field before ":" in this external-id represents bridge 
name.


Thanks,

Jai



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


Re: [ovs-discuss] ovn-bridge-mappings configuration issue.

2017-08-22 Thread Rana, JaiSingh
Hi Russel,


Thanks for quick reply. Yes i created external network on controller node with

neutron net-create NET-EXT --provider:network_type flat 
--provider:physical_network br-ex --router:external=true --shared

Once i corrected option '--provider' option with '--provider:physical_network 
provider', its working fine on compute node.

-Jai



From: Russell Bryant 
Sent: 21 August 2017 21:17
To: Rana, JaiSingh
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] ovn-bridge-mappings configuration issue.

On Mon, Aug 21, 2017 at 7:43 AM, Rana, JaiSingh
 wrote:
> Hi,
>
> For configuring external gateway, ovn-controller man page says:
>
> "
>
> external_ids:ovn-bridge-mappings
>  A list of key-value pairs that map a physical network
> name to a local ovs bridge that  provides  connectivity
>  to  that  network.   An  example  value mapping two
> physical network names to two ovs bridges would be: phys‐
>  net1:br-eth0,physnet2:br-eth1.
> "
>
>
> Created bridge br-ex and attached an interface p1p2 having external
> connectivity.
>
>
> # ovs-vsctl --may-exist add-br br-ex -- set bridge br-ex
> protocols=OpenFlow13
>
> # ovs-vsctl set open . external-ids:ovn-bridge-mappings=provider:br-ex
> # ovs-vsctl --may-exist add-port br-ex p1p2
>
>
> After configuring Openstack with external networks, ovn-controller on
> compute actually looks for bridge named "provider" in
> ovn/controller/patch.c : add_bridge_mappings, which of-course is not created
> but throws error that "br-ex" not found as can be seen in ovn-controller.log
>
> "2017-08-18T11:20:30.477Z|04536|patch|ERR| bridge not found for localnet
> port 'provnet-03bf-ad69-4225-b69c-0cd23d7969af' with network name
> 'br-ex'"
>
> When this external-id is defined as ovn-bridge-mappings=br-ex:br-ex, it
> works fine and no error is thrown.
>
>
> Is this a bug or the field before ":" in this external-id represents bridge
> name.

The error message indicates that a "localnet" was created with a
"network_name" of "br-ex".  The "network_name" should be set to
"provider" in this example.

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