Skip to content

Conversation

@Kern--
Copy link
Contributor

@Kern-- Kern-- commented Feb 23, 2022

With this change, if a mount is returned from a snapshotter
where the type is prefixed with "vm:", then firecracker-containerd
will not assume it is a block device and will pass the mount
information directly to the agent in the VM to handle mounting
the container's rootfs.

Signed-off-by: Kern Walster [email protected]

Issue #, if available:

Description of changes:

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

@Kern-- Kern-- requested a review from a team as a code owner February 23, 2022 04:47
agent/service.go Outdated
return nil
})

isVmLocalRootFs := vm.IsLocalMount(req.Rootfs[0])
Copy link

Choose a reason for hiding this comment

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

Do we need to do something for Rootfs[1]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now, runtime/service.go enforces exactly one rootfs per container.

agent/service.go Outdated
Source: req.Rootfs[0].Source,
Options: req.Rootfs[0].Options,
}
specData, err = vm.UpdateSpec(requestCtx, specData, rootfsMount)
Copy link

Choose a reason for hiding this comment

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

Could this be more specific? The function is updating the spec, but how?

Comment on lines 26 to 28
Type: "mount",
Source: "mount",
Target: "mount",
Copy link

Choose a reason for hiding this comment

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

Let's have something more realistic rather than "mount" :)

@Kern-- Kern-- force-pushed the vm-mounts branch 2 times, most recently from d321519 to 8ab58ac Compare February 24, 2022 20:19
With this change, if a mount is returned from a snapshotter
where the type is prefixed with "vm:", then firecracker-containerd
will not assume it is a block device and will pass the mount
information directly to the agent in the VM to handle mounting
the container's rootfs.

Signed-off-by: Kern Walster <[email protected]>
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