Hi. How did you produce it? Is it reproducible? OFPHandler.switch_features_handler() sets datapath id before entering into MAIN_DISPATCHER state. So I suspect race.
Since port status modify event without datapath id doesn't make sense, the cause that datapath.id is None event with MAIN_DISPATCHER state should be fixed. thanks, On Mon, Feb 18, 2013 at 08:50:59PM +0900, HIYAMA Manabu wrote: > DPSET: A port was modified.(datapath id = None, port number = 1) > Traceback (most recent call last): > File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 390, in run > result = self._run(*self.args, **self.kwargs) > File > "/usr/local/lib/python2.7/dist-packages/ryu-1.6-py2.7.egg/ryu/base/app_manager.py", > line 86, in _event_loop > handler(ev) > File > "/usr/local/lib/python2.7/dist-packages/ryu-1.6-py2.7.egg/ryu/controller/dpset.py", > line 192, in port_status_handler > self.port_state[datapath.id].modify(port.port_no, port) > KeyError: None > <Greenlet at 0x1c1d8d0: <bound method DPSet._event_loop of > <ryu.controller.dpset.DPSet object at 0x176ef50>>> failed with KeyError > > Signed-off-by: HIYAMA Manabu <hiyama.man...@po.ntts.co.jp> > --- > ryu/controller/dpset.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/ryu/controller/dpset.py b/ryu/controller/dpset.py > index a63ed8b..5becb5f 100644 > --- a/ryu/controller/dpset.py > +++ b/ryu/controller/dpset.py > @@ -189,7 +189,8 @@ class DPSet(app_manager.RyuApp): > LOG.debug('DPSET: A port was modified.' + > '(datapath id = %s, port number = %s)', > datapath.id, port.port_no) > - self.port_state[datapath.id].modify(port.port_no, port) > + if datapath.id is not None: > + self.port_state[datapath.id].modify(port.port_no, port) > self.send_event_to_observers(EventPortModify(datapath, port)) > > def get_port(self, dpid, port_no): > -- > 1.7.9.5 > > > > ------------------------------------------------------------------------------ > The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, > is your hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials, tech docs, > whitepapers, evaluation guides, and opinion stories. Check out the most > recent posts - join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Ryu-devel mailing list > Ryu-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ryu-devel > -- yamahata ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel