Closed sad1y closed 5 months ago
I expect that after I've added node to the cluster it should be Available for every node in cluster.
Available
Get project from https://github.com/sad1y/ClusteringTest Run script from root of project
https://github.com/sad1y/ClusteringTest
dotnet run -- 9000 & dotnet run -- 9001 & dotnet run -- 9002 &
Check cluster state (on any node)
curl -i -XGET http://localhost:8000/cluster
Response should looks like this
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Tue, 05 Dec 2023 10:59:32 GMT Server: Kestrel Transfer-Encoding: chunked "***00/Available,***01/Available,***03/Available"
Create new node
dotnet run -- 9003 &
Now, add new node through the master (in my case it is on port 8000)
curl -i -XPOST http://localhost:8000/cluster -H "Content-Type: application/json" -d '{ "address": "127.0.0.1", "port": 9003 }'
Check cluster state on new node
curl -i -XGET http://localhost:8003/cluster
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Tue, 05 Dec 2023 10:59:32 GMT Server: Kestrel Transfer-Encoding: chunked ***00/Unknown,***01/Unknown,***02/Unknown,***03/Available
new node sees only itself
Check cluster state on non-master node
curl -i -XGET http://localhost:8002/cluster
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Tue, 05 Dec 2023 10:59:32 GMT Server: Kestrel Transfer-Encoding: chunked ***00/Available,***01/Available,***02/Available,***03/Unknown
any non-master node doesn't see newcomer
I set log level to Debug and observe that kind of messages
Debug
Local changes are not committed. Quorum is 4, last committed entry is 2
Correct, because follower node doesn't interact with the rest of cluster. Only leader node knows the state of each member.
Issue
I expect that after I've added node to the cluster it should be
Available
for every node in cluster.How to reproduce
Get project from
https://github.com/sad1y/ClusteringTest
Run script from root of projectCheck cluster state (on any node)
Response should looks like this
Create new node
Now, add new node through the master (in my case it is on port 8000)
Check cluster state on new node
new node sees only itself
Check cluster state on non-master node
any non-master node doesn't see newcomer
What else?
I set log level to
Debug
and observe that kind of messages