Skip to content
Snippets Groups Projects
Commit 448ac9dc authored by Bob's avatar Bob
Browse files

Merge pull request #150 from MurphyMc/ovs_fast_reconnect

node: Make OVS switches reconnect quickly
parents dd21df3c 3df07feb
No related branches found
No related tags found
No related merge requests found
......@@ -979,6 +979,19 @@ def start( self, controllers ):
if self.listenPort:
clist += ' ptcp:%s' % self.listenPort
self.cmd( 'ovs-vsctl set-controller', self, clist )
# Set controllers to reconnect quickly
controllers = self.cmd( 'ovs-vsctl --columns=controller find Bridge '
'name=' + str(self) ).split(':',2)[-1].strip()
if controllers.startswith('[') and controllers.endswith(']'):
controllers = [c.strip() for c in controllers[1:-1].split(',')]
for uuid in controllers:
if uuid.count('-') != 4:
# Doesn't look like a UUID
continue
uuid = uuid.strip()
self.cmd( 'ovs-vsctl set Controller', uuid,
'max_backoff=1000' )
def stop( self ):
"Terminate OVS switch."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment