kytos-ng / of_core

Kytos Main OpenFlow Network Application (NApp)
MIT License
0 stars 5 forks source link

Error handling when instantiating experimenter actions #86

Closed italovalcy closed 2 years ago

italovalcy commented 2 years ago

I'm not sure this is only on kytos/of_core or if it also propagates through kytos/flow_manager. Anyway, when using kytos/noviflow napp and submitting a request for SetBFD Experimenter Action, the of_core raised an exception and stopped working. The switches then disconnected.

The request I've sent was:

curl http://127.0.0.1:8181/api/kytos/flow_manager/v2/flows/00:00:00:00:00:00:00:0c -H Content-type: application/json -d {"flows": [{"priority": 100, "match": {"in_port": 23, "dl_src": "11:22:33:44:55:66"}, "actions": [{"action_type": "set_bfd", "port_no": 1, "my_disc": 1, "interval": 5, "multiplier": 3, "keep_alive_timeout": 15}]}]}

The request was inspired by the kytos/noviflow unit test: https://github.com/kytos-ng/noviflow/blob/master/tests/unit/test_main.py#L62-L74

Error from Kytos log:

Oct 26 20:53:51 8ba74f12c575 kytos.napps.kytos/of_core:ERROR main:319:  UBInt16(775) is not a valid GenericFailedCode

Maybe we should enhance the error handling on of_core to avoid cases like this breaking the Napp

italovalcy commented 2 years ago

Looking deeper into this issue, I couldnt find the actual exception raised from kytos/of_core. The message above was actually just a log.error, it shouldn't impact the overall controller execution. In fact, right after this message the switch lost connection. More investigation is being conducted now.

italovalcy commented 2 years ago

Please disregard this issue report. I found out it was a problem with the OpenFlow channel at the switch.

italovalcy commented 2 years ago

This seems to be more related to handling OFP_Errors, which could be enhanced from kytos-ng/noviflow (to be investigated)