pokt-network / pocket

Official implementation of the Pocket Network Protocol v1
https://pokt.network
MIT License
61 stars 33 forks source link

[Health Checks] Provision RPC module before P2P module #972

Open okdas opened 10 months ago

okdas commented 10 months ago

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

Required Checklist