One more thing occurs to me...
It appears you're using both dpset and topology.
If I understand things correctly, topology is intended to supersede dpset.
So - using both together may not be quite what you mean to be doing.
Nevertheless...
I have a forthcoming patch (in testing) that is intended to better address the
issues
associated with switches disconnecting "uncleanly" - which is really how you'd
characterize
a disconnection wherein you "pulled the plug."
That said - if you are seeing warnings about multiple switch connections, Ryu
should be
doing at least some of the work of cleaning up the previous representation of
that datapath.
EventLeaveSwitch is can be triggered twice by the exit of both the send and
receive threads
of the Datapath, in 3.29. The patch I am testing ensures that, for a given
Datapath object, the
OFPStateChangeEvent representing the DEAD_DISPATCHER state is sent only once.
I'm pretty sure that my original patch (which improved stability somewhat for
unclean
disconnections) introduced the situation of setting the DEAD_DISPATCHER state
twice (and
therefore sending the associated OFPStateChangeEvent twice).
While that is a bug, the topology module should also check to see that the
_get_switch()
method returns a valid switch object, before passing it as a parameter to an
EventSwitchLeave
constructor.
So - there are two bugs.
Beyond that - there should probably be an EventSwitchReconnected class created
for the
topology module, if you want to use that module.
I am willing to generate a patch, if no one beats me to it.
Best,
Victor
--
Victor J. Orlikowski <> vjo@[cs.]duke.edu<http://duke.edu>
On Jan 15, 2016, at 10:24 PM, 俊 赵
<[email protected]<mailto:[email protected]>> wrote:
But I encountered a problem. It seems that when ryu shows warning message with
multiple messages, it will trigger EventSwitchLeave twice, and the second will
show error with "AttributeError: 'NoneType' object has no attribute 'dp'"!
Here is how to hit the problem.
1) create a switch connecting with ryu, and shutdown the switch. Warning: not
using reboot command to shutdown, just pull off the power supply.
2) restart the switch, and this will cause multiple warnings
3) also, this will trigger EventSwitchLeave twice, and the second will show the
error
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel