Commit Graph

12365 Commits

Author SHA1 Message Date
Archana Shinde
a661ac3a0e runtime-rs: Implement and use try_from for DiskConfig
Implement try_from trait function to convert runtime-rs BlockConfig
to cloud-hypervisor DiskConfig. This can allow for code reuse in the
future.

Fixes: #8581

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-12-06 12:10:34 -08:00
Fabiano Fidêncio
c14e3096c8
Merge pull request #8580 from amshinde/runtime-rs-clh-network-hotplug
runtime-rs: add network hotplug for clh
2023-12-06 20:50:04 +01:00
Gabriela Cervantes
56dddab04f metrics: Update command to run tensorflow resnet fp32 benchmark
This PR updates the command needed to run the tensorflow benchmark.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-06 17:02:10 +00:00
Gabriela Cervantes
62fdebeeb5 metrics: Update TensorFlow ResNet FP32 dockerfile
This PR updates the python version for the TensorFlow ResNet FP32
dockerfile so the benchmark can run without issues.

Fixes #8593

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-06 16:53:21 +00:00
GabyCT
3d149d3455
Merge pull request #8578 from GabyCT/topic/fixlinkconfig
docs: Update config containerd url link
2023-12-06 10:40:29 -06:00
Zvonko Kaiser
16380558e0 deployment: Create a stable overaly for kata-deploy
Fixes: #8508

Create a stable overlay for kata-deploy.yaml so we do not have to maintain two files, only one.
Single source for both. This is also preparation for the helm-overlay

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2023-12-06 14:23:22 +00:00
Huang Jianan
2a1fc29e84 dragonball: add unit test for vhost-user-fs
Add some test cases for vhost-user-fs function.

Signed-off-by: Beiyue <beiyue@linux.alibaba.com>
Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
2023-12-06 10:43:24 +08:00
Huang Jianan
d6cfbe9436 dragonball: support vhost-user-fs
This patch implements the virtio-fs device used for filesystem sharing
and heavily based on the vhost-user protocol.

This vhost-user-fs device defines 5 parameters:
  - path: vhost-user socket path
  - tag: mount tag used from the guest to mount the filesystem
  - req_num_queues: number of request virtqueues
  - queue_size: depth of each virtqueue
  - cache_size: cache window size for dax

This device needs to be defined before the VM instance is started,
which can be done through the dbs-cli tool with --fs option:
--fs '{
    "sock_path":"/path/to/virtiofs.socket",
    "tag":"myfs",
    "num_queues":1,
    "queue_size":1024,
    "cache_size":0,
    "thread_pool_size":1,
    "cache_policy":"auto",
    "writeback_cache":true,
    "no_open":true,
    "xattr":true,
    "drop_sys_resource":false,
    "mode":"vhostuser",
    "fuse_killpriv_v2":true,
    "no_readdir":false,
}'

Fixes: #8428

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
2023-12-06 10:43:17 +08:00
Archana Shinde
955dec06da runtime-rs: add network hotplug for clh
This is required for clh to work with nerdtcl and docker.
This fixes the issues seen with nerdctl while starting a container.
Hoewever, container exit with docker is still broken due to an unrelated
issue.

Fixes: #8579

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-12-05 15:29:53 -08:00
Fabiano Fidêncio
b056683b7a
Merge pull request #8436 from Lu-Biao/main
image-builder: bugfix incorrect partition location
2023-12-06 00:10:06 +01:00
Fabiano Fidêncio
2cd003156e
Merge pull request #8573 from fidencio/topic/gha-add-a-timeout-for-tests
gha: basic-ci: Add a timeout for the tests
2023-12-05 22:20:49 +01:00
Fabiano Fidêncio
d149b9f9ca
Merge pull request #7231 from wainersm/measured_rootfs-improvements
Build for measured rootfs improvements
2023-12-05 22:20:33 +01:00
Fabiano Fidêncio
f75f17c4ff
Merge pull request #8570 from fidencio/topic/gha-dragonball-enable-some-tests-but-do-not-run-them-yet
gha: dragonball: Enable, but do not run, cri-containerd, stability, and devmapper tests
2023-12-05 20:00:24 +01:00
Jeremi Piotrowski
e2c6b8ae6e
Merge pull request #4743 from yuchen0cc/main
mount: support checking multiple kinds of block device driver
2023-12-05 18:04:51 +01:00
Gabriela Cervantes
61b868692b docs: Update config containerd url link
This PR updates the config containerd url link in the containerd
kata documentation.

Fixes #8577

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-05 16:35:21 +00:00
Fabiano Fidêncio
05ce52d746 devmapper: dragonball: Enable, but do not run, the tests
This will make the life easier for dragonball developers to properly
enable the tests once the tests are ready.

Fixes: #8569

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-05 15:29:23 +01:00
Fabiano Fidêncio
a8a156b1af stability: dragonball: Enable, but do not run, the tests
This will make the life easier for dragonball developers to properly
enable the tests once the tests are ready.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-05 15:29:23 +01:00
Fabiano Fidêncio
16ad721eda cri-containerd: dragonball: Enable, but do not run, the tests
This will make the life easier for dragonball developers to properly
enable the tests once the tests are ready.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-05 15:29:23 +01:00
James O. D. Hunt
d9daadf15c
Merge pull request #8558 from jodh-intel/load-config-improvement
runtime-rs: Show config files attempted on config load failure
2023-12-05 11:48:42 +00:00
Greg Kurz
1650d02b91
Merge pull request #8516 from Apokleos/vsock-dev
move vsock device into device manager
2023-12-05 11:28:37 +01:00
James O. D. Hunt
93c0fc2ad3
Merge pull request #8551 from amshinde/runtime-rs-setns-clh
runtime-rs: Launch cloud-hypervisor in given netns
2023-12-05 10:18:34 +00:00
James O. D. Hunt
d627893975 runtime-rs: Show config files attempted on config load failure
PR #8483 changed the location of the rust runtime config files to
`/etc/kata-containers/runtime-rs/`. However, if you haven't updated your
system to create that directory, attempting to create a container using
the rust runtime was giving the following cryptic message
(formatted for easier reading):

```
failed to handler message try init runtime instance

Caused by:
    0: load config
    1: load toml config
    2: entity not found
```

Now, the message is as follows (again, reformatted for easier reading):

```
failed to handle message try init runtime instance

Caused by:
    0: load config
    1: load TOML config failed (tried [
        \"/etc/kata-containers/runtime-rs/configuration.toml\",
        \"/usr/share/defaults/kata-containers/runtime-rs/configuration.toml\",
        \"/opt/kata/share/defaults/kata-containers/runtime-rs/configuration.toml\"
    ])
```

Fixes: #8557.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-12-05 09:10:18 +00:00
James O. D. Hunt
45c0364d4c runtime-rs: Fix typo in task service
"failed to handler message" -> "failed to handle message".

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-12-05 09:10:18 +00:00
Fabiano Fidêncio
a14f2fc180 gha: runk: Fix typo in the test name
tracing -> runk

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-05 09:44:42 +01:00
Fabiano Fidêncio
1a74142a16 gha: basic-ci: Add a timeout for the tests
This will ensure no job will be stuck forever, as we've noticed with a
few jobs already.

Fixes: #8572

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-05 09:42:46 +01:00
GabyCT
e8b28fed2a
Merge pull request #8540 from GabyCT/topic/fixctrdoc
docs: Update cri installation url link
2023-12-04 17:36:33 -06:00
Archana Shinde
2df8144cfe runtime-rs: Launch cloud-hypervisor in given netns
Launch cloud-hypervisor binary in the netns provided at the prepare_vm
stage.

Fixes: #6441

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-12-04 13:02:43 -08:00
Hyounggyu Choi
511dd5feac local-build: add support to build IBM Z SE image
This is to add an artifact for IBM Z SE(TEE) to main.

Fixes: #6754

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-04 21:08:51 +01:00
Hyounggyu Choi
4de8ef3d18 local-build: add build target boot-image-se
This is to add a build target boot-image-se for s390x.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-04 21:08:51 +01:00
Hyounggyu Choi
a63a6959d1 local-build: install s390-tools in Dockerfile
This is to install s390-tools including genprotimg during the docker
build.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-04 21:08:51 +01:00
Hyounggyu Choi
6d0dabd81e gha: build secure image for s390x release
This is add a build target boot-image-se with a host-key-document
config for s390x.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-04 21:08:51 +01:00
Hyounggyu Choi
bb1d4adaa9 config: add SE configuration
This is to add SE configuration which is used by kata runtime.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-04 21:08:49 +01:00
Gabriela Cervantes
2b05029347 docs: Update cri installation url link
This PR updates the cri installation url link for the containerd
documentation.

Fixes #8539

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-04 20:07:49 +00:00
Hyounggyu Choi
8de4241d3b kata-deploy: add kata-qemu-se runtimeclass
This is to increase resources for relaxing the limitation of hotplug for
SE.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-04 21:06:53 +01:00
Hyounggyu Choi
9ede2bcd95 local-build: differentiate build targets based on architecture
This is to rule out unnecessary build targets for s390x.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-04 21:06:53 +01:00
GabyCT
1c00a9a6a9
Merge pull request #8524 from GabyCT/topic/addiperfinfo
docs: Update iperf3 network documentation
2023-12-04 14:03:30 -06:00
GabyCT
1b204cc3cb
Merge pull request #8550 from GabyCT/topic/enableclhstability
gha: Add cloud runtime rs as part of the stability tests
2023-12-04 11:37:58 -06:00
Gabriela Cervantes
dfc07d1c72 gha: stability: Add cloud-hypervisor (runtime-rs) support
This PR adds the Cloud Hypervisor driver, integraedwith the runtime-rs,
as part of the stability tests.

Fixes #8462

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-04 15:32:29 +00:00
Fabiano Fidêncio
8d7e0f7721
Merge pull request #8556 from fidencio/topic/kernel-add-tdx-guest-driver
kernel: Add CONFIG_TDX_GUEST_DRIVER to the tdx.conf
2023-12-04 15:13:57 +01:00
James O. D. Hunt
e4aebb4560
Merge pull request #8549 from jodh-intel/tdx-no-root
libs: protection: x86_64: drop root requirement for querying
2023-12-04 13:03:10 +00:00
Chao Wu
1550ee6767
Merge pull request #8480 from openanolis/chao/add_dbs_pci
dragonball: init dbs-pci lib with pci bus & pci conf
2023-12-04 18:08:40 +08:00
Fabiano Fidêncio
03c3f4275e kernel: Add CONFIG_TDX_GUEST_DRIVER to the tdx.conf
The driver enables the userspace interface to communicate with the TDX
module to request the TDX guest details, like the attestation report.

Fixes: #8555

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-04 10:25:59 +01:00
Biao Lu
b816dca3ed image-builder: fix incorrect part start position
The 'part_start' of image and dax_image should exactly specify the
same location, according to the parted documentation, to exactly
specify the location, the units of start and end should use MiB.

https://www.gnu.org/software/parted/manual/parted.html#IEC-binary-units

Fixes: #8435

Signed-off-by: Biao Lu <biao.lu@intel.com>
2023-12-04 17:20:26 +08:00
Chao Wu
52fd57e49a
Merge pull request #8301 from Apokleos/do-direct-volume
runtime-rs: Enhancing DirectVolMount Handling with Patching Support
2023-12-04 16:49:46 +08:00
James O. D. Hunt
7beab11d9e
Merge pull request #8547 from jodh-intel/unbreak-logger
libs:logging: Fix logger
2023-12-04 08:38:03 +00:00
alex.lyn
0fabfa336d runtime-rs: bring support for legacy vsock device.
Bring support for legacy vsock and add Vsock to the ResourceConfig
enum type, and add the processing flow of the Vsock device to the
prepare_before_start_vm function.

Fixes: #8474

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-12-04 15:54:51 +08:00
alex.lyn
6c08cf35d5 runtime-rs: Introduce prepare_vm_socket_config to VirtSandbox.
Instroduce prepare_vm_socket_config to VirtSandbox for vm
socket config, including Vsock and Hybrid Vsock.
Use the capabilities() trait of the hypervisor to get the
vm socket supported in VMM.

Fixes: #8474

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-12-04 15:54:50 +08:00
alex.lyn
60f88da5e1 runtime-rs: add Capability of HybridVsockSupport for Hypervisor.
Add Cap of HybridVsockSupport for hypervisors CLH and Dragonball
which use hybrid-vsock, default for Qemu, which uses legacy vsock.

Fixes: #8474

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-12-04 15:54:50 +08:00
alex.lyn
c5178dd258 runtime-rs: Introduce Capability of HybridVsockSupport.
Introduce HybridVsock Cap to judge which kind of vm socket will
be supported by the Hypervisor.
Use `is_hybrid_vsock_supported` to tell if an hypervisor supports
hybrid-vsock, if not, it supports legacy vsock.

Fixes: #8474

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-12-04 15:54:29 +08:00
James O. D. Hunt
e1caca3e41 kata-ctl: Remove root requirement for "env"
Remove the redundant `kata-ctl` `root` check when running the `env`
command. This check duplicated the `GuestProtection` check, and that
check is now no longer necessary anyway.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-12-01 15:55:45 +00:00