I repeated the same test mentioned on issue 186, no longer the problem happens, notice below as soon as the switch reconnects the link_down gets notified now if an interface is deactivated when a switch is disabled:
kytos $> 2024-03-01 14:18:11,771 - INFO [kytos.core.atcp_server] (MainThread) Connection lost with client 127.0.0.1:36958. Reason: Request closed by client
2024-03-01 14:18:16,106 - INFO [kytos.core.atcp_server] (MainThread) Connection lost with client 127.0.0.1:36962. Reason: Request closed by client
kytos $>
kytos $> 2024-03-01 14:18:23,654 - INFO [uvicorn.access] (MainThread) 127.0.0.1:42190 - "GET /api/kytos/topology/v3/ HTTP/1.1" 200
2024-03-01 14:18:54,258 - INFO [kytos.core.atcp_server] (MainThread) New connection from 127.0.0.1:47684
2024-03-01 14:18:54,676 - INFO [kytos.napps.kytos/of_core] (thread_pool_sb_14) Connection ('127.0.0.1', 47684), Switch 00:00:00:00:00:00:00:03: OPENFLOW HANDSHAKE COMPLETE
2024-03-01 14:18:54,689 - INFO [kytos.napps.kytos/mef_eline] (dynamic_single_0) Event handle_link_down Link(Interface('s1-eth4', 4, Switch('00:00:00:00:00:00:00:01')), Interface('s3-eth
3', 3, Switch('00:00:00:00:00:00:00:03')), c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07)
2024-03-01 14:18:54,696 - INFO [uvicorn.access] (MainThread) 127.0.0.1:51032 - "GET /api/kytos/flow_manager/v2/stored_flows?state=installed&cookie_range=12321848580485677056&cookie_rang
e=12393906174523604991&dpid=00%3A00%3A00%3A00%3A00%3A00%3A00%3A03 HTTP/1.1" 200
kytos $>
kytos $> 2024-03-01 14:19:06,516 - INFO [kytos.core.atcp_server] (MainThread) New connection from 127.0.0.1:42310
2024-03-01 14:19:06,691 - INFO [kytos.napps.kytos/of_core] (thread_pool_sb_12) Connection ('127.0.0.1', 42310), Switch 00:00:00:00:00:00:00:01: OPENFLOW HANDSHAKE COMPLETE
2024-03-01 14:19:06,709 - INFO [uvicorn.access] (MainThread) 127.0.0.1:37638 - "GET /api/kytos/flow_manager/v2/stored_flows?state=installed&cookie_range=12321848580485677056&cookie_rang
e=12393906174523604991&dpid=00%3A00%3A00%3A00%3A00%3A00%3A00%3A01 HTTP/1.1" 200
kytos $>
kytos $> 2024-03-01 14:19:22,784 - INFO [uvicorn.access] (MainThread) 127.0.0.1:38074 - "GET /api/kytos/topology/v3/ HTTP/1.1" 200
2024-03-01 14:19:32,088 - INFO [uvicorn.access] (MainThread) 127.0.0.1:46400 - "GET /api/kytos/topology/v3/ HTTP/1.1" 200
kytos $>
kytos $> # now I'll activate s1-eth4 in the switch
kytos $> 2024-03-01 14:20:05,237 - INFO [kytos.napps.kytos/of_core] (MainThread) PortStatus modified interface 00:00:00:00:00:00:00:01:4 state OFPPS_LIVE
2024-03-01 14:20:05,238 - INFO [kytos.napps.kytos/of_core] (MainThread) PortStatus modified interface 00:00:00:00:00:00:00:03:3 state OFPPS_LIVE
2024-03-01 14:20:08,244 - INFO [kytos.napps.kytos/mef_eline] (thread_pool_app_2) Event handle_link_up Link(Interface('s1-eth4', 4, Switch('00:00:00:00:00:00:00:01')), Interface('s3-eth3
', 3, Switch('00:00:00:00:00:00:00:03')), c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07)
kytos $>
kytos $> 2024-03-01 14:20:13,954 - INFO [uvicorn.access] (MainThread) 127.0.0.1:58222 - "GET /api/kytos/topology/v3/ HTTP/1.1" 200
kytos $>
I also ran a link flap stress test, no issues have been observed:
link_flap test iteration 0
[sudo] password for viniarck:
waiting for 10 secs before next iteration
link_flap test iteration 1
waiting for 10 secs before next iteration
link_flap test iteration 2
waiting for 10 secs before next iteration
link_flap test iteration 3
waiting for 10 secs before next iteration
link_flap test iteration 4
waiting for 10 secs before next iteration
Closes #186
Summary
See updated changelog file
Local Tests
I repeated the same test mentioned on issue 186, no longer the problem happens, notice below as soon as the switch reconnects the link_down gets notified now if an interface is deactivated when a switch is disabled:
End-to-End Tests
Exec with this branch: