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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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 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
Albin Vass and others added 2 commits July 5, 2024 10:18
Signed-off-by: Albin Vass <albinvass@gmail.com>
Signed-off-by: Albin Vass <albinvass@gmail.com>
@@ -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.

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.

None yet

2 participants