hi,

just FYI: floodlight internally holds PORT_STATUS messages during
handshake and process them later.

YAMAMOTO Takashi

>> > > Hi. How did you produce it? Is it reproducible?
>> 
>> Thank you. I don't see anything wrong in the procedure for now.
>> I'll look into it.
> 
> Thanks in advance.
> 
> Seems to occur in the case when the port status has changed before
> entering into MAIN_DISPATCHER.
> 
> I feel that the same problem also exists get_ports(), _port_deleted(), and
> _port_added().
> 
> For example, as the following:
> 
> $ ryu-manager ryu-app
> $ sudo ovs-vsctl set-controller br1 tcp:127.0.0.1 && sudo ovs-vsctl add-port 
> br1 p1
> connected socket:<socket fileno=4 sock=127.0.0.1:6633 peer=127.0.0.1:41762> 
> address:('127.0.0.1', 41762)
> EVENT ofp_event->dpset EventOFPStateChange
> hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x146aed0>
> unsupported version 0x1. If possible, set the switch to use one of the 
> versions [3]
> error msg ev version: 0x3 msg_type 0x1 xid 0x80be798a type 0x1 code 0x1 0x3 
> 0x1 0x0 0x5f 0x80 0xbe 0x79 0x8a 0x0 0x0 0x0 0x0 0x75 0x6e 0x73 0x75 0x70 
> 0x70 0x6f 0x72 0x74 0x65 0x64 0x20 0x76 0x65 0x72 0x73 0x69 0x6f 0x6e 0x20 
> 0x30 0x78 0x31 0x2e 0x20 0x49 0x66 0x20 0x70 0x6f 0x73 0x73 0x69 0x62 0x6c 
> 0x65 0x2c 0x20 0x73 0x65 0x74 0x20 0x74 0x68 0x65 0x20 0x73 0x77 0x69 0x74 
> 0x63 0x68
> EVENT ofp_event->dpset EventOFPPortStatus
> DPSET: A port was added.(datapath id = None, port number = 15)
> Traceback (most recent call last):
>   File "/usr/local/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 179, in port_status_handler
>     self._port_added(datapath, port)
>   File 
> "/usr/local/lib/python2.7/dist-packages/ryu-1.6-py2.7.egg/ryu/controller/dpset.py",
>  line 144, in _port_added
>     self.port_state[datapath.id].add(port.port_no, port)
> KeyError: None
> <Greenlet at 0x1219f50: <bound method DPSet._event_loop of 
> <ryu.controller.dpset.DPSet object at 0xff1a50>>> failed with KeyError
> 
> 
> 
>> > 
>> > In the following sequence:
>> > (I do not know why that did occur EventOFPPortStatus.)
>> >   $ ryu-manager ryu_app(OF1.2 app)
>> >   $ sudo mn --controller remote 127.0.0.1
>> >   $ sudo ovs-vsctl set bridge s1 protocols='[OpenFlow10,OpenFlow12]'
>> > connected socket:<socket fileno=4 sock=127.0.0.1:6633 
>> > peer=127.0.0.1:60456> address:('127.0.0.1', 60456)
>> > EVENT ofp_event->dpset EventOFPStateChange
>> > connected socket:<socket fileno=10 sock=127.0.0.1:6633 
>> > peer=127.0.0.1:60457> address:('127.0.0.1', 60457)
>> > EVENT ofp_event->dpset EventOFPStateChange
>> > hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x11bf550>
>> > unsupported version 0x1. If possible, set the switch to use one of the 
>> > versions [3]
>> > error msg ev version: 0x3 msg_type 0x1 xid 0xc84d9220 type 0x1 code 0x1 
>> > 0x3 0x1 0x0 0x5f 0xc8 0x4d 0x92 0x20 0x0 0x0 0x0 0x0 0x75 0x6e 0x73 0x75 
>> > 0x70 0x70 0x6f 0x72 0x74 0x65 0x64 0x20 0x76 0x65 0x72 0x73 0x69 0x6f 0x6e 
>> > 0x20 0x30 0x78 0x31 0x2e 0x20 0x49 0x66 0x20 0x70 0x6f 0x73 0x73 0x69 0x62 
>> > 0x6c 0x65 0x2c 0x20 0x73 0x65 0x74 0x20 0x74 0x68 0x65 0x20 0x73 0x77 0x69 
>> > 0x74 0x63 0x68
>> > EVENT ofp_event->dpset EventOFPPortStatus
>> > 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 0x11bc518: <bound method DPSet._event_loop of 
>> > <ryu.controller.dpset.DPSet object at 0xd0df10>>> failed with KeyError
>> > 
>> > Not occur in the following sequence:
>> >   $ sudo mn --controller remote 127.0.0.1
>> >   $ ryu-manager ryu_app(OF1.2 app)
>> >   $ sudo ovs-vsctl set bridge s1 protocols='[OpenFlow10,OpenFlow12]'
>> > connected socket:<socket fileno=4 sock=127.0.0.1:6633 
>> > peer=127.0.0.1:60468> address:('127.0.0.1', 60468)
>> > EVENT ofp_event->dpset EventOFPStateChange
>> > hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x30d7150>
>> > unsupported version 0x1. If possible, set the switch to use one of the 
>> > versions [3]
>> > error msg ev version: 0x3 msg_type 0x1 xid 0x18c5b0c5 type 0x1 code 0x1 
>> > 0x3 0x1 0x0 0x5f 0x18 0xc5 0xb0 0xc5 0x0 0x0 0x0 0x0 0x75 0x6e 0x73 0x75 
>> > 0x70 0x70 0x6f 0x72 0x74 0x65 0x64 0x20 0x76 0x65 0x72 0x73 0x69 0x6f 0x6e 
>> > 0x20 0x30 0x78 0x31 0x2e 0x20 0x49 0x66 0x20 0x70 0x6f 0x73 0x73 0x69 0x62 
>> > 0x6c 0x65 0x2c 0x20 0x73 0x65 0x74 0x20 0x74 0x68 0x65 0x20 0x73 0x77 0x69 
>> > 0x74 0x63 0x68
>> > 
>> > 
>> > Environment that reproduces:
>> > - ryu: git://github.com/osrg/ryu.git
>> > - mininet: git://github.com/mininet/mininet.git
>> > - ovs: git://openvswitch.org/openvswitch -b of12
>> > 
>> > Is there something wrong with my procedure?
>> > Currently, I have tested the following procedure.
>> >   $ ryu-manager ryu_app(OF1.2 app)
>> >   $ sudo mn --controller none
>> >   $ sudo ovs-vsctl set bridge s1 protocols='[OpenFlow10,OpenFlow12]'
>> >   $ sudo ovs-vsctl set-controller s1 tcp:127.0.0.1
>> > 
>> > thanks,
>> > 
>> > 
>> > 
>> > > 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
>> > 
>> > 
>> 
>> -- 
>> 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
> 
> ---------------------------------------
> NTTソフトウェア株式会社
> 技術開発センター OSS基盤技術部門
> 
>  檜山 学 (Hiyama Manabu)
> 
> TEL: 045-212-7393 FAX: 045-662-7856
> ---------------------------------------
> 
> 
> 
> ------------------------------------------------------------------------------
> 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

------------------------------------------------------------------------------
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

Reply via email to