-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Health Checks] Provision RPC module before P2P module #972
base: main
Are you sure you want to change the base?
Conversation
P2P module running successfully now. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment but lgtm otherwise
@@ -83,19 +83,19 @@ func (node *Node) Start() error { | |||
return err | |||
} | |||
|
|||
if err := node.GetBus().GetP2PModule().Start(); err != nil { | |||
if err := node.GetBus().GetRPCModule().Start(); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment that the order of the Starts is important and should not be modified.
Description
Currently, the P2P module fails to connect to other nodes because they are marked as unhealthy. In Kubernetes, by default, when a Pod is marked as unhealthy, it won't be resolved or discovered via DNS. As a result, when the network is provisioned from scratch and all nodes start at the same time, none of them can become healthy.
Provisioning the RPC module ahead of P2P makes health checks pass, allowing P2P to discover other nodes.
Summary generated by Reviewpad on 08 Aug 23 00:51 UTC
This pull request includes two patches.
Patch 1/3 disables health checks for the localnet build. It modifies the Tiltfile and statefulset.yaml files to set the "healthchecks.enabled" property to false. This change will disable liveness and readiness probes for the Pocket application running in the localnet environment.
Patch 2/3 modifies the Tiltfile and node.go files to provision the RPC module before the P2P module, allowing healthchecks to pass. This change rearranges the order in which the different modules of the Pocket application start, ensuring that the RPC module starts before the P2P module.
Overall, these patches aim to improve the development and testing experience by managing the health checks in the localnet environment and ensuring the correct order of module startup.
Issue
This has been reported on discord a few times.
Type of change
Please mark the relevant option(s):
List of changes
Testing
make develop_test
; if any code changes were mademake test_e2e
on k8s LocalNet; if any code changes were madee2e-devnet-test
passes tests on DevNet; if any code was changedRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)