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

Enabling the interfaces but not enabling the switch makes flow_manager not install of_lldp flows #152

Open
italovalcy opened this issue Jan 21, 2021 · 1 comment

Comments

@italovalcy
Copy link

italovalcy commented Jan 21, 2021

Dear guys,

The topology offers an API to enable all the interface of a switch: https://github.com/kytos/topology/blob/master/openapi.yml#L239-L258

From the documentation it is not clear that this API call should also enable the switch, but it does enable the switch indeed (not sure if this is a bug or by design). However, when following this step, the flows for of_lldp are not actually enabled on the switch (sounds related to kytos/of_lldp#60)

Steps to reproduce:

  1. Start Kytos (without -E):
docker run -d -p 6653:6653 -p 8181:8181 --name k1 amlight/kytos:latest
  1. Start Mininet (any topology):
sudo mn --topo linear,4 --controller=remote,ip=127.0.0.1
  1. Enable all the interfaces for each switch:
for i 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/interfaces/switch/$i/enable; done

Expected behavior:

Not sure if those steps should leave the switch disable (since the API call was supposed to enable the interfaces not the switch itself) or enable the switch indeed - raising the proper events and allowing the of_lldp to install its flows.

Actual behavior:

  1. All the switches are enabled:
$ curl -s http://127.0.0.1:8181/api/kytos/topology/v3/switches | jq -r '.switches[].enabled'
true
true
true
true
  1. However, the of_lldp flows are not created:
mininet-wifi> sh ovs-ofctl dump-flows s1
mininet-wifi> sh ovs-ofctl dump-flows s2
mininet-wifi> sh ovs-ofctl dump-flows s3
mininet-wifi> sh ovs-ofctl dump-flows s4
mininet-wifi>

Workaround: if you follow the "normal" workflow of 1st enabling the switch and then enabling its interfaces, the of_lldp flows are properly setup:

for i 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/$i/enable; curl -X POST -H 'Content-Type: application/json' http://127.0.0.1:8181/api/kytos/topology/v3/interfaces/switch/$i/enable; done
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

Successfully merging a pull request may close this issue.

3 participants