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):
[ ] New feature, functionality or library
[x] Bug fix
[ ] Code health or cleanup
[ ] Major breaking change
[ ] Documentation
[ ] Other
List of changes
Changed a sequence of module provisioning.
Added a parameter to the helm chart that allows to turn off the health check on Kubernetes level.
Testing
[ ] make develop_test; if any code changes were made
[ ] make test_e2e on k8s LocalNet; if any code changes were made
[x] e2e-devnet-test passes tests on DevNet; if any code was changed
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)