Commit Graph

12951 Commits

Author SHA1 Message Date
alex.lyn
6af0592274 runtime-rs: Add vsock device in device manager.
(1) Implement Device Trait for vsock device.
(2) add vsock device in device manager.

Fixes: #8474

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-27 15:23:18 +08:00
alex.lyn
1a6b45d3b7 runtime-rs: Reintroduce Vsock and add it to the DeviceType enum
As vsock device will be used in Qemu or other VMMs, the Vsoock
is reintroduced to DeviceType enum.

Fixes: #8474

Signed-off-by: Pavel Mores <pmores@redhat.com>
Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-27 15:12:44 +08:00
alex.lyn
e31dbc94a5 runtime-rs: remove vhost_fd from VsockConfig and make it cloneable.
Currently encounters difficulty in utilizing the clone operation
on VsockConfig due to the implicit management of the vhost fd
within the runtime-rs. This responsibility should be delegated to
the VMM(especially QEMU) child process, as it's not runtime-rs core
responsibilities. We'll remove the member vhost_fd from VsockConfig
and make the VsockConfig/VsockDevice Cloneable.

Fixes: #8474

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-27 15:11:21 +08:00
alex.lyn
eb90962b27 runtime-rs: introduce a new function generate_vhost_vsock_cid.
Introduce a new function generate_vhost_vsock_cid to generate
a guest CID and set guest CID for vsock fd.
Also this commit wouldn't introduce functional change and it's
just splited from the previous VsockDevice::new().

Fixes: #8474

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-27 15:06:58 +08:00
alex.lyn
b952c5c5ce runtime-rs: add support kata/multi-containers sharing one spdk volume.
Fiexes: #8300

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-25 21:13:03 +08:00
alex.lyn
17d2d465d1 runtime-rs: re-organize the volumes with adding new direct_volumes.
Add a new dire direct_volumes containing spdk, rawblock and vfio volume.

Fixes: #8300

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-25 21:04:55 +08:00
alex.lyn
6731466b13 runtime-rs: set a standard NotFound when direct volume path not found.
Fixes: #8300

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-25 19:51:12 +08:00
alex.lyn
d23867273f runtime-rs: split the block volume into block and rawblock volume
(1) rawblock volume is directvol mount type.
(2) block volume is based on the bind mount type.

Fixes: #8300

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-24 23:30:30 +08:00
Amulyam24
ae2c0c5696 github: add workflows for building and publishing kata artifacts on ppc64le
Adds workflows for building kata static tarball and releasing it.

Fixes: #8458

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2023-11-24 15:53:38 +05:30
ChengyuZhu6
5318afe273 runtime: support to create VirtualVolume rootfs storages
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>
2023-11-23 23:22:55 +08:00
ChengyuZhu6
0b4f7c2ee7 runtime: redefine and add functions to handle VirtualVolume to storage
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>
2023-11-23 23:07:32 +08:00
ChengyuZhu6
bd099fbda9 runtime: extend SharedFile to support mutiple storage devices
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>
2023-11-23 23:05:14 +08:00
ChengyuZhu6
e4f33ac141 runtime: add functions to create devices in KataVirtualVolume
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: #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>
2023-11-23 23:05:13 +08:00
Dan Mihai
756022787c
Merge pull request #8239 from Sumynwa/sumsharma/fix_configmap_update_propagation
runtime: Fix configmap/secrets updates with FS sharing disabled
2023-11-23 06:50:53 -08:00
Chelsea Mafrica
98aa291c9e runtime-rs: Add Hybrid VSOCK device handling for CH
Update cloud hypervisor implementation to allow hybrid vsock device to
be handled.

Fixes #6692

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-11-22 14:42:09 -08:00
Gabriela Cervantes
8839ca93ba gha: Disable stratovirt for gha metrics
This PR disables the stratovirt for gha metrics.

Fixes #8496

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-11-22 16:17:31 +00:00
briwan01
231b9dfd9d runtime-rs/clh: Fix unable to boot container
In the case of Cloud Hypervisor running on arm64 architecture,
only arm AMBA UART (pl011) is supported as the TTY. Consequently,
when enabling Hypervisor debug mode, it's essential to configure
the console as "ttyAMA0" rather than "ttyS0

Fixes: #8381

Signed-off-by: briwan01 <brian.wang@arm.com>
2023-11-22 17:52:11 +08:00
GabyCT
358f32e8bb
Merge pull request #8467 from GabyCT/topic/fixresult
metrics: Fix result finding in tensorflow benchmark
2023-11-21 13:41:46 -06:00
Fabiano Fidêncio
45a41c3431
Merge pull request #8481 from ChengyuZhu6/guest-kernel
kernel: backport erofs patch to 6.1.52 guest kernel
2023-11-21 12:22:24 +01:00
Fabiano Fidêncio
8425c78c91
Merge pull request #8476 from fidencio/topic/gha-pass-rust-runtime-to-kata-deploy
tests: k8s: Allow passing rust-runtime env var to kata-deploy
2023-11-21 11:09:01 +01:00
Chao Wu
6a6c3c53b5
Merge pull request #8450 from adamqqqplay/vhost-user-general
dragonball: add vhost-user connection management logic
2023-11-21 16:05:17 +08:00
ChengyuZhu6
6de01eacfd kernel: backport erofs patch to 6.1.52 guest kernel
Backport the erofs patch from linux kernel to solve the error #8083

Fixes: #8083

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
Co-authored-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2023-11-21 15:22:40 +08:00
Amulyam24
d8a8cc4491 tools: install oras from source on ppc64le
Since the release is not yet out for ppc64le, build oras from source and use it.

Fixes: #8458

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2023-11-21 11:38:20 +05:30
Amulyam24
08f3603123 tools: fix static build of qemu and shimv2 on ppc64le
- statically linked qemu requires slof.bin to run, hence remove it from blacklist
- By default, initrd is used for Power, modify the configuration.toml accordingly

Fixes: #8458

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2023-11-21 11:38:20 +05:30
Alex.Lyn
4fd2914a33
Merge pull request #7932 from Apokleos/wrap-virtiofs-in-dm
runtime-rs: bringing virtio-fs device in device-manager
2023-11-21 13:48:15 +08:00
Huang Jianan
a9571398a6 dragonball: add test utils for vhost-user
The test utils will be used by the upcoming feature tests: vhost-user-net,
vhost-user-blk and vhost-user-fs.

Signed-off-by: Beiyue <beiyue@linux.alibaba.com>
Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
2023-11-21 09:51:56 +08:00
Qinqi Qu
a6a399d5bc dragonball: add vhost-user connection management logic
The vhost-user connection management logic will be used by
the upcoming features: vhost-user-net, vhost-user-blk and
vhost-user-fs.

Fixes: #8448

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>
Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
2023-11-21 09:51:48 +08:00
Fabiano Fidêncio
9445a967b6
Merge pull request #8471 from ChengyuZhu6/kata-virtual-volume
runtime: Introduce `KataVirtualVolume` structure into go runtime
2023-11-20 21:58:27 +01:00
Fabiano Fidêncio
8002de895a
Merge pull request #8439 from fidencio/topic/kata-manager-install-a-given-kata-tarball
utils: kata-manager: Allow installing kata from a given tarball
2023-11-20 20:02:25 +01:00
Wainer Moschetta
728565d1e4
Merge pull request #7046 from stevenhorsman/remote-hypervisor-cherry-picks
CC: Remote hypervisor merge to main
2023-11-20 15:22:37 -03:00
Chao Wu
5ee8829700
Merge pull request #8451 from openanolis/chao/pci 2023-11-21 00:29:22 +08:00
Fabiano Fidêncio
41f3f6f93e
Merge pull request #8465 from justxuewei/rename-virtio
dragonball: Uniform the spelling of Virtio
2023-11-20 16:31:33 +01:00
Hyounggyu Choi
506b127df8
Merge pull request #8478 from BbolroC/set-default-allowed_hypervisor_annotations
kata-deploy: Set a default value for ALLOWED_HYPERVISOR_ANNOTATIONS
2023-11-20 15:39:56 +01:00
alex.lyn
fe62e656a7 runtime-rs: Name the ShareFs Mount Option type more accurately
Fixes: #7915

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-20 20:05:50 +08:00
alex.lyn
856315ff87 runtime-rs: bringing virtio-fs device in device-manager
It mainly focus on the two parts:
(1) redesign the ShareFsConfig with ShareFsMountConfig

The device mount operation must depend on the fact that sharefs
device exists, and re-design the structure of SharesFsConfig and
move the ShareFsMountConfig into it with Option type, which is to
describe the relation between ShareFsConfig and ShareFsMountConfig.

(2) move virtiofs into device manager
Currently, virtio-fs is still outside of the device manager.
To do Enhancement of device manager, it will bring virtio-fs
device in device-manager for unified management

Fixes: #7915

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-20 20:04:47 +08:00
Chao Wu
b3318e59eb
Merge pull request #8332 from Apokleos/bugfix-directvol-multicontainers
runitme-rs/bugfix: kata pod with multi-containers sharing one direct volume
2023-11-20 19:37:58 +08:00
Hyounggyu Choi
c489f1f504 kata-deploy: Set a default value for ALLOWED_HYPERVISOR_ANNOTATIONS
As a follow-up PR for #8404, this is to set a default value for an environment variable `ALLOWED_HYPERVISOR_ANNOTATIONS`.
This will prevent a pod launching without an explicit configuration for the variable from getting into a `CrashLoop` state.

Fixes: #8477

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-11-20 12:33:34 +01:00
Chao Wu
ee55897827 fmt: refactor in pci & balloon
1. merge hashmap get logic according to Xuewei suggestion.

2. do cargo fmt

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2023-11-20 17:53:51 +08:00
Chao Wu
baf3db9e6e Dragonball: add PCI bus and PCI interrupt support in mptable Spec
In order to support PCI VFIO functionality in Dragonball, we should
first add PCI bus and PCI device Interrupt information in Dragonball
mptable setup process.

This patch add :

1. pci_legacy_irqs transfered to setup_mptable function.
2. pci bus support in mptable mem
3. pci interrupt support in mptable mem

fixes: #8449

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2023-11-20 17:53:51 +08:00
Xuewei Niu
c305634b4e dragonball: Uniform the spelling of Virtio
The changes are:

- VirtIoError -> VirtioError
- VirtIoResult -> VirtioResult
- VirtIoDevice -> VirtioDevice

Fixes: #8464

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2023-11-20 17:00:58 +08:00
Fabiano Fidêncio
44899d4cdf tests: k8s: Allow passing rust-runtime env var to kata-deploy
This will be used for selecting the correct runtimes and runtimeclasses
to be deployed with kata-deploy.

Fixes: #8475

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-11-20 09:13:05 +01:00
ChengyuZhu6
1353b14e6c runtime: Add KataVirtualVolume struct in runtime
Add the corresponding data structure in the runtime part according to
kata-containers/kata-containers/pull/7698.

Fixes: #8472

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2023-11-19 13:30:32 +08:00
Greg Kurz
110574353d
Merge pull request #8345 from beraldoleal/issues/8343
Fixes make check errors
2023-11-17 17:38:29 +01:00
Gabriela Cervantes
37916e7a58 metrics: Fix result finding
This PR fixes the result finding for the general throughput for
the tensorflow benchmark.

Fixes #8466

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-11-17 15:59:51 +00:00
stevenhorsman
ebf9d2725a kata-deploy: Add remote shim
- Add remote to the list of shims in kata-deploy and kata-cleanup

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-11-17 13:38:49 +00:00
Fabiano Fidêncio
d5cf169adf kata-deploy: Add missing kata-remote runtimeclass
It's CCv0 specific for now, and it's needed as the Operator is now
delegating the runtimeclass creation to the kata-deploy daemonset.

Fixes: #7550

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit 2df6cb7609)
2023-11-17 13:34:40 +00:00
Pradipta Banerjee
39e8c84269 runtime: Add support for key annotations to remote hyp
In order to support different pod VM instance type via
remote hypervisor implementation (cloud-api-adaptor),
we need to pass machine_type, default_vcpus
and default_memory annotations to cloud-api-adaptor.

The cloud-api-adaptor then uses these annotations to spin
up the appropriate cloud instance.

Reference PR for cloud-api-adaptor
https://github.com/confidential-containers/cloud-api-adaptor/pull/1088

Fixes: #7140
Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
(based on commit 004f07f076)
2023-11-17 13:33:27 +00:00
Yohei Ueda
2910e333a8 runtime: Use static resource in remote hypervisor
This patch updates the template configuration file for
the remote hypervisor to set static_sandbox_resource_mgmt
to be true.  The remote hypervisor uses the peer pod config
to determine the sandbox size, so requires this to be set to
true by default.

Fixes: #6616
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
(based on commit 938447803b)
2023-11-17 13:33:27 +00:00
stevenhorsman
26d56678a9 config: Add initial remote hypervisor config
- Remote hypervisor template config
- Add annotation enablement for machine_type, default_memory and
default_vcpus for flexible instance types

Fixes: #6349
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
(based on commits 7c9a791d67
and 335a456425)
2023-11-17 13:33:24 +00:00
stevenhorsman
ad63439a3e runtime: Update the remote hypervisor config
Add the SELinux setting to ensure it is passed through to the remote
hypervisor

Fixes: #5936

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
(based on commit 3ef2fd1784)
2023-11-17 13:32:52 +00:00