Open Giuseppe1992 opened 4 years ago
Hum, I don't think it is a problem with bash, @Giuseppe1992 what's the result of
getconf ARG_MAX
on the machines you are using?
giuseppe@MacBook-Pro-di-Giuseppe ~ % getconf ARG_MAX
262144
ok, so much bigger than the number of bytes in your example.
can you try with the code:
def start( self, controllers ):
"Start up a new OVS OpenFlow switch using ovs-vsctl"
int( self.dpid, 16 ) # DPID must be a hex string
# Command to create controller entries
clist = [ ( self.name + c.name, '%s:%s:%d' %
( c.protocol, c.IP(), c.port ) )
for c in controllers ]
if self.listenPort:
clist.append( ( self.name + '-listen',
'ptcp:%s' % self.listenPort ) )
ccmd = '-- --id=@%s create Controller target=\\"%s\\"'
if self.reconnectms:
ccmd += ' max_backoff=%d' % self.reconnectms
cargs = ' '.join( ccmd % ( name, target )
for name, target in clist )
# Controller ID list
cids = ','.join( '@%s' % name for name, _target in clist )
# Try to delete any existing bridges with the same name
if not self.isOldOVS():
cargs += ' -- --if-exists del-br %s' % self
# One ovs-vsctl command to rule them all!
self.vsctl( cargs +
' -- add-br %s' % self +
' -- set bridge %s controller=[%s]' % ( self, cids ) +
self.bridgeOpts() +
intfs )
# Command to add interfaces
for intf in self.intfList():
if self.ports[ intf ] and not intf.IP():
cmd = ' -- add-port %s %s' % ( self, intf )
cmd = cmd + self.intfOpts( intf )
self.vsctl( cmd )
# If necessary, restore TC config overwritten by OVS
if not self.batch:
for intf in self.intfList():
self.TCReapply( intf )
If the network contains a switch that has more than 40 links, it blocks the creation of the network. I tried with a star network with 41 switches.
My guess is that the ssh command used to start the switch is too long.
Distrinet/mininet/mininet/cloudswitch.py
in my case the *args parameter in the vsctl function is: