Open deblasis opened 1 year ago
Is this ticket ready to be implemented? I am unsure what the metadata
returned by /v1/persistence/snapshots/create
would look like (in the OpenAPI YAML spec for example). I realise the logic in handlers.go
can point to some placeholder functions but is there any defined structure for what should be returned and stored locally? Or is that also a part of this PR?
There's still a fair bit of work before this piece is ready. @deblasis or I will follow up once it is.
Objective
The RPC layer should allow the triggering of snapshot creation, rollbacks and also basic queries about the available snapshots (this can become useful later as we develop alternative sources for snapshots)
Note: This issue can be worked on in parallel by calling no-op/fake methods in the backend (handlers.go) for now. When the savepoints/rollbacks are fully implemented, we can wire things together with the real implementation in the follow-up ticket (#570)
Origin Document
493 and #562
Goals
v1/persistence/snapshots/create
endpoint that handles snapshot creation and returns metadata about the snapshot just created.v1/persistence/snapshots/list
endpoint that simply returns a list of the snapshots available, implement it using an abstraction for theSnapshotSource
so that we can swap, in the future, different implementations to target different sources (Tor, FTP, S3, etc). For now proceed with the simplest implementation possible: local filesystem, in a configurable folder.v1/persistence/snapshots/rollback
endpoint that allows to trigger a rollback by proving an identifier for the snapshot being used as source, in the future this should also support multiple sources as well therefore the sameSnapshotSource
should be used as a "filesystem abstraction"jobs
data structure (could be in memory, TBD)v1/persistence/snapshots/progress
endpoint which would return what's stored in the datastructure above to the user.Deliverable
Non-goals / Non-deliverables
General issue deliverables
Testing Methodology
make ...
make ...
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @deblasis Co-Owners: @Olshansk