-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Persist identity and peers when using local storage (#547)
* Persist identity and peers when using local storage Local storage is great because it's faster, and we can download tarballs in minutes at every boot and have tolerable downtimes. But at each boot, the node regenerates its identity. We already have a mechanism to pre-populate identities in the node yaml, but it's cumbersome. Instead, with this PR, we create a mini-pvc of 1Gi to store node identities, whenever local storage is in use. This way, local storage nodes always boot quickly, except the first time they boot, and there is no configuration burden. It is also possible to scale up the number of nodes without having to prepare identities. I tested private chain and ghostnet node, in both local and non-local storage. It behaves as intended. I also tried to pre-populate an identity in the values file in local storage and confirmed that it is not broken. * completely remove chmod 777 * fix error in snapshot-importer: check file existence * fix snapshot importer as well * fix tests * Update charts/tezos/scripts/upgrade-storage.sh Co-authored-by: Aryeh Harris <harryttd@users.noreply.github.com> * fix tests, add comment for persistent dir per review * typo * fix perms issue in the absence of 777 --------- Co-authored-by: Aryeh Harris <harryttd@users.noreply.github.com>
- Loading branch information
1 parent
35c9e6a
commit 090f695
Showing
9 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
set -ex | ||
|
||
if [ ! -e /var/tezos/node/data/context ] | ||
if [ ! -e /var/tezos/node/data/context/store.dict ] | ||
then | ||
printf "No context in data dir found, probably initial start, doing nothing." | ||
printf "No store in data dir found, probably initial start, doing nothing." | ||
exit 0 | ||
fi | ||
octez-node upgrade storage --config /etc/tezos/config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters