diff mbox

[ovs-dev] vtep/ovs-vtep: support multiple ovs-vtep processes which using the isolated logical-switch

Message ID DF6B27DC-21FE-408A-B207-17EE21B0320A@opencloud.tech
State Superseded
Headers show

Commit Message

nickcooper-zhangtonghao May 1, 2016, 11:15 p.m. UTC
Hi all,
	The computer can run multiple ovs-vtep processes, but ovs-vtep processes share the “vtep_lsX” bridge when binding the physical-switch and logical-switch. The bridge created by logical-switch should be named  according to logical-switch.

signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech>

Comments

Darrell Ball May 2, 2016, 9:48 p.m. UTC | #1
On Sun, May 1, 2016 at 4:15 PM, nickcooper-zhangtonghao <
nickcooper-zhangtonghao@opencloud.tech> wrote:

> Hi all,
>         The computer can run multiple ovs-vtep processes, but ovs-vtep
> processes share the “vtep_lsX” bridge when binding the physical-switch and
> logical-switch. The bridge created by logical-switch should be named
> according to logical-switch.
>


You want to run multiple copies of the vtep simulator - ovs-vtep, sharing
the same ovsdb and vswitchd it seems.

Hence, from the code, you need to disambiguate logical switch contexts
maintained by each ovs-vtep physical switch while using a single ovsdb
server and single vswitchd. You did this by including the physical switch
name as part of the logical switch name.

Can you change the commit message to something similar to - Include
ovs-vtep physical switch name as part of logical switch name to support
running multiple ovs-vtep processes sharing the same ovsdb and vswitchd.

I did an initial test using the OVN gateway test case and did not see any
issues with the proposed diff.










>
> signed-off-by: nickcooper-zhangtonghao
> <nickcooper-zhangtonghao@opencloud.tech>
>
> --- vtep/ovs-vtep       2016-05-01 09:42:08.903583112 -0400
> +++ vtep/ovs-vtep.new   2016-05-01 08:15:19.352586815 -0400
> @@ -81,11 +81,11 @@ def unixctl_exit(conn, unused_argv, unus
>
>
>  class Logical_Switch(object):
> -    def __init__(self, ls_name):
> +    def __init__(self, ls_name, ps_name):
>          global ls_count
>          self.name = ls_name
>          ls_count += 1
> -        self.short_name = "vtep_ls" + str(ls_count)
> +        self.short_name = ps_name + "_vtep_ls" + str(ls_count)
>          vlog.info("creating lswitch %s (%s)" % (self.name,
> self.short_name))
>          self.ports = {}
>          self.tunnels = {}
> @@ -583,7 +583,7 @@ def handle_physical():
>          for b in binding_set:
>              vlan, ls_name = b.split()
>              if ls_name not in Lswitches:
> -                Lswitches[ls_name] = Logical_Switch(ls_name)
> +                Lswitches[ls_name] = Logical_Switch(ls_name, ps_name)
>
>              binding = "%s-%s" % (vlan, pp_name)
>              ls = Lswitches[ls_name]
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
diff mbox

Patch

--- vtep/ovs-vtep	2016-05-01 09:42:08.903583112 -0400
+++ vtep/ovs-vtep.new	2016-05-01 08:15:19.352586815 -0400
@@ -81,11 +81,11 @@  def unixctl_exit(conn, unused_argv, unus


 class Logical_Switch(object):
-    def __init__(self, ls_name):
+    def __init__(self, ls_name, ps_name):
         global ls_count
         self.name = ls_name
         ls_count += 1
-        self.short_name = "vtep_ls" + str(ls_count)
+        self.short_name = ps_name + "_vtep_ls" + str(ls_count)
         vlog.info("creating lswitch %s (%s)" % (self.name, self.short_name))
         self.ports = {}
         self.tunnels = {}
@@ -583,7 +583,7 @@  def handle_physical():
         for b in binding_set:
             vlan, ls_name = b.split()
             if ls_name not in Lswitches:
-                Lswitches[ls_name] = Logical_Switch(ls_name)
+                Lswitches[ls_name] = Logical_Switch(ls_name, ps_name)

             binding = "%s-%s" % (vlan, pp_name)
             ls = Lswitches[ls_name]