Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance of a switch or interface does not migrate the flows to other path #23

Open
italovalcy opened this issue Mar 5, 2021 · 1 comment
Assignees

Comments

@italovalcy
Copy link
Contributor

Hi,

The maintenance in a switch or backbone interface (NNI) should move the dynamic EVCs to other path, however the EVCs remain in the same path as before the MW.

Steps to reproduce:

  1. Using a simple Ring topology in Mininet with 3 switches (sw1--sw2--sw3--sw1)
  2. Create an EVC between h1 (connected at sw1) and h2 (connected at sw2), using dynamic path
curl -s -X POST -H 'Content-type: application/json' http://localhost:8181/api/kytos/mef_eline/v2/evc -d '{"uni_z": {"tag": {"value": 300, "tag_type": 1}, "interface_id": "00:00:00:00:00:00:00:02:1"}, "uni_a": {"tag": {"value": 300, "tag_type": 1}, "interface_id": "00:00:00:00:00:00:00:01:1"}, "enabled": true, "name": "Vlan300_Test_evc1", "dynamic_backup_path": true}'
  1. Check the path of the EVC created, to make sure it is using the interface that will be under MW:
curl -s http://localhost:8181/api/kytos/mef_eline/v2/evc | jq -r '.[].current_path' | grep 00:00:00:00:00:00:00:02:2
  1. Create a MW to be started in a couple of minutes later
curl -s -X POST -H 'Content-type: application/json' http://localhost:8181/api/kytos/maintenance -d '{"description": "my MW on switch 2", "start": "2021-03-05T22:19:00+0000", "end": "2021-03-05T22:20:00+0000", "items": ["00:00:00:00:00:00:00:02:2"]}'
  1. Wait until the MW begins and check the flows. When the MW begins, Kytos generate a log message:
Mar  5 22:19:00 10ae9a814839 apscheduler.executors.default:INFO base:123:  Running job "MaintenanceWindow.start_mw (trigger: date[2021-03-05 22:19:00 UTC], next run at: 2021-03-05 22:19:00 UTC)" (scheduled at 2021-03-05 22:19:00+00:00)
Mar  5 22:19:00 10ae9a814839 apscheduler.executors.default:INFO base:144:  Job "MaintenanceWindow.start_mw (trigger: date[2021-03-05 22:19:00 UTC], next run at: 2021-03-05 22:19:00 UTC)" executed successfully
Mar  5 22:19:00 10ae9a814839 apscheduler.scheduler:INFO base:632:  Removed job 74c17ba02eaf4742ba898769f89e04a1-start

Expected result: the EVC should be moved from the path sw1--sw2 to sw1--sw3--sw2

Actual behavior: the EVC remains in the path sw1--sw2:

$ curl -s http://localhost:8181/api/kytos/mef_eline/v2/evc | jq -r '.[].current_path' | grep 00:00:00:00:00:00:00:02:2
      "id": "00:00:00:00:00:00:00:02:2",

mininet> sh for s in s1 s2 s3; do echo ====== $s; ovs-ofctl dump-flows $s; done
====== s1
 cookie=0xf9a50b5e84724c53, duration=2210.578s, table=0, n_packets=6627, n_bytes=675182, in_port="s1-eth1",dl_vlan=300 actions=mod_vlan_vid:300,mod_vlan_vid:1082,output:"s1-eth3"
 cookie=0xf9a50b5e84724c53, duration=2210.550s, table=0, n_packets=6627, n_bytes=701690, in_port="s1-eth3",dl_vlan=1082 actions=strip_vlan,output:"s1-eth1"
 cookie=0x0, duration=2213.127s, table=0, n_packets=1448, n_bytes=60816, priority=1000,dl_vlan=3799,dl_type=0x88cc actions=CONTROLLER:65535
====== s2
 cookie=0xf9a50b5e84724c53, duration=2210.561s, table=0, n_packets=6627, n_bytes=675182, in_port="s2-eth1",dl_vlan=300 actions=mod_vlan_vid:300,mod_vlan_vid:1082,output:"s2-eth2"
 cookie=0xf9a50b5e84724c53, duration=2210.559s, table=0, n_packets=6627, n_bytes=701690, in_port="s2-eth2",dl_vlan=1082 actions=strip_vlan,output:"s2-eth1"
 cookie=0x0, duration=2213.146s, table=0, n_packets=1448, n_bytes=60816, priority=1000,dl_vlan=3799,dl_type=0x88cc actions=CONTROLLER:65535
====== s3
 cookie=0x0, duration=2213.165s, table=0, n_packets=1448, n_bytes=60816, priority=1000,dl_vlan=3799,dl_type=0x88cc actions=CONTROLLER:65535
@italovalcy
Copy link
Contributor Author

I was reviewing this issue mainly because the end-to-end tests were failing (https://github.com/amlight/kytos-end-to-end-tests/blob/master/tests/test_e2e_15_maintenance.py#L60) and we identified two problems: 1) there is actually a misspelling on the switch id the end-to-end testing; 2) there is an issue in the way mef_eline handles multiple links down due to a switch down event (kytos/mef_eline#243)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants