Skip to content

Conversation

andre-j3sus
Copy link
Collaborator

@andre-j3sus andre-j3sus commented May 31, 2025

Summary

When remote snapshots are enabled, after committing a snapshot, it is uploaded to a MinIO instance. When loading from a snapshot, if it is not available locally, the system checks whether it is available in MinIO and fetches it if found.

Closes #823

Implementation Notes ⚒️

  • Changed the -snapshots option type from a boolean to a string, with three valid values: local, remote, or disabled (default).
  • Added parameters to configure the MinIO connection, including the address, access key, secret key, and bucket name for storing snapshots.
  • Implemented a new generic component called ObjectStorage with methods to upload and download objects. Created MinioStorage as an implementation of this interface.
  • Added methods to SnapshotManager to support uploading and downloading snapshots via the ObjectStorage interface.
  • Updated the Firecracker snapshots documentation.
  • Added tests for the new components. A MinIO instance is launched as a service in GitHub Actions.

Remote Firecracker snapshots are currently only supported using the Stargz snapshotter (there are known container corruption issues when using devmapper).

External Dependencies 🍀

  • Added github.com/minio/minio-go/v7 dependency.

Breaking API Changes ⚠️

  • N/A

@andre-j3sus andre-j3sus self-assigned this May 31, 2025
@andre-j3sus andre-j3sus added the enhancement New feature or request label May 31, 2025
@andre-j3sus
Copy link
Collaborator Author

andre-j3sus commented May 31, 2025

The target branch of this PR is currently stargz-snapshotter, but will be main once #1105 is merged

@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch 3 times, most recently from b10ef5f to 8139f78 Compare May 31, 2025 11:03
@andre-j3sus andre-j3sus changed the base branch from stargz-snapshotter to main May 31, 2025 11:04
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch 7 times, most recently from 43fcf55 to 23fd3bd Compare May 31, 2025 13:22
@andre-j3sus andre-j3sus changed the base branch from main to stargz-snapshotter May 31, 2025 14:09
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch from 23fd3bd to 817fc62 Compare May 31, 2025 14:22
@andre-j3sus andre-j3sus changed the base branch from stargz-snapshotter to main May 31, 2025 14:26
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch 13 times, most recently from b81fc78 to def6841 Compare June 2, 2025 22:24
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch 4 times, most recently from 4762bc0 to a6db1e9 Compare June 7, 2025 14:17
@andre-j3sus
Copy link
Collaborator Author

@leokondrashov I'll temporarily change the target of this PR to avoid triggering CI

@andre-j3sus andre-j3sus changed the base branch from main to remote-firecracker-snapshots-poc June 10, 2025 10:06
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch 4 times, most recently from c0977e3 to 6eed888 Compare June 10, 2025 13:33
@andre-j3sus andre-j3sus changed the base branch from remote-firecracker-snapshots-poc to main June 10, 2025 13:33
@andre-j3sus andre-j3sus marked this pull request as ready for review June 10, 2025 13:35
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch 2 times, most recently from 9f5a856 to 4887968 Compare June 16, 2025 20:21
@andre-j3sus andre-j3sus changed the base branch from main to remote-firecracker-snapshots-poc June 16, 2025 21:51
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch from 4887968 to 69d7a38 Compare June 16, 2025 21:52
@leokondrashov
Copy link
Contributor

@moharaka please review it first, then notify me to do my pass

@andre-j3sus
Copy link
Collaborator Author

@moharaka @leokondrashov sorry, but don't review it yet. There's a test that is not passing in GitHub actions and I need to debug it

@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch 4 times, most recently from b14ad5d to 644aa3d Compare June 17, 2025 21:24
@andre-j3sus andre-j3sus changed the base branch from remote-firecracker-snapshots-poc to main June 17, 2025 21:59
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch from 644aa3d to 455b375 Compare June 17, 2025 22:02
- When remote snapshots are enabled, after committing the snapshot, it is uploaded to a MinIO instance. When loading from a snapshot, if it is not available locally, it checks if it is available in MinIO and fetches it.
- Remote Firecracker snapshots are currently only supported using the Stargz snapshotter (there are some container corruption issues when using devmapper).

Signed-off-by: André Jesus <andre.jesus.pilar@gmail.com>
@andre-j3sus andre-j3sus force-pushed the remote-firecracker-snapshots branch from 455b375 to bdeafcb Compare June 17, 2025 22:08
@andre-j3sus
Copy link
Collaborator Author

@leokondrashov @moharaka This is finally ready for review. The changes are described in the PR description. Feel free to comment if anything looks off—I'm also open to suggestions for design improvements. As for the tests, I know they could be better, but I really can’t spend more time on this PR since I need to start working on the scheduler optimization.

When set to false and using remote snapshots, snapshots will not be cached locally. The default value is true.

Signed-off-by: André Jesus <andre.jesus.pilar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote firecracker snapshots
2 participants