From bea56d8ffe2f30c245f665ffc6e52103ad250166 Mon Sep 17 00:00:00 2001 From: nickcooper-zhangtonghao Date: Thu, 5 May 2016 23:07:57 -0400 Subject: [PATCH] ovs-vtep: Support running multiple ovs-vtep processes 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 Tested-by: Darrell Ball Acked-by: Justin Pettit Signed-off-by: Ben Pfaff --- AUTHORS | 1 + vtep/ovs-vtep | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 22f527cc9..39ac60bfd 100644 --- 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 diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep index a8ffb668a..61079491b 100755 --- a/vtep/ovs-vtep +++ b/vtep/ovs-vtep @@ -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] -- 2.39.5