Yes, I noticed that topology is intended to supersede dpset. The reason why I 
use dpset is that I did not find any event related with reconnected in topology 
module.
The reason why I want to handle reconnected event is that I have ryu controller 
in Oregon US, and many switches located around the world. I noticed that after 
long time(may be one day) running some switch always generate multiple 
connections warnings. So I want to handle this event.
It is very kind of you to add EventSwitchReconnected in topology. that may help 
me a lot.
And just a moment before, I noticed that even I reboot the switch, 
EventSwitchLeave can be triggered twice.
Thank you.

Zhao Jun

From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [Ryu-devel] [maybe a bug] dpset : multiple connections
Date: Sat, 16 Jan 2016 04:48:34 +0000






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



On Jan 15, 2016, at 10:24 PM, 俊 赵 <[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

Reply via email to