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

Generate errors for the FlowMods #23

Open
renanrodrigo opened this issue Oct 17, 2017 · 4 comments
Open

Generate errors for the FlowMods #23

renanrodrigo opened this issue Oct 17, 2017 · 4 comments
Assignees

Comments

@renanrodrigo
Copy link
Contributor

Such as malformed flow JSON or inexistent datapath

@renanrodrigo renanrodrigo self-assigned this Oct 17, 2017
@renanrodrigo
Copy link
Contributor Author

We'll generate:

  • error 404 if the DPID does not exist
  • error 400 if the body is malformed (invalid fields)
  • error 400 if any of the values can't be applied to the flowmod

@ajoaoff
Copy link
Contributor

ajoaoff commented Oct 24, 2019

Invalid fields or fields with invalid values are not yet treated.

@ajoaoff
Copy link
Contributor

ajoaoff commented Jan 26, 2021

If an inexistent field (like an invalid or not implemented action) is sent, a 500 error is returned. A better error code should be returned in such cases.

@ajoaoff
Copy link
Contributor

ajoaoff commented Jan 29, 2021

We'll generate:

  • error 404 if the DPID does not exist
  • error 400 if the body is malformed (invalid fields)
  • error 400 if any of the values can't be applied to the flowmod

When testing the last item, to see what was returned when an invalid value was sent (I tried a string where an integer is required) and the return code was 200. Kytos log showed a PackException when trying to pack the string to integer.
So, when the FlowMod is instantiated, the values are not validated, so no error occurs, the FlowMod is put in the controller's buffer and flow_manager returns no error code. The controller, asynchronously, reads the FlowMod from the buffer and, when trying to pack it, receives a PackException. The error is never returned to the user and the controller crashes.

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

2 participants