I suspect discovery is fine and the problem is in topology, which is 
(unfortunately) a piece of junk and I should just delete it until something 
better can be written.  I suggest that if you want to track topology, you just 
watch discovery events.  See POXDesk's tinytopo.py for an example.

You also might check Kyriakos' POX branch which has a somewhat better topology 
module.

If you really want topology to "work", try setting _next_id on line 120 of 
topology/topology.py to 0x1000000000000L.

-- Murphy

On Nov 16, 2012, at 12:42 PM, Tmusic wrote:

> For I while I've been testing with POX (betta branch) and mininet in a VM.
> Everything goes well until a "larger" number of switches is fired up.
> Not all switches are added to the topology...
> 
> Steps to reproduce (example of where it goes wrong):
> - start mininet with sudo mn --switch ovsk --controller remote --topo 
> tree,depth=4,fanout=3 --mac (this will start about 40 switches)
> - start pox with these components: topology openflow.topology 
> openflow.discovery
> - Only 22 switches are discovered
> 
> There are some errors in the output (see trace below), but the total number 
> of "ID already taken" errors does not equal the total number of missing 
> switches.
> 
> I updated mininet to the most recent stable (1.0 series) version to eliminate 
> mininet problems, but without result. I was thinking in the direction of 
> duplicate dpid's, but I guess that in that case the number of errors should 
> be equal to the number of missing switches (and equal to the number of 
> duplicate dpid's)?
> I haven't found any obvious issues in the wireshark dump (but it's easy to 
> look over with this number of connections)...
> 
> Any ideas or similar problems?
> 
> Thank you in advance,
> 
> Tim
> 
> 
> 
> 
> DEBUG TRACE
> pydev debugger: starting
> POX 0.0.0 / Copyright 2011-2012 James McCauley, et al.
> DEBUG:core:POX 0.0.0 going up...
> DEBUG:core:Running on CPython (2.7.1+/Apr 11 2011 18:05:24)
> DEBUG:core:Platform is Linux-2.6.38-8-generic-i686-with-Ubuntu-11.04-natty
> INFO:core:POX 0.0.0 is up.
> DEBUG:openflow.of_01:Listening on 0.0.0.0:6633
> INFO:openflow.of_01:[00-00-00-00-00-76 1] connected
> DEBUG:openflow.discovery:Installing flow for 00-00-00-00-00-76
> INFO:openflow.topology:Switch 00-00-00-00-00-76 connected
> DEBUG:topology:<OpenFlowSwitch 00-00-00-00-00-76> (id: 118) joined
> INFO:openflow.of_01:[00-00-00-00-00-66 2] connected
> DEBUG:openflow.discovery:Installing flow for 00-00-00-00-00-66
>   File "/usr/lib/python2.7/threading.py", line 525, in __bootstrap
>     self.__bootstrap_inner()
>   File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
>     self.run()
>   File "/usr/lib/python2.7/threading.py", line 505, in run
>     self.__target(*self.__args, **self.__kwargs)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/recoco/recoco.py", 
> line 250, in run
>     r = self.cycle()
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/recoco/recoco.py", 
> line 276, in cycle
>     rv = t.execute()
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/recoco/recoco.py", 
> line 94, in execute
>     return self.gen.send(v)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/of_01.py", 
> line 835, in run
>     if con.read() is False:
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/of_01.py", 
> line 705, in read
>     h(self, msg)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/of_01.py", 
> line 173, in handle_BARRIER
>     con.raiseEventNoErrors(BarrierIn, con, msg)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 233, in raiseEventNoErrors
>     return self.raiseEvent(event, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 280, in raiseEvent
>     rv = event._invoke(handler, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 158, in _invoke
>     return handler(self, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/of_01.py", 
> line 118, in finish_connecting
>     con.ofnexus.raiseEventNoErrors(ConnectionUp, con, msg)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 233, in raiseEventNoErrors
>     return self.raiseEvent(event, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 280, in raiseEvent
>     rv = event._invoke(handler, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 158, in _invoke
>     return handler(self, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/topology.py", 
> line 88, in _handle_openflow_ConnectionUp
>     sw._setConnection(event.connection, event.ofp)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/topology.py", 
> line 216, in _setConnection
>     self.ports[p.port_no] = OpenFlowPort(p)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/topology.py", 
> line 118, in __init__
>     Port.__init__(self, ofp.port_no, ofp.hw_addr, ofp.name)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/topology/topology.py", 
> line 164, in __init__
>     Entity.__init__(self)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/topology/topology.py", 
> line 134, in __init__
>     self._tb[id] = traceback.extract_stack()
> 
> ERROR:core:Exception while handling OpenFlowNexus!ConnectionUp...
> Traceback (most recent call last):
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 233, in raiseEventNoErrors
>     return self.raiseEvent(event, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 280, in raiseEvent
>     rv = event._invoke(handler, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/lib/revent/revent.py", 
> line 158, in _invoke
>     return handler(self, *args, **kw)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/topology.py", 
> line 82, in _handle_openflow_ConnectionUp
>     sw = OpenFlowSwitch(event.dpid)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/topology.py", 
> line 184, in __init__
>     Switch.__init__(self, id=dpid)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/topology/topology.py", 
> line 160, in __init__
>     Entity.__init__(self, id)
>   File "/home/openflow/pox_workspace/OFcontroller/pox/topology/topology.py", 
> line 128, in __init__
>     raise Exception("ID %s already taken" % str(id))
> Exception: ID 102 already taken
> INFO:openflow.of_01:[00-00-00-00-00-72 4] connected
> DEBUG:openflow.discovery:Installing flow for 00-00-00-00-00-72
> INFO:openflow.topology:Switch 00-00-00-00-00-72 connected
> DEBUG:topology:<OpenFlowSwitch 00-00-00-00-00-72> (id: 114) joined
> INFO:openflow.of_01:[00-00-00-00-00-64 3] connected
> DEBUG:openflow.discovery:Installing flow for 00-00-00-00-00-64
> 

Reply via email to