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
runtime: Pass KataVirtualVolume
to the guest as devices in go runtime
#8494
runtime: Pass KataVirtualVolume
to the guest as devices in go runtime
#8494
Conversation
KataVirtualVolume
KataVirtualVolume
in go runtime
d6284a3
to
4825e99
Compare
aabdaff
to
2eddaad
Compare
2eddaad
to
4727c9d
Compare
KataVirtualVolume
in go runtimeKataVirtualVolume
to the guest by devices in go runtime
KataVirtualVolume
to the guest by devices in go runtimeKataVirtualVolume
to the guest as devices in go runtime
/test |
///TODO implement the logic with KataVirtualVolume types | ||
switch volumeType { | ||
case types.KataVirtualVolumeImageGuestPullType: | ||
case types.KataVirtualVolumeImageRawBlockType, types.KataVirtualVolumeLayerRawBlockType: | ||
case types.KataVirtualVolumeImageNydusBlockType, types.KataVirtualVolumeLayerNydusBlockType: | ||
case types.KataVirtualVolumeImageNydusFsType, types.KataVirtualVolumeLayerNydusFsType: | ||
case types.KataVirtualVolumeDirectBlockType: | ||
default: | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Chengyu, you have a couple of these volumeType switch blocks with TODOs, which I'm wondering about.
They don't seem to be doing anything at the moment, so are they set-up for a future PR? Would it be worth saving these blocks to that PR rather than adding code that doesn't do anything right now? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
The snapshotter will place `KataVirtualVolume` information into 'rootfs.options' and commence with the prefix 'io.katacontainers.volume='. The purpose of this commit is to transform the encapsulated KataVirtualVolume data into device information. Fixes: kata-containers#8495 Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com> Co-authored-by: Feng Wang <feng.wang@databricks.com> Co-authored-by: Samuel Ortiz <sameo@linux.intel.com> Co-authored-by: Wedson Almeida Filho <walmeida@microsoft.com>
To enhance the construction and administration of `Katavirtualvolume` storages, this commit expands the 'sharedFile' structure to manage both rootfs storages(`containerStorages`) including `Katavirtualvolume` and other data volumes storages(`volumeStorages`). NOTE: `volumeStorages` is intended for future extensions to support Kubernetes data volumes. Currently, `KataVirtualVolume` is exclusively employed for container rootfs, hence only `containerStorages` is actively utilized. Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
1) Extract function `handleBlockVolume` to create Storage only. 2) Add functions to handle KataVirtualVolume device and construct corresponding storages. Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
8efbb60
to
817cea2
Compare
1) Creating storage for all `io.katacontainers.volume=` messages in rootFs.Options, and then aggregates all storages into `containerStorages`. 2) Creating storage for other data volumes and push them into `volumeStorages`. Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
817cea2
to
5318afe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an expert, but this good to me and is familiar from the work I reviewed on CCv0
/test |
It would be great to sync these changes to runtime-rs too, @studychao |
/test |
label added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's useful to virtualization cases. Can we apply this?
/test |
KataVirtualVolume
to the guest as devices in go runtimeKataVirtualVolume
to the guest as devices in go runtime
Pass
KataVirtualVolume
to the guest as devices(#7698, #8471) to support nydus image, raw block image, direct volume and image pulling on the guest.This will be a core dependency for several other PRs(#8484, #7837).
Notes: This code is the outcome of extracting the logic about
KataVirtualVolume
from two PRs(#7688, #7676) in CCv0 that have been merged.Fixes: #8495