Skip to content
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

Enable resuming snapshot for jailed firecracker #544

Closed

Conversation

albinvass
Copy link

Issue #, if available:

Description of changes:
This links the memory and snapshot files into the root of the jail and fixes an issue where WithSnapshots overrides the injected LinkFilesHandler.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@albinvass albinvass force-pushed the fix-loading-snapshot branch from f5d23c9 to f301638 Compare April 5, 2024 14:53
@albinvass albinvass marked this pull request as ready for review April 9, 2024 14:08
@albinvass albinvass requested a review from a team as a code owner April 9, 2024 14:08
@albinvass albinvass force-pushed the fix-loading-snapshot branch from 4d7df63 to 6083026 Compare May 31, 2024 21:36
@albinvass albinvass force-pushed the fix-loading-snapshot branch from 6083026 to 7699d06 Compare July 5, 2024 08:17
Albin Vass and others added 2 commits July 5, 2024 10:18
@albinvass albinvass force-pushed the fix-loading-snapshot branch from 7699d06 to 7d76793 Compare July 5, 2024 08:18
@@ -426,6 +426,24 @@ func LinkFilesHandler(kernelImageFileName string) Handler {
m.Cfg.Drives[i].PathOnHost = String(driveFileName)
}

if m.Cfg.hasSnapshot() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasSnapshot returns true if either snapshotPath or memFilePath is non-empty, so we should check if the individual file paths are non-empty, before creating the file link.

Copy link
Contributor

@swagatbora90 swagatbora90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Can you please add/update unit test for this change in jailer_test.go.

Albin Vass added 3 commits August 19, 2024 12:16
This is necessary to support the usage of devmapper or other devices for
drives.
@albinvass albinvass force-pushed the fix-loading-snapshot branch from c827813 to d323c9a Compare August 21, 2024 12:10
@albinvass albinvass force-pushed the fix-loading-snapshot branch from 670922e to 288c809 Compare August 22, 2024 09:47
@albinvass albinvass closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants