Commit Graph

15101 Commits

Author SHA1 Message Date
Zvonko Kaiser
7cca2c4925 gpu: Use a dedicated VFIO group vs iommufd entry
We do not want to abuse the sysfsentry lets use a dedicated
devfsentry.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2025-02-20 18:27:52 +00:00
Zvonko Kaiser
9add633258 qemu: Add command line for IOMMUFD
For each IOMMUFD device create an object and assign
it to the device, we need additional information that
is populated now correctly to decide if we run the old VFIO
or new VFIO backend.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2025-02-20 18:27:50 +00:00
Zvonko Kaiser
e82fdee20f runtime: Add proper IOMMUFD parsing
With newer kernels we have a new backend for VFIO
called IOMMUFD this is a departure from VFIO IOMMU Groups
since it has only one device associated with an IOMMUFD entry.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2025-01-15 23:39:33 +00:00
Fabiano Fidêncio
121ac0c5c0
Merge pull request #10727 from microsoft/danmihai1/mariner3-guest
image: bump mariner guest version to 3.0
2025-01-14 19:06:28 +01:00
Fabiano Fidêncio
3658ea2320
Merge pull request #10731 from microsoft/danmihai1/quiet-rootfs-build
rootfs: reduced console output by default
2025-01-14 19:02:42 +01:00
Chengyu Zhu
7d34ca4420
Merge pull request #10674 from bpradipt/fix-10398
agent: alternative implementation for sealed_secret as volume
2025-01-14 18:55:45 +08:00
Fabiano Fidêncio
4578969c5d
Merge pull request #10730 from BbolroC/bump-coco-trustee
versions: Bump trustee to latest
2025-01-14 08:56:11 +01:00
Dan Mihai
0f522c09d9 rootfs: reduced console output by default
Use "set -x" only when the user specified DEBUG=1.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-01-13 19:34:05 +00:00
Pradipta Banerjee
36580bb642 tests: Update sealed secret CI value to base64url
The existing encoding was base64 and it fails due to
874948638a

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
2025-01-13 09:37:05 -05:00
Hyounggyu Choi
2cdb549a75 versions: Bump trustee to latest
This update addresses an issue with token verification for SE and SNP
introduced in the last update by #10541.
Bumping the project to the latest commit resolves the issue.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2025-01-13 15:07:33 +01:00
Pradipta Banerjee
5218345e34 agent: alternative implementation for sealed_secret as volume
The earlier implementation relied on using a specific mount-path prefix - `/sealed`
to determine that the referenced secret is a sealed secret.
However that was restrictive for certain use cases as it forced
the user to always use a specific mountpath naming convention.

This commit introduces an alternative implementation to relax the
restriction. A sealed secret can be mounted in any mount-path.
However it comes with a potential performance penality. The
implementation loops through all volume mounts and reads the file
to determine if it's a sealed secret or not.

Fixes: #10398

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
2025-01-11 12:36:44 -05:00
Dan Mihai
4707883b40 image: bump mariner guest version to 3.0
Use Mariner 3.0 (a.k.a., Azure Linux 3.0) as the Guest CI image.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-01-11 17:36:19 +00:00
Fabiano Fidêncio
2d9baf899a
Merge pull request #10719 from msanft/msanft/runtime/fix-boolean-opts
runtime: use actual booleans for QMP `device_add` boolean options
2025-01-11 16:38:06 +01:00
Zvonko Kaiser
f08a9eac11
Merge pull request #10721 from stevenhorsman/more-metrics-latency-minimum-range-fixes
metrics: Increase latency test range
2025-01-10 21:59:39 -05:00
Moritz Sanft
e5735b221c
runtime: use actual booleans for QMP device_add boolean options
Since
be93fd5372,
which is included in QEMU since version 9.2.0, the options for the
`device_add` QMP command need to be typed correctly.

This makes it so that instead of `"on"`, the value is set to `true`,
matching QEMU's expectations.

This has been tested on QEMU 9.2.0 and QEMU 9.1.2, so before and after
the change.

The compatibility with incorrectly typed options  for the `device_add`
command is deprecated since version 6.2.0 [^1].

[^1]:  https://qemu-project.gitlab.io/qemu/about/deprecated.html#incorrectly-typed-device-add-arguments-since-6-2

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
2025-01-10 11:53:56 +01:00
Wainer Moschetta
5fae2a9f91
Merge pull request #9871 from wainersm/fix-print_cluster_name
tests/gha-run-k8s-common: shorten AKS cluster name
2025-01-09 14:35:02 -03:00
stevenhorsman
aaae5b6d0f metrics: clh: Increase network-iperf3 range
We hit a failure with:
```
time="2025-01-09T09:55:58Z" level=warning msg="Failed Minval (0.017600 > 0.015000) for [network-iperf3]"
```
The range is very big, but in the last 3 test runs I reviewed we have got a minimum value of 0.015s
and a max value of 0.052, so there is a ~350% difference possible
so I think we need to have a wide range to make this stable.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-01-09 11:25:57 +00:00
stevenhorsman
e946d9d5d3 metrics: qemu: Increase latency test range
After the kernel version bump, in the latest nightly run
https://github.com/kata-containers/kata-containers/actions/runs/12681309963/job/35345228400
The sequential read throughput result was 79.7% of the expected (so failed)
and the sequential write was 84% of the expected, so was fairly close,
so increase their minimum ranges to make them more robust.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-01-09 11:25:50 +00:00
Wainer dos Santos Moschetta
badc208e9a tests/gha-run-k8s-common: shorten AKS cluster name
Because az client restricts the name to be less than 64 characters. In
some cases (e.g. KATA_HYPERVISOR=qemu-runtime-rs) the generated name
will exceed the limit. This changed the function to shorten the name:

* SHA1 is computed from metadata then compound the cluster's name
* metadata as plain-text are passed as --tags

Fixes: #9850
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2025-01-08 16:39:07 -03:00
Fabiano Fidêncio
8f8988fcd1
Merge pull request #10714 from fidencio/topic/update-virtiofsd
virtiofsd: Update to its v1.13.0 ( + one patch) release :-)
2025-01-08 17:59:29 +01:00
Fabiano Fidêncio
7e5e109255
Merge pull request #10541 from fitzthum/bump-trustee-010
Update Trustee and Guest Components
2025-01-08 17:44:13 +01:00
Fabiano Fidêncio
eb3fe0d27c
Merge pull request #10717 from fidencio/topic/re-enable-oom-test-for-mariner
tests: Re-enable oom tests for mariner
2025-01-08 17:43:56 +01:00
Fabiano Fidêncio
65e267294b
Merge pull request #10718 from stevenhorsman/metrics-blogbench-latency-minimal-range-increase
metrics: Increase latency minimum range
2025-01-08 17:09:36 +01:00
stevenhorsman
dc069d83b5 metrics: Increase latency test range
The bump to kernel 6.12 seems to have reduced the latency in
the metrics test, so increase the ranges for the minimal value,
to account for this.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-01-08 15:11:49 +00:00
Fabiano Fidêncio
967d5afb42 Revert "tests: k8s: Skip one of the empty-dir tests"
This reverts commit 9aea7456fb.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-01-08 14:07:34 +01:00
Fabiano Fidêncio
7ae2ca4c31 virtiofsd: Update to its v1.13.0 + one patch release
Together with the bump, let's also bump the rust version needed to build
the package, with the caveat that virtiofsd doesn't actually use a
pinned version as part of their CI, so we're bumping to whatever is the
version on `alpine:rust` (which is used in their CI).

It's important to note that we're using a version which brings in one
extra patch apart from the release, as the next virtiofsd release will
happen at the end of February, 2025.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-01-08 14:07:34 +01:00
Fabiano Fidêncio
0af3536328 packaging: virtiofsd: Allow building a specific commit
Right now we've been only building releases from virtiofsd, but we'll
need to pin a specific commit till v1.14.0 is out, thus let's add the
needed machinery to do so.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-01-08 14:07:34 +01:00
Tobin Feldman-Fitzthum
41c7f076fa packaging: updating guest components build script
The guest-components directory has been re-arranged slightly. Adjust the
installation path of the LUKS helper script to account for this.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2025-01-07 16:59:10 -06:00
Tobin Feldman-Fitzthum
cafc7d6819 versions: update trustee and guest components
Trustee has some new features including a plugin backend, support for
PKCS11 resources, improvements to token verification, and adjustments to
logging, and more.

Also update guest-components to pickup improvements and keep the KBS
protocol in sync.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2025-01-07 16:59:10 -06:00
Fabiano Fidêncio
53ac0f00c5 tests: Re-enable oom tests for mariner
Since we bumped to the 6.12.x LTS kernel, we've also adjusted the
aggressivity of the OOM test, which may be enough to allow us to
re-enable it for mariner.

Fixes: #8821

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-01-07 18:33:17 +01:00
Fabiano Fidêncio
f4a39e8c40
Merge pull request #10468 from fidencio/topic/early-tests-on-next-lts-kernel
versions: Move kernel to the latest 6.12 release (the current LTS)
2025-01-07 18:02:04 +01:00
Fupan Li
bd56891f84
Merge pull request #10702 from lifupan/fix_containerdname
CI: change the containerd tarball name from cri-containerd-cni to containerd
2025-01-07 18:56:15 +08:00
Fupan Li
b19db40343 CI: change the containerd tarball name to containerd
Since from https://github.com/containerd/containerd/pull/9096
containerd removed cri-containerd-*.tar.gz release bundles,
thus we'd better change the tarball name to "containerd".

BTW, the containerd tarball containerd the follow files:

bin/
bin/containerd-shim
bin/ctr
bin/containerd-shim-runc-v1
bin/containerd-stress
bin/containerd
bin/containerd-shim-runc-v2

thus we should untar containerd into /usr/local directory instead of "/"
to keep align with the cri-containerd.

In addition, there's no containerd.service file,runc binary and cni-plugin
included, thus we should add a specific containerd.service file and
install install the runc binary and cni-pluginspecifically.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-01-07 17:39:05 +08:00
Fabiano Fidêncio
9aea7456fb tests: k8s: Skip one of the empty-dir tests
An issue has been created for this, and we should fix the issue before
the next release.  However, for now, let's unblock the kernel bump and
have the test skipped.

Reference: https://github.com/kata-containers/kata-containers/issues/10706

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-01-06 21:48:20 +01:00
Fabiano Fidêncio
44ff602c64 tests: k8s: Be more aggressive to get OOM
Let's increase the amount of bytes allocated per VM worker, so we can
hit the OOM sooner.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2025-01-06 21:48:20 +01:00
Fabiano Fidêncio
f563f0d3fc versions: Update kernel to v6.12.8
There are lots of configs removed from latest kernel. Update them here
for convenience of next kernel upgrade.

Remove CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE [1]
Remove CONFIG_IP_NF_TARGET_CLUSTERIP [2]
Remove CONFIG_NET_SCH_CBQ [3]
Remove CONFIG_AUTOFS4_FS [4]
Remove CONFIG_EMBEDDED [5]
Remove CONFIG_ARCH_RANDOM & CONFIG_RANDOM_TRUST_CPU [6]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.6&id=a7e4676e8e2cb158a4d24123de778087955e1b36
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.6&id=9db5d918e2c07fa09fab18bc7addf3408da0c76f
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.6&id=051d442098421c28c7951625652f61b1e15c4bd5
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.6&id=1f2190d6b7112d22d3f8dfeca16a2f6a2f51444e
[5] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.6&id=ef815d2cba782e96b9aad9483523d474ed41c62a
[6] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.2&id=b9b01a5625b5a9e9d96d14d4a813a54e8a124f4b

Apart from the removals, CONFIG_CPU_MITIGATIONS is now a dependency for
CONFIG_RETPOLINE (which has been renamed to CONFIG_MITIGATION_RETPOLINE)
and CONFIG_PAGE_TABLE_ISOLATION (which has been renamed to
CONFIG_MITIGATION_PAGE_TABLE_ISOLATION).  I've added that to the
whitelist because we still build older versions of the kernel that
do not have that dependency.

Fixes: #8408
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2025-01-06 21:48:20 +01:00
Xuewei Niu
71b14d40f2
Merge pull request #10696 from teawater/kt
kata-ctl: direct-volume: Auto create KATA_DIRECT_VOLUME_ROOT_PATH
2025-01-02 14:04:37 +08:00
Hui Zhu
d15a7baedd kata-ctl: direct-volume: Auto create KATA_DIRECT_VOLUME_ROOT_PATH
Got following issue:
kata-ctl direct-volume add /kubelet/kata-direct-vol-002/directvol002
"{\"device\": \"/home/t4/teawater/coco/t.img\", \"volume-type\":
\"directvol\", \"fstype\": \"\", \"metadata\":"{}", \"options\": []}"
subsystem: kata-ctl_main
 Dec 30 09:43:41.150 ERRO Os {
    code: 2,
    kind: NotFound,
    message: "No such file or directory",
}
The reason is KATA_DIRECT_VOLUME_ROOT_PATH is not exist.

This commit create_dir_all KATA_DIRECT_VOLUME_ROOT_PATH before join_path
to handle this issue.

Fixes: #10695

Signed-off-by: Hui Zhu <teawater@antgroup.com>
2024-12-30 17:55:49 +08:00
Xuewei Niu
6400295940
Merge pull request #10683 from justxuewei/nxw/remove-mut 2024-12-29 00:49:38 +08:00
Fupan Li
2068801b80
Merge pull request #10626 from teawater/ma
Add mem-agent to kata
2024-12-24 14:11:36 +08:00
Steve Horsman
2322f6df94
Merge pull request #10686 from stevenhorsman/ppc64le-all-prepare-steps-timeout
workflows: Add more ppc64le timeouts
2024-12-20 19:08:48 +00:00
stevenhorsman
9b6fce9e96 workflows: Add more ppc64le timeouts
Unsurprisingly now we've got passed the containerd test
hangs on the ppc64le, we are hitting others  in the "Prepare the
self-hosted runner" stage, so add timeouts to all of them
to avoid CI blockages.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-12-20 17:31:24 +00:00
Steve Horsman
162e2af4f5
Merge pull request #10685 from stevenhorsman/ppc64le-containerd-test-timeout
workflows: Add timeout to some ppc64le steps
2024-12-20 16:55:40 +00:00
stevenhorsman
d9d8d53bea workflows: Add timeout to some ppc64le steps
In some runs e.g. https://github.com/kata-containers/kata-containers/actions/runs/12426384186/job/34697095588
and https://github.com/kata-containers/kata-containers/actions/runs/12422958889/job/34697016842
we've seen the Prepare the self-hosted runner
and Install dependencies steps get stuck for 5hours+.
If they are working then it should take a few minutes,
so let's add timeouts and not hold up whole the CI if they are stuck

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-12-20 16:37:36 +00:00
Steve Horsman
99f239bc44
Merge pull request #10380 from stevenhorsman/required-tests-guidance
doc: Add required jobs info
2024-12-20 16:24:42 +00:00
stevenhorsman
d1d4bc43a4 static-checks: Add words to dictionary
devmapper and snapshotters are being marked as spelling
errors, so add them to the kata dictionary

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-12-20 14:16:52 +00:00
stevenhorsman
7612839640 doc: Add required jobs info
Add information about what required jobs are and
our initial guidelines for how jobs are eligible for being
made required, or non-required

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-12-20 14:12:13 +00:00
Xuewei Niu
ecf98e4db8 runtime-rs: Remove unneeded mut from new_hypervisor()
`set_hypervisor_config()` and `set_passfd_listener_port()` acquire inner
lock, so that `mut` for `hypervisor` is unneeded.

Fixes: #10682

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2024-12-20 17:08:10 +08:00
Steve Horsman
2c6126d3ab
Merge pull request #10676 from stevenhorsman/fix-qemu-coco-dev-skip
tests: Fix qemu-coc-dev skip
2024-12-20 08:56:54 +00:00
Xuewei Niu
ea60613be9
Merge pull request #9387 from deagon/fix-broken-usage
packaging: fix the broken usage help
2024-12-20 15:20:37 +08:00