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

Add hosts command does not check if the ip/port is actually in use by nebula process #3529

Closed
Aiee opened this issue Dec 22, 2021 · 11 comments
Closed
Labels
type/bug Type: something is unexpected
Milestone

Comments

@Aiee
Copy link
Contributor

Aiee commented Dec 22, 2021

Please check the FAQ documentation before raising an issue

Describe the bug (required)

Add hosts command does not check if the ip/port is actually in use by nebula process.
For example if I have the Nebula service listening on these ports
Screen Shot 2021-12-22 at 2 20 54 PM
and execute add hosts 127.0.0.1:29562 which adds the ip/port of graph service, the execution is succesful.

Your Environments (required)
Neubla master branch

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Open the console
  2. run add hosts 127.0.0.1:12334 (no process is using this port)
  3. It shows Execution succeeded
    Screen Shot 2021-12-22 at 2 19 07 PM

Expected behavior

An error should be returned.
Additional context

@Aiee Aiee added the type/bug Type: something is unexpected label Dec 22, 2021
@Sophie-Xie Sophie-Xie added this to the v3.0.0 milestone Dec 22, 2021
@darionyaphet
Copy link
Contributor

You mean the added address is not sure whether it is the real address?

@darionyaphet
Copy link
Contributor

I can't check this In fact, this is not a bug

@Shylock-Hg
Copy link
Contributor

What' the result of show hosts?

@Aiee
Copy link
Contributor Author

Aiee commented Dec 22, 2021

You mean the added address is not sure whether it is the real address?

Yes. In general, I can come up with 2 situations:

  1. IP/PORT is used by a non-storage process, like graphd/metad
  2. The address is idle and no process is listening on the port

I'm not sure if this is a bug and I was curious if we can make the execution response more sensible.

@Aiee
Copy link
Contributor Author

Aiee commented Dec 22, 2021

What' the result of show hosts?

show hosts will not print the address added.

@HarrisChu
Copy link
Contributor

  1. we allow add a storage not running.
  2. if add a wrong port, e.g. graph, and it should reject the invalid heartbeat, so show hosts shows nothing.
  3. although it's already add hosts, if there's no available heartbeat, cannot create space.

@Aiee
Copy link
Contributor Author

Aiee commented Dec 22, 2021

Update:
After executing add hosts with a graphd ip/port, the user is able to run create space/tag/edge, but an error occurs when inserting a vertex: [ERROR (-1005)]: Storage Error: part: 12, error: E_RPC_FAILURE(-3).

@darionyaphet
Copy link
Contributor

add hosts + storage host and ip

just regist the storage node

@darionyaphet
Copy link
Contributor

why add hosts with a graphd ip/port it is unnecessary

@Aiee
Copy link
Contributor Author

Aiee commented Dec 22, 2021

why add hosts with a graphd ip/port it is unnecessary

This is a misoperation made by users and it could cause problems that are hard to trace

@critical27
Copy link
Contributor

Case closed, it would be hard to prevent misusage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

6 participants