ovs-vtep: Support running multiple ovs-vtep processes
authornickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech>
Fri, 6 May 2016 03:07:57 +0000 (23:07 -0400)
committerBen Pfaff <blp@ovn.org>
Wed, 18 May 2016 17:21:50 +0000 (10:21 -0700)
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.

Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech>
Tested-by: Darrell Ball <dlu998@gmail.com>
Acked-by: Justin Pettit <jpettit@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
AUTHORS
vtep/ovs-vtep

diff --git a/AUTHORS b/AUTHORS
index 22f527c..39ac60b 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -246,6 +246,7 @@ Zoltán Balogh           zoltan.balogh@ericsson.com
 Zoltan Kiss             zoltan.kiss@citrix.com
 Zhi Yong Wu             zwu.kernel@gmail.com
 Zang MingJie            zealot0630@gmail.com
+nickcooper-zhangtonghao nickcooper-zhangtonghao@opencloud.tech
 xushengping             shengping.xu@huawei.com
 yinpeijun               yinpeijun@huawei.com
 
index a8ffb66..6107949 100755 (executable)
@@ -81,11 +81,11 @@ def unixctl_exit(conn, unused_argv, unused_aux):
 
 
 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 = {}
@@ -610,7 +610,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]