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

It is not possible to remove some routes #192

Closed
Senyoret1 opened this issue Mar 4, 2020 · 0 comments · Fixed by #193
Closed

It is not possible to remove some routes #192

Senyoret1 opened this issue Mar 4, 2020 · 0 comments · Fixed by #193
Assignees
Labels
bug Something isn't working

Comments

@Senyoret1
Copy link
Contributor

Describe the bug
When trying to remove some routes the operation fails and the visor is terminated with an error.

Environment information:

  • OS: Linux (Ubuntu 18.04.1)
  • Platform: Linux 4.15.0-65-generic x86_64

Steps to Reproduce
Steps to reproduce the behavior:

  1. Start some nodes using the make integration-run-generic command of the skywire-services repository (tested using the milestone2 branch of the skywire-mainnet repo and the mainnet-milestone2 branch of the skywire-services repo).
  2. Create transports connecting the nodes by calling POST /api/visors/0348c941c5015a05c455ff238af2e57fb8f914c399aab604e9abb5b32b91a4c1fe/transports with {"remote_pk":"024ec47420176680816e0406250e7156465e4531f5b26057c9f6297bb0303558c7","transport_type":"dmsg","public":true} as content and then again with {"remote_pk":"031b80cd5773143a39d940dc0710b93dcccc262a85108018a7a95ab9af734f8055","transport_type":"dmsg","public":true} as content.
  3. On the command window used to run make integration-run-generic run now curl --data {'"recipient":"'$PK_A'", "message":"Hello Joe!"}' -X POST $CHAT_C. This will send a msg to VisorA (it will appear on the console) and 2 routes will be added to each visor.
  4. Call DELETE /api/visors/0348c941c5015a05c455ff238af2e57fb8f914c399aab604e9abb5b32b91a4c1fe/routes/1 API endpoint to remove the route with key 1 from the 0348c... visor (VisorB).

Actual behavior
When trying to delete the route from the 0348c... visor the API will respond "error": "unexpected EOF" and the command window for VisorB will show that the visor was stopped after an error.

The problem happens only with some routes. In fact, different routes have different behaviors. If during step 4 you call DELETE /api/visors/031b80cd5773143a39d940dc0710b93dcccc262a85108018a7a95ab9af734f8055/routes/1 for removing the route with key 1 from the 031b8... visor (VisorC), the route will be removed. If you call DELETE /api/visors/031b80cd5773143a39d940dc0710b93dcccc262a85108018a7a95ab9af734f8055/routes/2 for removing the route with key 2 from the 031b8... visor, not only the route, but all the routes on all the visors will be removed.

Expected behavior
It should be possible to remove any route without problems.

Additional context
The problem also appears if you remove the transports and then try to use the routes by running curl --data {'"recipient":"'$PK_A'", "message":"Hello Joe!"}' -X POST $CHAT_C again.

Found while testing #161 , not sure if related.

Possible implementation

@Senyoret1 Senyoret1 added the bug Something isn't working label Mar 4, 2020
@nkryuchkov nkryuchkov self-assigned this Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants