-
Notifications
You must be signed in to change notification settings - Fork 305
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
feat(pd): support archives for migrate and join #4055
Conversation
26b40c8
to
e74d429
Compare
e74d429
to
83ae671
Compare
I think what we want here is to give the ability for |
This is implemented! (I recently force-pushed, so the code just changed.) What's not yet implemented in clobbering of the genesis file. In my local testing,
That's implemented and working. I don't think it really helps in the upgrade case, but it's easy enough to add the flag, since it reuses a function. What it does leave the door open to is creating archives of node state for fast-sync, so a node can bootstrap itself from height
I think we do! It's |
83ae671
to
27a7a42
Compare
27a7a42
to
44296e5
Compare
While testing upgrades as part of [0], updating the docs in [1], it became clear that during manual maintenance for munging state during chain upgrades procedures, we want all the nodes to be reset together. Therefore if maintenanceMode=true, we'll also disable the readinessProbes, otherwise the rollout will be staged, forcing us to upgrade each node in term, rather than being able to parallelize them. Now, we can `pd export` and backup state, then update the statefulset to bump the container version (to the post-upgrade version), and restart it in maintenance mode to continue with the `pd migrate` step and resulting copying around of emitted files. [0] #4055 [1] https://github.com/penumbra-zone/penumbra/wiki/Performing-upgrades
44296e5
to
f67a5da
Compare
While testing upgrades as part of [0], updating the docs in [1], it became clear that during manual maintenance for munging state during chain upgrades procedures, we want all the nodes to be reset together. Therefore if maintenanceMode=true, we'll also disable the readinessProbes, otherwise the rollout will be staged, forcing us to upgrade each node in term, rather than being able to parallelize them. Now, we can `pd export` and backup state, then update the statefulset to bump the container version (to the post-upgrade version), and restart it in maintenance mode to continue with the `pd migrate` step and resulting copying around of emitted files. [0] #4055 [1] https://github.com/penumbra-zone/penumbra/wiki/Performing-upgrades
f67a5da
to
caf0f9c
Compare
caf0f9c
to
c0dc52a
Compare
Enables opt-in archive generation when performing: * pd export * pd migrate The goal is to provide a standardized bottling-up of pd state, specifically the rocksdb directory. In the context of upgrades, the `pd migrate` functionality is what's important: we want the archived dir to contain both rocksdb data and the modified genesis file and updated validator state. Accordingly, `pd testnet join` is modified to support an optional archive URL. If set, the remote tar.gz archive will be downloaded and extracted, clobbering the cometbft config files that were fetched. A remote bootstrap node is still contacted, to learn about peers, otherwise the newly created node wouldn't be able to talk to the network.
c0dc52a
to
ea77d32
Compare
Merging optimistically to continue with upgrade testing, ahead of #4087. |
Follow-up to [0]. We've tested several times the creation and use of archive urls via cli, but hadn't yet added logic to deploy new nodes from archive URLs, as well. This change worked for adding a new-joining node to a bespoke devnet post-upgrade. [0] #4055
Follow-up to [0]. We've tested several times the creation and use of archive urls via cli, but hadn't yet added logic to deploy new nodes from archive URLs, as well. This change worked for adding a new-joining node to a bespoke devnet post-upgrade. [0] #4055 Co-authored-by: Conor Schaefer <[email protected]>
Enables opt-in archive generation when performing:
The goal is to provide a standardized bottling-up of pd state, specifically the rocksdb directory. In the context of upgrades, only the "pd migrate" functionality change is what we care about: we want the archived dir to contain both rocksdb data and the modified genesis file.
Accordingly,
pd testnet join
is modified to support an optional archive URL. If set, the remote tar.gz archive will be downloaded and extracted, clobbering the cometbft config. A remote bootstrap node is still contacted, to learn about peers, otherwise the newly created node wouldn't be able to talk to the network.