[1/5] User data export: DB models and queries #8399
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This set of PRs implements the endpoints proposed in RFD 563, and the set starts with adding the database parts: the models, the schema change, and the query routines.
A "user data export" object records the attachment of a read-only volume to a particular Pantry for the purpose of exporting data. These objects will be created and deleted using sagas invoked by a background task, and not managed by a user or operator. As of right now the only read-only user resources that can be exported are snapshots and images.
A user data export object will be created for each non-deleted snapshot and image. A "changeset" representing the work required to manage this will be queried for by the associated background task.
During Pantry expungement, that Pantry will no longer be returned by a DNS lookup for all in-service Pantry addresses. A list of in-service addresses returned like this functions similarly to a rendezvous table, and is used to soft-delete user data export objects affected by expungements so they can be recreated by the associated background task.