Commit Graph

12279 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
James O. D. Hunt
f05ada592f libs: protection: x86_64: drop root requirement for querying
It is no longer necessary to be `root` to query the guest protection
(TDX) on `x86_64` systems, so drop the requirement.

> **Note:**
>
> This change drops the `nix` `Uid` import required for the `root` check.
> But at the same time it adds it for PPC64le since that implementation of
> `available_guest_protection()` needs it and it was previously missing.

Fixes: #8548.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-12-01 15:55:21 +00:00
Fabiano Fidêncio
852021e416
Merge pull request #8483 from fidencio/topic/move-rust-config-files-to-subdir-based-on-jodh-approach
build/kata-deploy: Move rust runtime config files to runtime-rs directory -- based on #8445
2023-12-01 16:22:51 +01:00
James O. D. Hunt
f9f1d3a071 libs:logging: Fix logger
PR #8311 inadvertently broke the logging since no log messages below the
`Info` level are logged now, regardless of the requested log level.

Resolve the issue by storing the requested log level in the
`RuntimeComponentLevelFilter` and using that level in the `log()`
function, rather than hard-coding `Info` as the default where no entry
is found in the `FILTER_RULE` hashmap.

Fixes: #8546.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-12-01 12:21:20 +00:00
yuchen.cc
1cd1558a92 mount: support checking multiple kinds of block device driver
Device mapper is the only supported block device driver so far,
which seems limiting. Kata Containers can work well with other
block devices. It is necessary to enhance supporting of multiple
kinds of host block device.

Fixes #4714

Signed-off-by: yuchen.cc <yuchen.cc@alibaba-inc.com>
2023-12-01 11:59:30 +08:00
Chelsea Mafrica
818b8f93b1
Merge pull request #8288 from cmaf/migrate-static-checks
Migrate static checks
2023-11-30 17:44:16 -08:00
Chelsea Mafrica
207a7fef90
Merge pull request #7815 from cmaf/runtime-rs-ch-vsock
runtime-rs: Add Hybrid VSOCK device handling for CH
2023-11-30 12:22:36 -08:00
GabyCT
2bd21f7831
Merge pull request #8531 from GabyCT/topic/fixiperfli
metrics: Fix iperf parallel bandwidth limit
2023-11-30 13:47:00 -06:00
Chao Wu
b3da71f21e dragonball: init dbs-pci lib with pci bus & pci conf
This commit inits dbs-pci lib for Dragonball to use.
It contains several implementation now:

1. PCI configuration space
2. PCI bus

More info of the design & behavior of those two features could be found
in the README of dbs-pci.

fixes: #8479

Signed-off-by: Gerry Liu <gerry@linux.alibaba.com>
Signed-off-by: Zizheng Bian <zizheng.bian@linux.alibaba.com>
Signed-off-by: Shifang Feng <fengshifang@linux.alibaba.com>
Signed-off-by: Yang Su <yang.su@linux.alibaba.com>
Signed-off-by: Zha Bin <zhabin@linux.alibaba.com>
Signed-off-by: Xin Lin <jingshan@linux.alibaba.com>
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2023-11-30 23:40:26 +08:00
Dan Mihai
38f24c41c0
Merge pull request #8271 from microsoft/danmihai1/exec-test-failure
tests: more k8s-exec-rejected debug output
2023-11-30 07:11:01 -08:00
Greg Kurz
48e5596186
Merge pull request #8456 from cheriL/8447/alpine_bash
osbuilder: add pkg bash for alpine
2023-11-30 13:43:48 +01:00
Steve Horsman
c6110284d5
Merge pull request #8520 from stevenhorsman/hypervisor-ttrpc
runtime: Update hypervisor generated code
2023-11-30 10:01:56 +00:00
Amulya Meka
3d5db65b2e
Merge pull request #8526 from Amulyam24/workflow-ppc
gha: fix artefacts build on ppc64le
2023-11-30 15:00:06 +05:30
Fabiano Fidêncio
80fcc56cef
Merge pull request #8528 from fidencio/topic/stop-building-and-shipping-log-parser-rs
tools: Stop building / shipping log-parser-rs
2023-11-30 09:14:10 +01:00
Fabiano Fidêncio
9b30d97885
Merge pull request #8533 from fidencio/topic/fix-invalid-cpu-topology-for-tdx
Revert "runtime: confidential: Do not set the max_vcpu to cpu"
2023-11-30 09:06:45 +01:00
Amulyam24
6a922f0e37 gha: fix artefacts build on ppc64le
Add step in the right place to prepare the runner for the builds/tests.

Fixes: #8525

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2023-11-30 09:50:47 +05:30
soup
811ec07359 osbuilder: add pkg bash for alpine
The bash component is required in the guest for debug console to work properly.

Fixes: #8447

Signed-off-by: soup <lqh348659137@outlook.com>
2023-11-30 09:42:39 +08:00
Fabiano Fidêncio
f15e16b692 Revert "runtime: confidential: Do not set the max_vcpu to cpu"
This reverts commit b0157ad73a.
```
commit b0157ad73a
Refs: 3.3.0-alpha0-124-gb0157ad73
Author:     Fabiano Fidêncio <fabiano.fidencio@intel.com>
AuthorDate: Fri Aug 11 14:55:11 2023 +0200
Commit:     Fabiano Fidêncio <fabiano.fidencio@intel.com>
CommitDate: Fri Nov 10 12:58:20 2023 +0100

    runtime: confidential: Do not set the max_vcpu to cpu

    We don't have to do this since we're relying on the
    `static_sandbox_resource_mgmt` feature, which gives us the correct
    amount of memory and CPUs to be allocated.

    Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
```

This commit was removing a requirement that was made previously, but due
to the SMP issue we're facing with the QEMU used for TDX (see commit
d1b54ede290e95762099fff4e0bcdad10f816126*), QEMU will fail to start due
to:
```
Invalid CPU topology: product of the hierarchy must match maxcpus:
sockets (1) * dies (1) * cores (1) * threads (1) != maxcpus (240)"
```

This has no affect on the SEV / SNP workflow and hopefully we'll be able
to re-revet this soon enough, when this gets solved on te QEMU side.

Last but not least, this is not a "clean" revert as we're using
conf.NumVCPUs() instead of conf.NumVCPUs, to ensure we're dealing with
uint32.

Fixes: #8532

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-11-30 00:41:27 +01:00
Fabiano Fidêncio
1284b4e80d tools: Stop building / shipping log-parser-rs
This is a commit that's a pre-req for #6826, as that PR will merge
log-parser-rs into kata-ctl, but that will result in a CI breakage.

So, let's deal with the CI changes here, thanks to GHA and our favourite
`pull_request_target` event, unblocking that PR to be merged.

Fixes: #6797 (not really, but related).

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-11-30 00:32:10 +01:00
Gabriela Cervantes
37633d3cc2 metrics: Fix iperf parallel bandwidth limit
This PR fixes the iperf parallel bandwidth limit for the kata
metrics CI.

Fixes #8530

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-11-29 19:59:45 +00:00
Dan Mihai
96deea52f2 tests: more k8s-exec-rejected debug output
Print more information useful for debugging. Also, use a separate YAML
file for this test, instead of reusing someone else's file.

Fixes: #8270

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2023-11-29 18:05:15 +00:00
stevenhorsman
47b8c3181f runtime: remote hypervisor updates to ttrpc
- Update the remote hypervisor code to match the re-genned code for
the ttrpc Hypervisor Service

Fixes: #8519
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-11-29 18:04:40 +00:00
stevenhorsman
613c75ba8c runtime: Update hypervisor generated code
Update to use ttrpc_out instead of grpc_out

Fixes: #8519
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-11-29 18:04:40 +00:00