Commit Graph

16704 Commits

Author SHA1 Message Date
Hyounggyu Choi
1737777d28 Merge pull request #11743 from BbolroC/enable-ci-qemu-se-runtime-rs
runtime-rs: Enable s390x nightly test for IBM SEL
2025-09-10 15:00:16 +02:00
Alex Lyn
1d26d07110 Merge pull request #11781 from lifupan/fupan_main_qemu
runtime-rs: log out the qemu console when debug enabled
2025-09-10 16:59:30 +08:00
Hyounggyu Choi
1060a94b08 GHA: Add s390x nightly test for runtime-rs on IBM SEL
A new internal nightly test has been established for runtime-rs.
This commit adds a new entry `cc-se-e2e-tests-rs` to the existing
matrix and renames the existing entry `cc-se-e2e-tests` to
`cc-se-e2e-tests-go`.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2025-09-10 10:57:40 +02:00
Hyounggyu Choi
37764d18d4 tests: Skip k8s tests for qemu-se-runtime-rs
Tests skipped because tests for `qemu-se` are skipped:
- k8s-empty-dirs.bats
- k8s-inotify.bats
- k8s-shared-volume.bats

Tests skipped because tests for `qemu-runtime-rs` are skipped:

- k8s-block-volume.bats
- k8s-cpu-ns.bats
- k8s-number-cpus.bats

Let's skip the tests above to run the nightly test
for runtime-rs on IBM SEL.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2025-09-10 10:57:40 +02:00
Steve Horsman
e502fa2feb Merge pull request #11731 from kata-containers/dependabot/go_modules/src/tools/csi-kata-directvolume/github.com/ulikunitz/xz-0.5.14
build(deps): bump github.com/ulikunitz/xz from 0.5.11 to 0.5.14 in /src/tools/csi-kata-directvolume
2025-09-10 09:47:28 +01:00
Steve Horsman
3f25b88f89 Merge pull request #11737 from kata-containers/dependabot/cargo/src/runtime-rs/tracing-subscriber-0.3.20
build(deps): bump tracing-subscriber from 0.3.17 to 0.3.20 in /src/runtime-rs
2025-09-10 09:47:07 +01:00
Steve Horsman
22bc29cb4a Merge pull request #11746 from stevenhorsman/bump-tests-go-mod-yaml-3.0.1
versions: Bump gopkg.in/yaml.v3
2025-09-10 09:46:18 +01:00
RuoqingHe
106c6cea59 Merge pull request #11774 from RuoqingHe/2025-09-09-disable-make-test-libs-temporarily
ci: gatekeeper: Mark `make test libs` not required
2025-09-10 14:52:33 +08:00
Fupan Li
16be168062 runtime-rs: log out the qemu console when debug enabled
When hypervisor's debug enabled, log out the qemu's console
messages for kernel boot debugging.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-09-10 14:19:15 +08:00
Fupan Li
5715408d61 runtime-rs: add the console device to kernel boot for qemu
Add the console device to kernel boot, thus we can log
out the kernel's boot message for debug.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-09-10 14:10:45 +08:00
Ruoqing He
6a2d813196 ci: gatekeeper: Mark make test libs not required
There are still some issues to be address before we can mark `make test`
for `libs` as required. Mark this case as not required temporarily.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-09-10 03:52:20 +00:00
Xuewei Niu
c1ee0985ed Merge pull request #11770 from stevenhorsman/agent-ctl-bump-hypervisor
agent-ctl: version: bump hypervisor
2025-09-09 11:59:25 +08:00
Aurélien Bombo
ceab55a871 Merge pull request #11772 from kata-containers/sprt/zizmor-hash
ci: security: Fix "commit hash does not point to a Git tag"
2025-09-08 13:56:25 -05:00
Aurélien Bombo
b640fe5a6a Merge pull request #11756 from kata-containers/sprt/curl-logging
ci: cri-containerd-amd64: add logging for curl failures
2025-09-08 11:55:29 -05:00
Aurélien Bombo
c0030c271c ci: security: Fix "commit hash does not point to a Git tag"
This fixes all such issues, ie.:

https://github.com/kata-containers/kata-containers/security/code-scanning/459
https://github.com/kata-containers/kata-containers/security/code-scanning/508
https://github.com/kata-containers/kata-containers/security/code-scanning/510

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2025-09-08 11:17:54 -05:00
Aurélien Bombo
cbcc7af6f3 Merge pull request #11615 from kata-containers/sprt/zizmor-pedantic
security: gha: Run Zizmor in auditor mode
2025-09-08 10:28:19 -05:00
stevenhorsman
2d28f3d267 agent-ctl: version: bump hypervisor
Bump the version of runtime-rs' hypervisor crate
to upgrade (indirectly) protobug and remediate vulnerability
RUSTSEC-2024-0437

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-09-08 13:23:03 +01:00
dependabot[bot]
5ae34ab240 build(deps): bump github.com/ulikunitz/xz
Bumps [github.com/ulikunitz/xz](https://github.com/ulikunitz/xz) from 0.5.11 to 0.5.14.
- [Commits](https://github.com/ulikunitz/xz/compare/v0.5.11...v0.5.14)

---
updated-dependencies:
- dependency-name: github.com/ulikunitz/xz
  dependency-version: 0.5.14
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 11:30:49 +01:00
Alex Lyn
4644a02871 Merge pull request #11752 from Apokleos/fix-hooks-devcgrp
runtime-rs: Remove default value of Linux.Resources.Devices and correctly set Hooks in OCI Spec to meet with Agent Policy requirements
2025-09-07 18:01:02 +08:00
stevenhorsman
66dc24566f versions: Bump gopkg.in/yaml.v3
Bump gopkg.in/yaml.v3 from 3.0.0 to 3.0.1 to remediate
CVE-2022-28948

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-09-05 16:36:48 +01:00
Aurélien Bombo
c480737ebd ci: cri-containerd-amd64: add logging for curl failures
This is to investigate #11755.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2025-09-05 10:35:45 -05:00
Aurélien Bombo
efbc69a2ec Merge pull request #11760 from kata-containers/sprt/oidc-fix
ci: aks: Refresh OIDC token in case access token expired
2025-09-05 10:29:35 -05:00
Dan Mihai
1f68f15995 Merge pull request #11759 from microsoft/danmihai1/policy-storages
genpolicy: print Input and Policy storages
2025-09-04 15:07:45 -07:00
Aurélien Bombo
f39517a18a ci: aks: Refresh OIDC token in case access token expired
It's possible that tests take a long time to run and hence that the access
token expires before we delete the cluster. In this case `az cli` will try
to refresh the access token using the OIDC token (which will have
definitely also expired because its lifetime is ~5 minutes).

To address this we refresh the OIDC token manually instead. Automatic
refresh isn't supported per Azure/azure-cli#28708.

Fixes: #11758

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2025-09-04 12:44:02 -05:00
Dan Mihai
9b0b7fc795 genpolicy: print Input and Policy storages
Print the Storage data structures, to help with debugging.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-09-04 16:03:03 +00:00
Cameron Baird
bdd98ec623 ci: Add test case for iptables, exercised via istio init container
Introduce new test case in k8s-iptables.bats which verifies that
workloads can configure iptables in the UVM.

Users discovered that they weren't able to do this for common usecases
such as istio. Proper support for this should be built into UVM
kernels. This test ensures that current and future kernel
configurations don't regress this functionality.

Signed-off-by: Cameron Baird <cameronbaird@microsoft.com>
2025-09-04 07:18:45 +02:00
Cameron Baird
d16026f7b9 kernel: add required configs for ip6tables support
Currently, the UVM kernel fails for istio deployments (at least with the
version we tested, 1.27.0). This is because the istio sidecar container
uses ip6tables and the required kernel configs are not built-in:

```
iptables binary ip6tables has no loaded kernel support and cannot be used, err: exit status 3 out: ip6tables v1.8.10 (legacy):
can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
```

Signed-off-by: Cameron Baird <cameronbaird@microsoft.com>
2025-09-04 07:18:45 +02:00
Aurélien Bombo
1dcc67c241 security: gha: Use Zizomor's auditor mode
This is the strictest possible setting for Zizmor.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2025-09-03 12:30:09 -05:00
Hyounggyu Choi
49ca96561b Merge pull request #11750 from BbolroC/use-pattern-working-for-both-runtimes
tests: Use "Failed" consistently for both runtimes
2025-09-03 13:06:05 +02:00
Alex Lyn
e235fc1efb runtime-rs: Remove default value of Linux.Resources.Devices in OCI Spec
In certain scenarios, particularly under CoCo/Agent Policy enforcement,
the default initial value of `Linux.Resources.Devices` is considered
non-compliant, leading to container creation failures. To address this
issue and ensure consistency with the behavior in `runtime-go`, this
commit removes the default value of `Linux.Resources.Devices` from the
OCI Spec.

This cleanup ensures that the OCI Spec aligns with runtime expectations
and prevents policy violations during container creation.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2025-09-03 18:42:34 +08:00
Alex Lyn
203f7090a6 runtime-rs: Ensure the setting of hooks when OCI Hooks is existing.
Only the StartContainer hook needs to be reserved for execution in the
guest, but we also make sure that the setting happens only when the OCI
Hooks does exist, otherwise we do nothing.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2025-09-03 17:38:40 +08:00
Hyounggyu Choi
6d6202bbe3 tests: Use "Failed" consistently for both runtimes
In k8s-guest-pull-image.bats, `failed to pull image` is
not caught by assert_logs_contain() for runtime-rs.
To ensure consistency, this commit changes `failed` to
`Failed`, which works for both runtimes.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2025-09-03 09:09:13 +02:00
Hyounggyu Choi
150c90e32a Merge pull request #11728 from BbolroC/fix-sealed-secret-volume
runtime-rs: Adjust path for sealed secret mount check
2025-09-02 16:57:33 +02:00
Fupan Li
9cc1c76ade Merge pull request #11729 from kata-containers/dependabot/go_modules/src/tools/log-parser/gopkg.in/yaml.v3-3.0.1
build(deps): bump gopkg.in/yaml.v3 from 3.0.0 to 3.0.1 in /src/tools/log-parser
2025-09-02 17:05:51 +08:00
dependabot[bot]
8330dd059f build(deps): bump tracing-subscriber in /src/runtime-rs
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.17 to 0.3.20.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.17...tracing-subscriber-0.3.20)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-version: 0.3.20
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-29 20:44:35 +00:00
Xuewei Niu
f6ff9cf717 Merge pull request #11689 from Caspian443/fix-devmapper-selinux-mount-issue
runtime-rs: Empty block-rootfs Storage.options and align with Go runtime
2025-08-29 15:29:46 +08:00
Aurélien Bombo
754f07cff2 Merge pull request #11614 from kata-containers/workflow-permissions-tightening
Workflow permissions tightening
2025-08-28 10:56:03 -05:00
dependabot[bot]
3a0416c99f build(deps): bump gopkg.in/yaml.v3 in /src/tools/log-parser
Bumps gopkg.in/yaml.v3 from 3.0.0 to 3.0.1.

---
updated-dependencies:
- dependency-name: gopkg.in/yaml.v3
  dependency-version: 3.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-28 14:03:22 +00:00
Hyounggyu Choi
65fdb18c96 runtime-rs: Adjust path for sealed secret mount check
Mount validation for sealed secret requires the base path to start with
`/run/kata-containers/shared/containers`. Previously, it used
`/run/kata-containers/sandbox/passthrough`, which caused test
failures where volume mounts are used.

This commit renames the path to satisfy the validation check.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2025-08-28 15:38:07 +02:00
Fabiano Fidêncio
08d2ba1969 cgroups: Fix "." parent cgroup special case
ef642fe890 added a special case to avoid
moving cgroups that are on the "default" slice in case of deletion.

However, this special check should be done in the Parent() method
instead, which ensures that the default resource controller ID is
returned, instead of ".".

Fixes: #11599

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-08-27 08:15:15 +02:00
Caspian443
617af4cb3b runtime-rs: Empty block-rootfs Storage.options and align with Go runtime
- Set guest Storage.options for block rootfs to empty (do not propagate host mount options).
- Align behavior with Go runtime: only add xfs nouuid when needed.

Signed-off-by: Caspian443 <scrisis843@gmail.com>
2025-08-26 01:27:21 +00:00
Caspian443
9a7aadaaca libs: Introduce rootfs fs types
- Add new kata-types::fs module with:
  - VM_ROOTFS_FILESYSTEM_EXT4
  - VM_ROOTFS_FILESYSTEM_XFS
  - VM_ROOTFS_FILESYSTEM_EROFS
- Export fs module in src/libs/kata-types/src/lib.rs
- Remove duplicated filesystem constants from src/runtime-rs/crates/hypervisor/src/lib.rs
- Update src/runtime-rs/crates/hypervisor/src/kernel_param.rs (and tests) to import from kata_types::fs

Signed-off-by: Caspian443 <scrisis843@gmail.com>
2025-08-26 01:26:53 +00:00
Fabiano Fidêncio
63f6dcdeb9 kata-manager: Support xz and zst suffixes for the kata tarball
We moved to `.zst`, but users still use the upstream kata-manager to
download older versions of the project, thus we need to support both
suffixes.

Fixes: #11714

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-08-25 21:15:06 +02:00
Fupan Li
687d0bf94a Merge pull request #11715 from fidencio/topic/backport-qemu-reclaim-guest-freed-memory
runtime: qemu: Add reclaim_guest_freed_memory [BACKPORT]
2025-08-25 16:59:29 +08:00
Fabiano Fidêncio
fd1b8ceed1 runtime: qemu: Add reclaim_guest_freed_memory [BACKPORT]
Similar to what we've done for Cloud Hypervisor in the commit
9f76467cb7, we're backporting a runtime-rs
feature that would be benificial to have as part of the go runtime.

This allows users to use virito-balloon for the hypervisor to reclaim
memory freed by the guest.

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-08-22 23:56:47 +02:00
stevenhorsman
b4545da15d workflows: Set top-level permissions to empty
The default suggestion for top-level permissions was
`contents: read`, but scorecard notes anything other than empty,
so try updating it and see if there are any issues. I think it's
only needed if we run workflows from other repos.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-08-22 14:13:21 +01:00
stevenhorsman
f79e453313 workflows: Tighten up workflow permissions
Since the previous tightening a few workflow updates have
gone in and the zizmor job isn't flagging them as issues,
so address this to remove potential attack vectors

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-08-22 14:13:21 +01:00
Fabiano Fidêncio
e396a460bc Revert "local-build: Enforce USE_CACHE=no"
This reverts commit cb5f143b1b, as the
cached packages have been regenerated after the switch to using zstd.

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-08-22 14:03:36 +02:00
Steve Horsman
23d2dfaedc Merge pull request #11707 from fidencio/topic/switch-to-use-zstd-when-possible
kata-deploy: local-build: Use zstd instead of xz
2025-08-22 10:06:00 +01:00
stevenhorsman
8cbb1a4357 runtime: Fix non constant Errorf formatting
As part of the go 1.24.6 bump there are errors about the incorrect
use of a errorf, so switch to the non-formatting version, or add
the format string as appropriate

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-08-22 10:44:15 +02:00