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

Incorrect peer_addr in cluster_info meta table #4186

Closed
sunng87 opened this issue Jun 21, 2024 · 5 comments
Closed

Incorrect peer_addr in cluster_info meta table #4186

sunng87 opened this issue Jun 21, 2024 · 5 comments
Labels
C-bug Category Bugs good first issue Good for newcomers

Comments

@sunng87
Copy link
Member

sunng87 commented Jun 21, 2024

What type of bug is this?

Incorrect result

What subsystems are affected?

Distributed Cluster

Minimal reproduce step

select * from information_schema.cluster_info

What did you expect to see?

This peer_addr field has different implementation for different peer types.

  • datanode is using --rpc-hostname parameter, which uses hostname of the node. This is preferred for displaying host address.
  • metasrv seems to use its grpc connection's local address here, which need be corrected.
  • frontend seems use its grpc servers' listening address here, which need be corrected.

Also we should not show grpc port here because on these three node types, grpc serves different purpose and its meaningless to list them together.

What did you see instead?

+---------+-----------+-------------------------------------------------------------------+---------+------------+----------------------------+-------------------+-------------+
| peer_id | peer_type | peer_addr                                                         | version | git_commit | start_time                 | uptime            | active_time |
+---------+-----------+-------------------------------------------------------------------+---------+------------+----------------------------+-------------------+-------------+
|      -1 | METASRV   | 10.244.0.25:3002                                                  | 0.8.1   | unknown    | 2024-06-20 13:41:04.339000 | 12h 22m 10s 857ms | NULL        |
|       0 | DATANODE  | greptimedb-datanode-0.greptimedb-datanode.greptimedb-cluster:4001 | 0.8.1   | unknown    | 2024-06-20 13:43:25.491000 | 12h 19m 49s 705ms | 2s 598ms    |
|       1 | DATANODE  | greptimedb-datanode-1.greptimedb-datanode.greptimedb-cluster:4001 | 0.8.1   | unknown    | 2024-06-20 13:42:52.340000 | 12h 20m 22s 856ms | 2s 764ms    |
|       2 | DATANODE  | greptimedb-datanode-2.greptimedb-datanode.greptimedb-cluster:4001 | 0.8.1   | unknown    | 2024-06-20 13:42:19.742000 | 12h 20m 55s 454ms | 2s 83ms     |
|      -1 | FRONTEND  | 0.0.0.0:4001                                                      | 0.8.1   | unknown    | 2024-06-20 13:43:27.032000 | 12h 19m 48s 164ms | 14s 947ms   |
+---------+-----------+-------------------------------------------------------------------+---------+------------+----------------------------+-------------------+-------------+
5 rows in set (0.006 sec)

What operating system did you use?

any

What version of GreptimeDB did you use?

HEAD

Relevant log output and stack trace

No response

@sunng87 sunng87 added the C-bug Category Bugs label Jun 21, 2024
@killme2008 killme2008 removed their assignment Jun 24, 2024
@killme2008 killme2008 added the good first issue Good for newcomers label Jun 24, 2024
@killme2008
Copy link
Contributor

I think gRPC port is good because it exists in all three types of nodes. Other protocols such as HTTP does not.

@killme2008
Copy link
Contributor

Also we should not show grpc port here because on these three node types, grpc serves different purpose and its
meaningless to list them together.

But in another meaning, they are serving the same purpose - gRPC requests, wherever they come from users or internal requests.

@killme2008
Copy link
Contributor

The metasrv address is correct. It uses server_addr in metasrv configuration,which is the the communication server address for frontend and datanode to connect.

killme2008 added a commit to killme2008/greptimedb that referenced this issue Jun 24, 2024
killme2008 added a commit to killme2008/greptimedb that referenced this issue Jun 25, 2024
@sunng87
Copy link
Member Author

sunng87 commented Jun 25, 2024

But in another meaning, they are serving the same purpose - gRPC requests, wherever they come from users or internal requests.

One scenario I realized using port here may make sense is when multiple instances deployed on a single node, we use port as some sort of process id. I'm ok to keep it until we find better alternatives. We still need to explain the meaning of the ports when it's listed on cluster topology view.

@killme2008
Copy link
Contributor

We can add a node_info table to list all the binding ports for a node.

github-merge-queue bot pushed a commit that referenced this issue Jun 26, 2024
* fix: frontend registration address is wrong, #4186

* fix: license header

* chore: adds hostname to frontend grpc

* fix: forgot run make config-docs

* chore: warn when using bind_addr

* fix: flow node heartbeat carrying address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants