-
Notifications
You must be signed in to change notification settings - Fork 351
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
Validators cannot discover P2P peers when running as StatefulSet
in k8s
#2378
Comments
The code Line 495 in 90aa89c
there are no peers added. |
A workaround adopted by many upstream similar services which rely on bootstrap to discover other peers is to introduce |
Reopening the issue. Seems that even introducing |
Gave it another try and seems that after few seconds that node retries to correct to the peers which at that point have DNS available and the lookup succedeed. We can close this. |
Validators cannot discover P2P peers when running as
StatefulSet
in k8sDescription
In a multi-node scenario, when a validator is started having configured under
p2p.persistent_peers
andp2p.seeds
a list of nodes, the DNS lookup fails. This is an issue suffered by other similar products such as RabbitMQ which during the bootstrap phase, they try to reach other nodes/peers. See here kubernetes/kubernetes#92559 (comment)Your environment
Steps to reproduce
p2p.persistent_peers
andp2p.seeds
inconfig.toml
theService
address of the validators.gno/tm2/pkg/p2p/switch.go
Line 491 in 90aa89c
gnoland start
Expected behaviour
The DNS lookup should succeeded and the node should be connected to another peer.
Actual behaviour
The DNS lookup fails. It seems it tries for the second time but it fails after because the DNS record is not ready yet.
Logs
Proposed solution
The issue should be fixed retrying multiple times the DNS lookup of the P2P peers. In a k8s environment where there are moving parts, it is crucial to have retry and backoff to increase the chance of successful connection
The text was updated successfully, but these errors were encountered: