Commit Graph

12171 Commits

Author SHA1 Message Date
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
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
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
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
Lei Li
50e0d43dad runtime: Support privileged containers in peer pod VM
This patch fixes the issue of running containers
with privileged as true.

See the discussion at this URL for the details.
https://github.com/confidential-containers/cloud-api-adaptor/issues/111

Signed-off-by: Lei Li <cdlleili@cn.ibm.com>
(based on commit c3e6b66051)
2023-11-17 13:32:52 +00:00
Yohei Ueda
57d4dd8e57 runtime: Support the remote hypervisor type
This patch adds the support of the remote hypervisor type.
Shim opens a Unix domain socket specified in the config file,
and sends TTPRC requests to a external process to control
sandbox VMs.

Fixes #4482

Co-authored-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Co-authored-by: stevenhorsman <steven@uk.ibm.com>
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
(based on commit f9278f22c3)
2023-11-17 13:32:49 +00:00
Yohei Ueda
8ac9a22097 runtime: Add hypervisor proto to support peer pod VMs
This patch adds a protobuf definiton of the remote hypervisor type.

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
Co-authored-by: stevenhorsman <steven@uk.ibm.com>
(based on commit 150e8aba6d)
2023-11-17 13:31:09 +00:00
Fabiano Fidêncio
f8322ffad2
Merge pull request #7796 from WenyuanLau/7794/StratoVirt_VMM_support
StratoVirt: add support for a lightweight VMM StratoVirt in Kata
2023-11-17 10:53:17 +01:00
Fabiano Fidêncio
d6d9b45007
Merge pull request #7931 from BbolroC/migrate-to-gha-s390x
tests|gha: add containerd and k8s tests for s390x
2023-11-17 10:24:14 +01:00
Hyounggyu Choi
0c7aa1f307 gha: Set nightly test for s390x to 5 UTC
This is to push back the time for the s390x nightly test to 5 a.m. UTC.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-11-17 05:47:44 +01:00
Hyounggyu Choi
ffe1ea52cf tests|gha: add containerd and k8s tests for s390x
As part of the CI migration, this PR is to add workflows for containerd and k8s for s390x.

Fixes: #7930
Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-11-16 18:14:26 +01:00
GabyCT
8586308dcd
Merge pull request #8453 from GabyCT/topic/udpreadme
metrics: Add iperf udp information to README
2023-11-16 10:38:56 -06:00
GabyCT
494174a98e
Merge pull request #8421 from GabyCT/topic/enablestressng
tests: Enable stressng scalability test
2023-11-16 10:25:05 -06:00
Fabiano Fidêncio
10996f3bbb
Merge pull request #8460 from ldoktor/artifacts
gha: Keep kata tarballs for 15 days
2023-11-16 13:56:25 +01:00
Liu Wenyuan
c77e990c3e tests: Enable tests for StratoVirt hypervisor
This commit enables StratoVirt hypervisor to be tested in kata GHA,
incluing k8s, metrics, cri-containerd, nydus and so on.

Meanwhile, adding some unit tests for StratoVirt to make sure it works.

Fixes: #7794

Signed-off-by: Liu Wenyuan <liuwenyuan9@huawei.com>
2023-11-16 20:47:26 +08:00
Liu Wenyuan
14d8790d83 kata-deploy: Add StratoVirt support to deploy process
Allow kata-deploy process to pull StratoVirt from release binaries, and
add them as a part of kata release.

Fixes: #7794

Signed-off-by: Liu Wenyuan <liuwenyuan9@huawei.com>
2023-11-16 20:47:26 +08:00
Liu Wenyuan
9542211e71 configuration: add configuration for StratoVirt hypervisor.
Add configuration-stratovirt.toml.in to generate the StratoVirt configuration,
and parser to deliver config to StratoVirt.

Fixes: #7794

Signed-off-by: Liu Wenyuan <liuwenyuan9@huawei.com>
2023-11-16 20:47:26 +08:00
Liu Wenyuan
561c85be54 build: Makefile for StratoVirt hypervisor
Add support for building StratoVirt hypervisor, including x86_64 and
arm64.

Fixes: #7794

Signed-off-by: Liu Wenyuan <liuwenyuan9@huawei.com>
2023-11-16 20:47:26 +08:00
Liu Wenyuan
26966c8469 virtcontainers: Add StratoVirt as a supported hypervisor
Initial support of the MicroVM machine type of StratoVirt
hypervisor for the kata go runtime.

Fixes: #7794

Signed-off-by: Liu Wenyuan <liuwenyuan9@huawei.com>
2023-11-16 20:47:24 +08:00
Fabiano Fidêncio
edb791315e
Merge pull request #7987 from BbolroC/nightly-ci-s390x
tests|gha: add nightly tests for s390x
2023-11-16 11:45:32 +01:00
Lukáš Doktor
8959e3ca05
gha: Keep kata tarballs for 15 days
these tarballs are useful for debugging and re-running jobs, keep them
for 15 days.

Fixes: #8000

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2023-11-16 10:35:20 +01:00
Gabriela Cervantes
9cc6908b09 stability: Update stressng to run on the gha
This PR updates the stressng test to run on the gha for kata CI.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-11-15 19:34:36 +00:00
Gabriela Cervantes
9d8eb298c3 metrics: Add iperf udp information to README
This PR adds the iperf udp information to the network README
for the kata metrics CI.

Fixes #8452

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-11-15 15:22:06 +00:00
Gabriela Cervantes
4b7854b668 stability: Add missing dependencies
This PR adds missing dependencies to run stability tests.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-11-15 14:51:14 +00:00
Gabriela Cervantes
79177bb9cb tests: Enable stressng scalability test
This PR enables the stressng scalability test for kata CI.

Fixes #8420

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-11-15 14:51:14 +00:00
Xuewei Niu
f18794d880
Merge pull request #8426 from justxuewei/vhost-rm-virtio-net
dragonball: Remove vhost-net dependency on virtio-net
2023-11-15 10:39:27 +08:00
alex.lyn
ba632ba825 runitme-rs: kata with multi-containers sharing one direct volume
When multiple containers in a kata pod share one direct volume,
it's important to make sure that the corresponding block device
is only mounted once in the guest. This means that there should
be only one mount entry for the device in the mount information.

Fixes: #8328

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-15 10:37:01 +08:00
alex.lyn
d7594d830c runtime-rs: correct the path from cid to device_id.
When a direct volume is used by multiple containers in Kata,
Generating many shared paths with cids will cause IO error
as the result of one direct volume mounts more than once.
To correct it, use the device_id instead of cid which
ensures that the guest only mounts the FS once.

Fixes: #8328

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-11-15 10:30:39 +08:00
Fabiano Fidêncio
906f6b7380
Merge pull request #8431 from UiPath/fix-vsock-packets-drop
kernel: Fix vsock packets drop when the driver initializes
2023-11-14 18:52:53 +01:00
Fabiano Fidêncio
1699b84f13 utils: kata-manager: Remove $enable_debug from the install_kata call
This was added as part of d4d65bed38, but
install_kata has never actually used the passed enable_debug var.

With this in mind, let's just remove it.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-11-14 17:34:03 +01:00
Fabiano Fidêncio
38d2edd83b utils: kata-manager: Allow installing kata from a given tarball
With this change, we give the users the change to try kata-containers
with their own pre-built tarball.

This will become very useful in the CI context, as we won't be
downloading a specific version of kata-containers, but rather installing
whatever was built in previous steps of the CI pipeline.

Fixes: #8438

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-11-14 17:34:01 +01:00
Fabiano Fidêncio
fd9b6d6837
Merge pull request #7623 from fidencio/topic/runtime-improve-vcpu-allocation-on-host-side
runtime: Improve vCPU allocation for the VMMs
2023-11-14 14:10:54 +01:00