Commit Graph

16112 Commits

Author SHA1 Message Date
Shunsuke Kimura
7177ab3827 runtime: execute using abs path
Fixes: #11123

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-05-06 21:17:06 +09:00
Shunsuke Kimura
ddccbd4764 runtime: Add Path for kata-deploy
When installing with kata-deploy,
usually `/opt/kata/bin` is not in the PATH.
Therefore, it will fail to execute.
so add it to the PATH.

Fixes: #11122

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
Co-authored-by: Jakob Naucke <jakob.naucke@ibm.com>
2025-05-06 21:17:06 +09:00
Shunsuke Kimura
5c156a24e8 kata-debug: Make path resolution more robust
Enabled to run from other scripts as source, etc.

Fixes: #11115

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-05-06 21:16:25 +09:00
stevenhorsman
6030a64f0c build(deps): bump tokio to 1.44.2
Bumps [tokio](https://github.com/tokio-rs/tokio) from to 1.44.2
in all components to resolve the security vuln throughout our repo

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-05-06 11:38:52 +01:00
RuoqingHe
89685c0cd0
Merge pull request #11225 from kata-containers/dependabot/cargo/src/dragonball/openssl-0.10.72
build(deps): bump openssl from 0.10.57 to 0.10.72
2025-05-06 18:27:45 +08:00
Fabiano Fidêncio
fb5f3eae3b
Merge pull request #11172 from ChengyuZhu6/erofs
EROFS Snapshotter Support in Kata
2025-05-06 11:14:19 +02:00
Ruoqing He
384d335419 ci: Enable build-check for agent on riscv64
Enable build-check for `agent` component for riscv64 platforms.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-05-06 01:48:37 +00:00
Ruoqing He
7f9b2c0af1 ci: Enable install_libseccomp.sh for riscv64
`musl` target is not yet available for riscv64 as of 1.80.0 rust
toolchain, set `FORTIFY_SOURCE` to 1 on riscv64 platforms.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-05-06 01:48:37 +00:00
Nikos Ch. Papadopoulos
0f2c0d38f5 agent: Create pci_root_bus_path for riscv64
`create_pci_root_bus_path` needs to be enabled on riscv64 for agent to
compile and work on those platforms.

Signed-off-by: Nikos Ch. Papadopoulos <ncpapad@cslab.ece.ntua.gr>
2025-05-06 01:48:37 +00:00
Fupan Li
29f9015caf runtime-rs: rm the obsoleted ephemeral volume processing
Since the ephemeral volume already has a separate volume type for
processing, the processing in the virtiofs share volume can be deleted.
Moreover, it is not appropriate to process the ephemeral in the share
fs.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-05-06 09:45:35 +08:00
Fupan Li
6e5f3cbbeb runtime-rs: add the ephemeral memory based volume support
For k8s, there's two type of volumes based on ephemral memory,
one is emptydir volume based on ephemeral memory, and the other
one is used for shm device such as /dev/shm. Thus add a new volume
type ephemeral volume to support those two type volumes and remove
the legacy shm volume.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-05-06 09:45:24 +08:00
ChengyuZhu6
d07b279bf1 agent:storage: Add directory creation support
Implementing directory creation logic in the OverlayfsHandler to process
driver options with the KATA_VOLUME_OVERLAYFS_CREATE_DIR prefix

Signed-off-by: ChengyuZhu6 <hudson@cyzhu.com>
2025-05-05 23:51:44 +02:00
ChengyuZhu6
f63ec50ba3 runtime: Add EROFS snapshotter with block device support
- Detection of EROFS options in container rootfs
- Creation of necessary EROFS devices
- Sharing of rootfs with EROFS via overlayfs

Fixes: #11163

Signed-off-by: ChengyuZhu6 <hudson@cyzhu.com>
2025-05-05 23:51:13 +02:00
Archana Choudhary
fb815b77c1 genpolicy: add test for volumeMounts
This patch:
- adds a count check on mounts
- adds various test scenarios for mounts with emptyDir volume source

Signed-off-by: Archana Choudhary <archana1@microsoft.com>
2025-05-05 15:17:50 +00:00
RuoqingHe
1cb34c4d0a
Merge pull request #11202 from RuoqingHe/2025-04-28-upgrade-rtnetlink
runtime-rs: Upgrade `rust-netlink` crates
2025-05-05 21:35:45 +08:00
Fupan Li
492329fc02 runtime: add the mtu support for updating routes
Some cni plugins will set the MTU of some routes, such as cilium will
modify the MTU of the default route. If the mtu of the route is not set
correctly, it may cause excessive fragmentation or even packet loss of
network packets. Therefore, this PR adds the setting of the MTU of the
route. First, when obtaining the route, if the MTU is set, the MTU will
also be obtained and set to the route in the guest.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-05-04 23:12:57 +02:00
Ruoqing He
2d0f32ff96 runtime-rs: Upgrade crates from rust-netlink
Bump `netlink-sys` to v0.8, `netlink-packet-route` to v0.22 and
`rtnetlink` to v0.16 to reach a consistent state of `rust-netlink`
dependencies.

`bitflags` is bumped to v2.9.0 since those crates requires it.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-05-03 02:31:02 +00:00
Ruoqing He
09700478eb runtime-rs: Group Dependencies from rust-netlink
`rtnetlink`, `netlink-sys` and `netlink-packet-route` are from the same
organization, and some of them are depending on the others, which
implies the version of those crates should be chosen and dealt with
carefully, group them to provide better management.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-05-03 02:29:43 +00:00
Fabiano Fidêncio
fbf7faa9f4
Merge pull request #11227 from fidencio/topic/agent-only-try-ipv6-if-stack-is-supported
agent: netlink: Only add an ipv6 address if ipv6 is enabled
2025-05-02 12:31:40 +02:00
Xuewei Niu
a9b3c6a5a5
Merge pull request #11209 from lifupan/fix_slog
shimv2: fix the issue logger write failed
2025-05-02 17:25:44 +08:00
Fabiano Fidêncio
79ad68cce5
Merge pull request #11230 from kimullaa/remove-wrong-qemu-option
runtime: remove wrong qemu-system-x86_64 option
2025-05-02 11:18:45 +02:00
stevenhorsman
21498d401f build(deps): bump openssl from to 0.10.72
Bumps [openssl](https://github.com/sfackler/rust-openssl) to 0.10.72.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.72
  dependency-type: indirect
...

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-05-02 09:36:50 +01:00
Fabiano Fidêncio
4ce00ea434 agent: netlink: Only add an ipv6 address if ipv6 is enabled
When running Kata Containers on CSPs, the CSPs may enforce their
clusters to be IPv4-only.

Checking the OCI spec passed down to container, on a GKE cluster, we can
see:
```
    "sysctl": {
      ...
      "net.ipv6.conf.all.disable_ipv6": "1",
      "net.ipv6.conf.default.disable_ipv6": "1",
      ...
    },
```

Even with ipv6 being explicitly disabled (behind our back ;-)), we've
noticed that IPv6 addresses would be received, but then as IPv6 was
disabled we'd break on CreatePodSandbox with the following error:
```
Warning  FailedCreatePodSandBox  4s    kubelet            Failed to
create pod sandbox: rpc error: code = Unknown desc = failed to create
containerd task: failed to create shim task: "update interface: Failed
to add address fe80::c44c:1cff:fe84:f6b7: NetlinkError(ErrorMessage {
code: Some(-13), header: [64, 0, 0, 0, 20, 0, 5, 5, 19, 0, 0, 0, 0, 0,
0, 0, 10, 64, 0, 0, 2, 0, 0, 0, 20, 0, 1, 0, 254, 128, 0, 0, 0, 0, 0, 0,
196, 76, 28, 255, 254, 132, 246, 183, 20, 0, 2, 0, 254, 128, 0, 0, 0, 0,
0, 0, 196, 76, 28, 255, 254, 132, 246, 183] })\n\nStack backtrace:\n
0: <unknown>\n   1: <unknown>\n   2: <unknown>\n   3: <unknown>\n   4:
<unknown>\n   5: <unknown>\n   6: <unknown>\n   7: <unknown>\n   8:
<unknown>\n   9: <unknown>\n  10: <unknown>": unknown
```

A huge shoutout to Fupan Li for helping with the debug on this one!

Fixes: #11200

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-05-02 09:10:45 +02:00
Shunsuke Kimura
3dba8ddd98 runtime: remove wrong qemu-system-x86_64 option
qemu-system-x86_64 does not support "-machine virt".
(this is only supported by arm,aarch64)
<https://people.redhat.com/~cohuck/2022/01/05/qemu-machine-types.html>

Fixes: #11229

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-05-02 04:37:12 +09:00
Fabiano Fidêncio
7e404dd13f
Merge pull request #11228 from zvonkok/fix-kernel-modules-build
gpu: Set the ARCH explicilty for driver builds
2025-05-01 21:07:20 +02:00
Zvonko Kaiser
445cad7754 gpu: Set the ARCH explicilty for driver builds
Kernel Makefiles changed how to deduce the right arch
lets set it explicilty to enable arm and amd builds.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2025-05-01 17:13:20 +00:00
RuoqingHe
049a4ef3a8
Merge pull request #11146 from RuoqingHe/2025-04-14-dragonball-centralize-dbs
dragonball: Put local dependencies into workspace
2025-05-01 22:06:51 +08:00
RuoqingHe
bd1071aff8
Merge pull request #11174 from kata-containers/dependabot/cargo/src/mem-agent/crossbeam-channel-0.5.15
build(deps): bump crossbeam-channel from 0.5.13 to 0.5.15 in /src/mem-agent
2025-05-01 16:53:42 +08:00
Ruoqing He
61f2b6a733 dragonball: Put local dependencies into workspace
Put local dependencies (mostly `dbs` crates) into workspace to avoid
complex path dependencies all over the workspace. Simplify path
dependency referencing.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-05-01 08:40:22 +00:00
RuoqingHe
33c69fc8bf
Merge pull request #11204 from stevenhorsman/go-security-bump-april-25
versions: Bump golang.org/x/net
2025-05-01 16:36:24 +08:00
Fabiano Fidêncio
bc66d75fe9
Merge pull request #11217 from stevenhorsman/runtime-rs-centralise-workspace-config
Runtime rs centralise workspace config
2025-05-01 10:36:07 +02:00
Fupan Li
9924fbbc70 shimv2: fix the issue logger write failed
It's better to open the log pipe file with read & write option,
otherwise, once the containerd reboot and closed the read
endpoint, kata shim would write the log pipe with broken pipe error.

Fixes: #11207

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2025-05-01 16:15:18 +08:00
Fabiano Fidêncio
3dfabd42c2
Merge pull request #11206 from kimullaa/fix-xfs-rootfs-type
runtime: remove wrong xfs options
2025-05-01 09:05:17 +02:00
Fabiano Fidêncio
a2fbc598b8
Merge pull request #11223 from microsoft/cameronbaird/revert-aks-extension-pin
ci: revert temp: ci: Fix AKS cluster creation
2025-05-01 08:33:12 +02:00
Shunsuke Kimura
62639c861e runtime: remove wrong xfs options
"data=ordered" and "errors=remount-ro" are wrong options in xfs.
(they are ext4 options)
<https://manpages.ubuntu.com/manpages/focal/man5/xfs.5.html>

Fixes: #11205

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-05-01 07:56:39 +09:00
Cameron Baird
6e21d14334 Revert "temp: ci: Fix AKS cluster creation"
This reverts commit 1de466fe84.

The latest release of the az aks extension fixes the issue https://github.com/Azure/azure-cli-extensions/blob/main/src/aks-preview/HISTORY.rst#1400b5

Signed-off-by: Cameron Baird <cameronbaird@microsoft.com>
2025-04-30 21:24:42 +00:00
stevenhorsman
a126884953 runtime-rs: Share workspace config
Update the runtime-rs workspace packages to
use workspace package versions where applicable
to centralise the config and reduce maintenance
when updating these

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-30 19:40:47 +01:00
stevenhorsman
f8fcd032ef workflow: Set RUST_LIB_BACKTRACE=0
As discussed in #9538, with anyhow >=1.0.77 we have test failures due to backtrace behaviour
changing, so set RUST_LIB_BACKTRACE=0,
so that we only have backtrace on panics

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-30 19:38:13 +01:00
stevenhorsman
ffbaa793a3 versions: Update crossbeam-channel
Update all crossbeam-channel for all non-agent
packages (it was done separately in #11175)
to 0.5.15 to get them on latest version and remove
the versions with a vulnerability

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-30 19:36:40 +01:00
Steve Horsman
b97bc03ecb
Merge pull request #11211 from stevenhorsman/dragonball-lockfiles
dragonball: Remove package lockfiles
2025-04-30 19:34:58 +01:00
stevenhorsman
f910c7535a ci: Workaround cargo deny issue
When a PR has no new files the cargo deny runner fails with:
```
[cargo-deny-generator.sh:17] ERROR: changed_files_status=
```
so add `|| true` to try and help this

Co-authored-by: Ruoqing He <heruoqing@iscas.ac.cn>
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-30 16:27:25 +01:00
stevenhorsman
f2a2117252 tests: k8s: Retry output of kubectl exec in k8s-cpu-ns
We are seeing failures in this test, where the output of
the kubectl exec command seems to be blank, so try
retrying the exec like #11024

Fixes: #11133
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-30 15:01:08 +01:00
stevenhorsman
97f7d49e8e dragonball: Remove package lockfiles
Since #10780 the dbs crates are managed as members
of the dragonball workspace, so we can remove the lockfile
as it's now workspace managed now

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-04-30 09:14:07 +01:00
Steve Horsman
8045cb982c
Merge pull request #11208 from kata-containers/dependabot/cargo/src/runtime-rs/tokio-1.38.2
build(deps): bump tokio from 1.38.0 to 1.38.2 in /src/runtime-rs
2025-04-30 08:44:51 +01:00
Aurélien Bombo
46af7cf817
Merge pull request #11077 from microsoft/cameronbaird/address-gid-mismatch
genpolicy: Align GID behavior with CRI and enable GID policy checks.
2025-04-29 22:23:23 +01:00
Aurélien Bombo
19371e2d3b
Merge pull request #11164 from wainersm/fix_kbs_on_aks
tests/k8s: fix kbs installation on Azure AKS
2025-04-29 18:25:14 +01:00
Steve Horsman
6c1fafb651
Merge pull request #11210 from kata-containers/dependabot/cargo/src/tools/runk/tokio-1.44.2
build(deps): bump tokio from 1.38.0 to 1.44.2 in /src/tools/runk
2025-04-29 16:43:58 +01:00
Steve Horsman
3c8cc0cdbf
Merge pull request #11212 from BbolroC/add-cc-vfio-ap-test-s390x
GHA: Add VFIO-AP to s390x nightly tests for CoCo
2025-04-29 16:15:00 +01:00
Steve Horsman
a6d1dc7df3
Merge pull request #10940 from ldoktor/peer-pods
ci.ocp: Add peer-pods setup script
2025-04-29 15:57:30 +01:00
Hyounggyu Choi
63b9ae3ed0 GHA: Add VFIO-AP to s390x nightly tests for CoCo
As #11076 introduces VFIO-AP bind/associate funtions for IBM Secure
Execution (SEL), a new internal nightly test has been established.
This PR adds a new entry `cc-vfio-ap-e2e-tests` to the existing matrix
to share the test result.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2025-04-29 16:06:12 +02:00