rhmaxdotorg / pulsechain-validator

PulseChain Validator Automated Setup Scripts
https://launchpad.pulsechain.com
37 stars 13 forks source link

Modified update-client.sh script to perform faster client upgrades without stopping the services #23

Closed nicogranuja closed 1 year ago

nicogranuja commented 1 year ago

Turns out that we can just pull the latest changes for the repo and start the build process (which replaces the currently run binaries) without doing a systemctl stop command, the systemctl restart will still gracefully stop the services, and after running a successful update (git pull && make) on the repos will restart loading the newly updated binaries into memory and starting the validation process without minimum downtime.

New downtime < 1 minute Old downtime ~45 - ~1 hour

Testing

Spun up a new EC2 instance ran the setup script building both versions v2.2.0. After it was done, I was tailing the logs for geth and lighthouse beacon services via journalctl verified that while building the binaries these 2 services were running, and after upgrading both to v3.0.0 the systemctl restart would stop and start them successfully.

wishbonesr commented 1 year ago

@nicogranuja, Good addition. This is exactly how every other service is updated (rebuild, restart).

rhmaxdotorg commented 1 year ago

This looks like a great improvement!

Thanks for much for the metrics and testing it on 2.2.0 -> 3.0.0.

LGTM