Thanks Iwase for taking time to fix the indentation error. I would try
autopep8, in my environment code was running for some reason.
Looks like the issue that I am having is not there in your environment.
I am using RYU-4.21, and OVS-2.5.2. May be i need to upgrade my setup.

Thanks!
Taha

On Sun, Mar 4, 2018 at 9:08 PM, Iwase Yusuke <iwase.yusu...@gmail.com>
wrote:

> Hi Taha,
>
> I couldn't launch your Ryu application on my environment...
>
>
> (py27) $ ryu-manager shared_arp.py
> loading app shared_arp.py
> Traceback (most recent call last):
>   File "/home/iwase/ryu/.tox/py27/bin/ryu-manager", line 11, in <module>
>     load_entry_point('ryu==4.23', 'console_scripts', 'ryu-manager')()
>   File 
> "/home/iwase/ryu/.tox/py27/local/lib/python2.7/site-packages/ryu/cmd/manager.py",
> line 98, in main
>     app_mgr.load_apps(app_lists)
>   File 
> "/home/iwase/ryu/.tox/py27/local/lib/python2.7/site-packages/ryu/base/app_manager.py",
> line 415, in load_apps
>     cls = self.load_app(app_cls_name)
>   File 
> "/home/iwase/ryu/.tox/py27/local/lib/python2.7/site-packages/ryu/base/app_manager.py",
> line 392, in load_app
>     mod = utils.import_module(name)
>   File 
> "/home/iwase/ryu/.tox/py27/local/lib/python2.7/site-packages/ryu/utils.py",
> line 104, in import_module
>     return importlib.import_module(modname)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
> import_module
>     __import__(name)
>   File "/home/iwase/ryu/shared_arp.py", line 171
>     switch_list = get_switch(self.topology_api_app, None)
>     ^
> IndentationError: unexpected indent
>
>
> I tried to fix this indentation error, similar errors ware shown.
> I recommend to sort out indentations. "autopep8" is very helpful!
>
> After my fixation, I couldn't reproduce the issue you mentioned.
> Ryu was running on the stable state as following.
>
>
> $ ryu-manager shared_arp.py
> loading app shared_arp.py
> loading app ryu.topology.switches
> loading app ryu.controller.ofp_handler
> instantiating app None of DPSet
> creating context dpset
> instantiating app ryu.topology.switches of Switches
> instantiating app shared_arp.py of SimpleSwitch14
> instantiating app ryu.controller.ofp_handler of OFPHandler
> dpid Join SW {6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>}
> port state change event triggered
> Switch_Enter : EventSwitchEnter<dpid=6, 3 ports>
> Switch_port_table :{6: set([1, 2, 3])}
> datpath_list {6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>} =
> dpid Join SW {5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>}
> port state change event triggered
> dpid Join SW {3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>}
> port state change event triggered
> dpid Join SW {3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 4: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b790>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>}
> port state change event triggered
> dpid Join SW {1: <ryu.controller.controller.Datapath object at
> 0x7f0b72443350>, 3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 4: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b790>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>}
> port state change event triggered
> Switch_Enter : EventSwitchEnter<dpid=5, 3 ports>
> Switch_port_table :{1: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 6: set([1, 2,
> 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> datpath_list {1: <ryu.controller.controller.Datapath object at
> 0x7f0b72443350>, 3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 4: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b790>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>} =
> Switch_Enter : EventSwitchEnter<dpid=3, 3 ports>
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> datpath_list {1: <ryu.controller.controller.Datapath object at
> 0x7f0b72443350>, 3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 4: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b790>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>} =
> Switch_Enter : EventSwitchEnter<dpid=4, 3 ports>
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> datpath_list {1: <ryu.controller.controller.Datapath object at
> 0x7f0b72443350>, 3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 4: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b790>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>} =
> Switch_Enter : EventSwitchEnter<dpid=1, 3 ports>
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> datpath_list {1: <ryu.controller.controller.Datapath object at
> 0x7f0b72443350>, 3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 4: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b790>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>} =
> dpid Join SW {1: <ryu.controller.controller.Datapath object at
> 0x7f0b72443350>, 2: <ryu.controller.controller.Datapath object at
> 0x7f0b725bcd90>, 3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 4: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b790>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>}
> port state change event triggered
> Switch_Enter : EventSwitchEnter<dpid=2, 3 ports>
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> Switch_port_table :{1: set([1, 2, 3]), 2: set([1, 2, 3]), 3: set([1, 2,
> 3]), 4: set([1, 2, 3]), 5: set([1, 2, 3]), 6: set([1, 2, 3])}
> flow_mod message called
> mod version=None,msg_type=None,msg_len=None,xid=None,OFPFlowMod(
> buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,
> flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPIns
> tructionActions(actions=[OFPActionOutput(len=16,max_len
> =65509,port=1,type=0)],type=4)],match=OFPMatch(oxm_fields={'eth_type':
> 2048, 'ipv4_src': '10.0.0.1', 'in_port': 3, 'ipv4_dst':
> '10.0.0.2'}),out_group=0,out_port=0,priority=1,table_id=0)
> flow_mod message called
> mod version=None,msg_type=None,msg_len=None,xid=None,OFPFlowMod(
> buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,
> flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPIns
> tructionActions(actions=[OFPActionOutput(len=16,max_len
> =65509,port=3,type=0)],type=4)],match=OFPMatch(oxm_fields={'eth_type':
> 2048, 'ipv4_src': '10.0.0.2', 'in_port': 1, 'ipv4_dst':
> '10.0.0.1'}),out_group=0,out_port=0,priority=1,table_id=0)
> flow_mod message called
> mod version=None,msg_type=None,msg_len=None,xid=None,OFPFlowMod(
> buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,
> flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPIns
> tructionActions(actions=[OFPActionOutput(len=16,max_len
> =65509,port=2,type=0)],type=4)],match=OFPMatch(oxm_fields={'eth_type':
> 2048, 'ipv4_src': '10.0.0.1', 'in_port': 1, 'ipv4_dst':
> '10.0.0.2'}),out_group=0,out_port=0,priority=1,table_id=0)
> flow_mod message called
> mod version=None,msg_type=None,msg_len=None,xid=None,OFPFlowMod(
> buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,
> flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPIns
> tructionActions(actions=[OFPActionOutput(len=16,max_len
> =65509,port=1,type=0)],type=4)],match=OFPMatch(oxm_fields={'eth_type':
> 2048, 'ipv4_src': '10.0.0.2', 'in_port': 2, 'ipv4_dst':
> '10.0.0.1'}),out_group=0,out_port=0,priority=1,table_id=0)
> flow_mod message called
> mod version=None,msg_type=None,msg_len=None,xid=None,OFPFlowMod(
> buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,
> flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPIns
> tructionActions(actions=[OFPActionOutput(len=16,max_len
> =65509,port=2,type=0)],type=4)],match=OFPMatch(oxm_fields={'eth_type':
> 2048, 'ipv4_src': '10.0.0.1', 'in_port': 1, 'ipv4_dst':
> '10.0.0.2'}),out_group=0,out_port=0,priority=1,table_id=0)
> flow_mod message called
> mod version=None,msg_type=None,msg_len=None,xid=None,OFPFlowMod(
> buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,
> flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPIns
> tructionActions(actions=[OFPActionOutput(len=16,max_len
> =65509,port=1,type=0)],type=4)],match=OFPMatch(oxm_fields={'eth_type':
> 2048, 'ipv4_src': '10.0.0.2', 'in_port': 2, 'ipv4_dst':
> '10.0.0.1'}),out_group=0,out_port=0,priority=1,table_id=0)
> flow_mod message called
> mod version=None,msg_type=None,msg_len=None,xid=None,OFPFlowMod(
> buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,
> flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPIns
> tructionActions(actions=[OFPActionOutput(len=16,max_len
> =65509,port=3,type=0)],type=4)],match=OFPMatch(oxm_fields={'eth_type':
> 2048, 'ipv4_src': '10.0.0.1', 'in_port': 1, 'ipv4_dst':
> '10.0.0.2'}),out_group=0,out_port=0,priority=1,table_id=0)
> flow_mod message called
> mod version=None,msg_type=None,msg_len=None,xid=None,OFPFlowMod(
> buffer_id=4294967295,command=0,cookie=0,cookie_mask=0,
> flags=0,hard_timeout=0,idle_timeout=0,instructions=[OFPIns
> tructionActions(actions=[OFPActionOutput(len=16,max_len
> =65509,port=1,type=0)],type=4)],match=OFPMatch(oxm_fields={'eth_type':
> 2048, 'ipv4_src': '10.0.0.2', 'in_port': 3, 'ipv4_dst':
> '10.0.0.1'}),out_group=0,out_port=0,priority=1,table_id=0)
> datpath_list {1: <ryu.controller.controller.Datapath object at
> 0x7f0b72443350>, 2: <ryu.controller.controller.Datapath object at
> 0x7f0b725bcd90>, 3: <ryu.controller.controller.Datapath object at
> 0x7f0b72443410>, 4: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b790>, 5: <ryu.controller.controller.Datapath object at
> 0x7f0b72443850>, 6: <ryu.controller.controller.Datapath object at
> 0x7f0b7293b2d0>} =
> ...(No more log message while 10 minutes)...
>
>
> Thanks,
> Iwase
>
>
> On 2018年03月05日 03:55, Taha Khan wrote:
>
>> Hi Iwase,
>>
>> Even I don't know, why is that happening.
>> When I added the separate handler for EventLinkDelete it is getting
>> triggered when I see no reason to for it to trigger.
>> I think there is a bug in EventLinkDelete handler.
>> You can reproduce it by running two files attached.
>> Could you please suggest what might be wrong here. It would be great lead
>> .
>>
>> Thanks!
>> Taha.
>>
>>
>> On Tue, Feb 27, 2018 at 11:45 PM, Iwase Yusuke <iwase.yusu...@gmail.com
>> <mailto:iwase.yusu...@gmail.com>> wrote:
>>
>>     Hi Taha,
>>
>>     I couldn't investigate why, but on your attached log messages,
>>     "EventSwitchLeave" are shown. Datapath might be disconnected for some
>> reason,
>>     then "EventLinkDelete" occurred.
>>
>>     Thanks,
>>     Iwase
>>
>>
>>     On 2018年02月28日 00:13, Taha Khan wrote:
>>
>>
>>         Hi,
>>
>>         I added EventLinkDelete in my code. And noticed EventLinkDelete is
>>         getting triggered, while discovering the topology, although I am
>>         installing flow rules in the switch those are getting installed
>>         successfully.
>>         I am confused why the delete event is getting triggered at the
>> first
>>         place or should I ignore it.
>>
>>         I am sending this email second time because I received HTTP error
>> 550
>>         earlier.
>>
>>         Thanks!
>>         Taha
>>
>>
>>
>>         ------------------------------------------------------------
>> ------------------
>>         Check out the vibrant tech community on one of the world's most
>>         engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>
>>
>>         _______________________________________________
>>         Ryu-devel mailing list
>>         Ryu-devel@lists.sourceforge.net <mailto:Ryu-devel@lists.source
>> forge.net>
>>         https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>
>>
>> _______________________________________________
>> Ryu-devel mailing list
>> Ryu-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>
>>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to