BUG 2112: Workaround for missing flows in POC demo. 12/11712/1
authorThomas Bachman <tbachman@yahoo.com>
Wed, 1 Oct 2014 23:02:42 +0000 (16:02 -0700)
committerThomas Bachman <tbachman@yahoo.com>
Wed, 1 Oct 2014 23:04:13 +0000 (16:04 -0700)
When the POC demo is run, one of the vSwitches occasionally
is missing some of its flows, due to a problem in the openflowplugin.
This commit introduces a workaround to avoid this problem and allow
the demo to work.

Signed-off-by: Thomas Bachman <tbachman@yahoo.com>
Change-Id: I0f7dca025b30b032d68ee1bd83d0e82966efa2df

util/testOfOverlay/mininet_gbp.py

index 7a47a2620b804ccd6f0e59beacb8d0f22edfac02..69b1123c946e942f9501d98c7d6b74d4eff70e7f 100644 (file)
@@ -11,6 +11,9 @@ import time
 from subprocess import call
 from subprocess import check_output
 
+def addController(sw, ip):
+    call(['ovs-vsctl', 'set-controller', sw, 'tcp:%s:6653' % ip ])
+
 def addSwitch(net, name, dpid=None):
     switch = net.addSwitch(name, dpid=dpid)
     return switch
@@ -41,8 +44,6 @@ def startMininet(switches, hosts, contIP='127.0.0.1'):
     net = Mininet(controller=None,
                   autoSetMacs=True,
                   listenPort=6634)
-    net.addController('c0', controller=RemoteController, 
-                      ip=contIP, port=6653)
 
     swobjs = {}
     swports = {}
@@ -74,6 +75,7 @@ def startMininet(switches, hosts, contIP='127.0.0.1'):
 
         for sw in switches:
             setOFVersion(sw['name'])
+            addController(sw['name'], contIP)
 
         return net
     except Exception, e: