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

EVC with dynamic path is never activated if links was not enable when created #230

Open
italovalcy opened this issue Feb 22, 2021 · 1 comment

Comments

@italovalcy
Copy link

italovalcy commented Feb 22, 2021

Hi,

If you create an EVC with a dynamic path and all possible paths are with the links disabled, then the EVC will never be activated even if you enable all the links later.

Steps to reproduce:

  1. Create a topology and start Kytos (without enable-all option):
kytosd
mn --topo linear,3 --controller=remote,ip=127.0.0.1
  1. Create an EVC with dynamic path:
curl -s -X POST -d '{"uni_z": {"tag": {"value": 110, "tag_type": 1}, "interface_id": "00:00:00:00:00:00:00:03:1"}, "uni_a": {"tag": {"value": 110, "tag_type": 1}, "interface_id": "00:00:00:00:00:00:00:01:1"}, "enabled": true, "name": "Vlan110_Test2", "dynamic_backup_path": true}' -H 'Content-Type: application/json' http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/
  1. Enable all the switches, interfaces and links:
for s in $(curl -s http://127.0.0.1:8181/api/kytos/topology/v3/switches | jq -r '.switches[].id'); do curl -X POST -H 'Content-Type: application/json' http://127.0.0.1:8181/api/kytos/topology/v3/switches/$s/enable; curl -X POST -H 'Content-Type: application/json' http://127.0.0.1:8181/api/kytos/topology/v3/interfaces/switch/$s/enable; done

for l in $(curl -s http://127.0.0.1:8181/api/kytos/topology/v3/links | jq -r '.links[].id'); do curl -X POST -H 'Content-Type: application/json' http://127.0.0.1:8181/api/kytos/topology/v3/links/$l/enable; done
  1. Check the EVC status:
curl -s http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/  | jq -r '.[].active'

Expected result:

  • the EVC should be active when the links get activated

Actual result:

  • the EVC never gets active

Workaround: disable and enable the EVC:

curl -s -X PATCH -H "Content-Type: application/json" -d '{"enable": false}' http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/662c1a58b2da41e4

curl -s -X PATCH -H "Content-Type: application/json" -d '{"enable": true}' http://127.0.0.1:8181/api/kytos/mef_eline/v2/evc/662c1a58b2da41e4
@ArturoQuintana
Copy link

This issue has been fixed by the contribution done on PR #157
It has been tested following the steps sequences provided above, and it has not been detected errors.

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

No branches or pull requests

3 participants