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

Edge cases are not working properly #65

Open
denis-tingaikin opened this issue Nov 12, 2024 · 2 comments
Open

Edge cases are not working properly #65

denis-tingaikin opened this issue Nov 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@denis-tingaikin
Copy link
Member

denis-tingaikin commented Nov 12, 2024

Found by @zolug

Description

Problem 1

There is a problem in the dashboard code: https://github.com/networkservicemesh/cmd-dashboard-backend/blob/main/main.go#L120
If the nse channel happens to get closed, the break will just break out from the select instead of the inner for loop, thus no new nse channel will be created.

Problem 2

code will only strip the tcp prefix in case of IPv6 addresses: https://github.com/networkservicemesh/cmd-dashboard-backend/blob/main/main.go#L123 

See at https://go.dev/play/p/ZVPkZFhXOoN

Thus, the IPv6 scheme can be lost, and it could not work with non-default schemes, and in case the default scheme is not TCP.

UPD: ipv4 could not work, because grpc Dial was unable to handle the tcp:// prefix.

TODO

  1. Fix issues
  2. Add unit tests for coverage.
@denis-tingaikin denis-tingaikin added the bug Something isn't working label Nov 12, 2024
@zolug
Copy link

zolug commented Nov 12, 2024

As for the IPv4 dial problem here's the grpc related error:

2024/11/12 15:25:16 INFO: [core] Creating new client transport to "{Addr: \"tcp://10.244.4.4:5001\", ServerName: \"tcp:%2F%2F10.244.4.4:5001\", }": connection error: desc = "transport: Error while dialing: dial tcp: address tcp://10.244.4.4:5001: too many colons in address"

@denis-tingaikin
Copy link
Member Author

denis-tingaikin commented Nov 12, 2024

Seems like networkservicemesh/api#178 may just resolve this.

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

No branches or pull requests

2 participants