Commit Graph

17882 Commits

Author SHA1 Message Date
Manuel Huber
ed7de905b5 build: Tighten upstream download path for ORAS
The gperf-3.3 tarball frequently fails to download on my end with
cryptic error messages such as: "tar: This does not look like a tar
archive". This change tightens the download logic a bit: We fail at
the point in time when we're supposed to fail. This way we detect
rate limiting issues right away, and this way, the actual hashsum
and signature checks are effective, not only printouts.

This change also updates the key reference and allows for an array,
for instance, when a different signer was used for a cache vs
upstream version.
The change also makes it clear, that signature verification is only
implemented for the gperf tarball. Improvements can be made in a
subsequent change.

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
2026-02-12 19:20:35 +01:00
Fabiano Fidêncio
9fc5be47d0 kata-deploy: fix custom runtime config path for runtime-rs shims
Custom runtimes whose base config lives under runtime-rs/ (e.g. dragonball,
cloud-hypervisor) were not found because the path was always built under
share/defaults/kata-containers/. Use get_kata_containers_original_config_path
for the handler so rust shim configs are read from .../runtime-rs/.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-12 18:08:47 +01:00
Fabiano Fidêncio
50923b6d62 kata-deploy: run cleanup on uninstall via DaemonSet preStop
On helm uninstall let's rely on a preStop hook to run kata-deploy
cleanup so each pod cleans its node before exiting.

We **must** keep RBAC (resource-policy: keep) so pods retain API access
during termination, and then can properly delete the NodeFeatureRules
and remove the labels from the nodes.

The post-delete hook Job, which runs on a single node, now is only
responsible for cleaning the kept RBAC (cluster-wide resource) after
uninstall, not leaving any resource or artefact behind.

The changes on this commit lead to a "resouerces were kept" message when
running `helm uninstall`, which document as being normal, as the
post-delete job will remove those.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-11 22:05:10 +01:00
Fabiano Fidêncio
6e0cbc28a3 kata-deploy: fix node label removal
When removing a node label, JSON merge patch semantics require setting
the key to null; omitting the key leaves it unchanged.

Fix label_node to send a patch with the label key set to null so the API
server actually removes katacontainers.io/kata-runtime.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-11 22:05:10 +01:00
Fabiano Fidêncio
510d2a69ae kata-deploy: exit with 0 on SIGTERM in install mode
Wait for SIGTERM after install and exit(0) so the container terminates
cleanly. If registering the SIGTERM handler fails, log a warning and
sleep forever instead of exiting with an error (fallback to the old
behaviour).

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-11 22:05:10 +01:00
Mikko Ylinen
25962e9325 tests/coco: disable k8s-sandbox-vcpus-allocation.bats for TDX
After the move to Linux 6.17 and QEMU 10.2 from Kata,
k8s-sandbox-vcpus-allocation.bats started failing on TDX.

2026-02-10T16:39:39.1305813Z # pod/vcpus-less-than-one-with-no-limits created
2026-02-10T16:39:39.1306474Z # pod/vcpus-less-than-one-with-limits created
2026-02-10T16:39:39.1307090Z # pod/vcpus-more-than-one-with-limits created
2026-02-10T16:39:39.1307672Z # pod/vcpus-less-than-one-with-limits condition met
2026-02-10T16:39:39.1308373Z # timed out waiting for the condition on pods/vcpus-less-than-one-with-no-limits
2026-02-10T16:39:39.1309132Z # timed out waiting for the condition on pods/vcpus-more-than-one-with-limits
2026-02-10T16:39:39.1310370Z # Error from server (BadRequest): container "vcpus-less-than-one-with-no-limits" in pod "vcpus-less-than-one-with-no-limits" is waiting to start: ContainerCreating

A manual test without agent policies added it seems to work OK but disable
the test for now to get CI stable.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2026-02-11 22:02:59 +01:00
stevenhorsman
006a5d5141 versions: Tidy up versions file
- We don't use containerd.latest as the comment on it suggests
- We also don't have any references to `sriov-network-device`
so remove that and the plugins section.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-11 20:49:53 +01:00
Dan Mihai
9d763e9d5a Merge pull request #12439 from sespiros/genpolicy-suppress-yaml-stdout
genpolicy: suppress YAML output when --{base64/raw}-out are used
2026-02-11 10:27:01 -08:00
Spyros Seimenis
282bfc9f14 genpolicy: suppress YAML output when --{base64/raw}-out are used
this will suppress yaml output only if the input is passed via
stdin. If {base64/raw}-out is passed in alongside a yaml file, the
encoded annotation or the policy data respectively will be printed
to stdout as before.

Fixes #12438

Signed-off-by: Spyros Seimenis <sse@edgeless.systems>
2026-02-11 14:08:30 +02:00
Hyounggyu Choi
c84e37f6ac Merge pull request #12486 from BbolroC/cpu-hotplug-s390x-runtime-rs
runtime-rs: Skip sockets and threads for hotplug_vcpus on Z/P
2026-02-11 09:40:21 +01:00
Hyounggyu Choi
67f54bdcb5 tests: Remove skip condition for runtime-rs on s390x in k8s-cpu-ns
This commit removes the skip condition for qemu-runtime-rs on s390x
in k8s-cpu-ns.bats.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2026-02-11 05:52:13 +01:00
Hyounggyu Choi
eab77a26ab runtime-rs: Skip sockets and threads for hotplug_vcpus on Z/P
As s390x and ppc64 use a flat CPU topology without sockets and threads,
this commit skips the socket_id and thread_id properties for vCPU hotplug
on these architectures instead of aborting the operation.
This is the change in line with those from the Go runtime:
- isSocketIDSupported()
- isThreadIDSupported()

Fixes: #12155

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2026-02-11 05:52:13 +01:00
Alex Lyn
c53910eb1b Merge pull request #12408 from Apokleos/netdev-multiq
runtime-rs: Add support configurable network_queues via configuration and annotation
2026-02-11 09:34:58 +08:00
stevenhorsman
a115d6d858 ci: Add copyright and license to shellcheckrc
Make the static-checks happy

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-10 21:58:28 +01:00
stevenhorsman
15d6a681ed doc: Fix spelling issues
Put things in backticks

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-10 21:58:28 +01:00
stevenhorsman
e84d234721 doc: Update broken/slow URLs
Update the URLs to better/existing links

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-10 21:58:28 +01:00
Fabiano Fidêncio
5c0269881e tests: Make editorconfig-checker happy
- Trim trailing whitespace and ensure final newline in non-vendor files
- Add .editorconfig-checker.json excluding vendor dirs, *.patch, *.img,
  *.dtb, *.drawio, *.svg, and pkg/cloud-hypervisor/client so CI only
  checks project code
- Leave generated and binary assets unchanged (excluded from checker)

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 21:58:28 +01:00
Fabiano Fidêncio
34199b09eb runtime-rs: Properly parse containerd runtime options to extract ConfigPath
The runtime-rs shim was failing to load its configuration when deployed
via kata-deploy because it couldn't correctly parse the ConfigPath passed
by containerd. The previous implementation naively skipped the first 2
bytes of the options and interpreted the rest as a UTF-8 string, which
doesn't work since containerd passes a properly serialized protobuf
message of type runtimeoptions.v1.Options.

This change adds the runtimeoptions.proto definition to the protocols
crate and updates the load_config function to correctly deserialize the
protobuf message and extract the config_path field, matching how the Go
runtime handles this via typeurl.UnmarshalAny.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
cb652e0da1 tests: Update NVRC trace to use drop-in config mechanism
Update the enable_nvrc_trace() function to use the new drop-in
configuration mechanism instead of directly modifying the base
configuration file. The function now creates a 90-nvrc-trace.toml
drop-in file that properly combines existing kernel parameters
with the nvrc.log=trace setting.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
4cb2aea9dd kata-deploy: Document drop-in configuration and add warning to config files
When kata-deploy installs Kata Containers, the base configuration files
should not be modified directly. This change adds documentation explaining
how to use drop-in configuration files for customization, and prepends a
warning comment to all deployed configuration files reminding users to use
drop-in files instead.

The warning is added to both standard shim configurations and custom
runtime configurations. It includes a brief explanation of how drop-in
files work and points users to the documentation for more details.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
d5d561abe5 kata-deploy: Add detailed logging for drop-in configuration
Add clear INFO-level messages when creating drop-in configuration
files, making it easy to understand what kata-deploy is doing during
installation:

- "Setting up runtime directory for shim: X"
- "Generating drop-in configuration files for shim: X"
- "Created drop-in file: <path>"

When DEBUG mode is enabled (via DEBUG=true environment variable),
also log the full content of each drop-in file to aid troubleshooting.

The log level is now automatically set to Debug when the DEBUG
environment variable is set, ensuring debug messages are visible.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
eddd1b507e kata-deploy: Extract common drop-in generation into shared helper
Deduplicate the drop-in file generation logic between configure_shim_config
and install_custom_runtime_configs by extracting it into a shared
write_common_drop_ins helper function.

This ensures both standard and custom runtimes use the same code path
for generating drop-in configuration files.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
577aa6b319 kata-deploy: Propagate drop-in configs to custom runtime classes
Ensure custom runtime classes receive the same drop-in configuration
files as standard runtimes:
- 10-installation-prefix.toml (if custom dest_dir)
- 20-debug.toml (if debug enabled)
- 30-kernel-params.toml (proxy + debug kernel params)

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
8c60a88bda kata-deploy: Add combined kernel_params drop-in
Add a combined drop-in file (30-kernel-params.toml) that handles all
kernel_params modifications. This approach reads the base kernel_params
from the original untouched config file and combines them with:
- Proxy settings (agent.https_proxy, agent.no_proxy)
- Debug settings (agent.log=debug, initcall_debug)

Using a single drop-in file for kernel_params avoids the TOML merge
behavior where scalar values are replaced rather than appended.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
fae96f1f82 kata-deploy: Add drop-in file for debug configuration
When debug mode is enabled, generate a drop-in configuration file
(20-debug.toml) with the boolean debug flags for hypervisor, runtime,
and agent sections.

Note: kernel_params for debug (agent.log=debug, initcall_debug) will
be handled by a separate combined kernel_params drop-in file to avoid
the TOML merge replacement behavior.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
bb65e516e5 kata-deploy: Add drop-in file for installation prefix
When the installation prefix differs from the default /opt/kata,
generate a drop-in configuration file (10-installation-prefix.toml)
with the adjusted paths instead of modifying the original config file.

This removes the need for adjust_installation_prefix and
adjust_qemu_cmdline functions which are now deleted along with
their tests.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Fabiano Fidêncio
cd76d61a3d kata-deploy: Add infrastructure for per-shim drop-in configuration
Instead of modifying original config files directly, set up a per-shim
directory structure that uses symlinks to the original configs and
config.d/ directories for drop-in overrides.

This enables cleaner configuration management where the original files
remain untouched and all kata-deploy customizations are in separate
drop-in files that can be easily inspected and removed.

Directory structure:
  {config_path}/runtimes/{shim}/
  {config_path}/runtimes/{shim}/configuration-{shim}.toml -> symlink
  {config_path}/runtimes/{shim}/config.d/

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00
Paul Meyer
c5ad3f9b26 Merge pull request #12472 from katexochen/p/disable-nvdimm-cc
runtime: disable nvdimm for confidential guest
2026-02-10 14:54:40 +01:00
Steve Horsman
44c86f881b Merge pull request #12466 from ldoktor/gk-pagination
tools.gatekeeper: Add support to paginate workflows
2026-02-10 11:59:57 +00:00
Steve Horsman
a8debc9841 Merge pull request #12476 from stevenhorsman/bump-rust-to-1.91
versions: Bump rust to 1.91
2026-02-10 10:03:01 +00:00
Paul Meyer
76525b97a6 runtime-rs: disable nvdimm for confidential guest
nvdimm isn't supported by confidential guests, so disable it in
the configuration.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2026-02-10 08:38:41 +01:00
Paul Meyer
a5f554922c runtime: disable nvdimm for confidential guest
There is code to disable this at runtime  when confidential_guest
is enabled anyway[^1], but it will omit a warning every time. All
the touched configuration files set confidential_guest to true,
so we already know nvdimm isn't supported.

[^1]: 16a7ed6e14/src/runtime/virtcontainers/qemu_amd64.go (L144-L148)

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2026-02-10 08:38:18 +01:00
Lukáš Doktor
f7baa394d4 tools.gatekeeper: Add support to paginate workflows
The number of workflows increased over 30 so we need to paginate them as
well as jobs. This commit extracts the existing pagination from jobs and
uses it for both jobs and workflows.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2026-02-10 06:53:47 +00:00
stevenhorsman
120fde28e1 versions: Bump rust to 1.91
Following the agreed toolchain policy - bump rust to the current (1.93)-2
releases.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-10 06:52:42 +00:00
Alex Lyn
362a4c5714 runtime-rs: Fix multiqueue config propagation and tap initialization
The previous implementation failed to correctly propagate the network
multiqueue configuration, causing the effective queue number to remain
0.
It also mixed up "queue pairs" with "queue number", so tap devices were
opened without proper multiqueue initialization which causes Clh
netconfig validation failed.

This commit fixes the configuration mapping and initializes tap devices
with the correct multiqueue semantics, ensuring Cloud Hypervisor
receives a valid netconfig.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-02-10 11:34:25 +08:00
Alex Lyn
79f81dae50 runtime-rs: Add network_queues for setting network device multiqueues
To make network_queues configurable, a new method is introduced via
configurtion toml.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-02-10 11:34:25 +08:00
Alex Lyn
6723ff5c46 runtime-rs: Add configurable DEFNETQUEUES in Makefile
To make build with a configurable item of network queues, a dedicated
variable of DEFNETQUEUES is added.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-02-10 11:34:25 +08:00
Alex Lyn
cfc479ef1d kata-types: Add Network device specific annotation for network queues
This commit introduces a new annotation for users to easily set network
queues via "io.katacontainers.config.hypervisor.network_queues".
And the annotation will be mapped into `NetworkInfo.network_queues`
within the configuration.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-02-10 11:34:25 +08:00
Alex Lyn
61e7875267 kata-types: Adjust the network_queues when load from configuration
Adjusts the network queues after loading from a configuration file.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-02-10 11:34:25 +08:00
Manuel Huber
a6ca5c6628 ci: add editorconfig checker
This adds a basic configuration for editorconfig checker. The
supplied configuration checks against trailing whitespaces and
issues with newlines.
Example:
| tools/packaging/kernel/configs/fragments/x86_64/numa.conf:
|       Wrong line endings or no final newline
| tools/packaging/release/generate_vendor.sh:
|       44: Trailing whitespace

Signed-off-by: Manuel Huber <manuelh@nvidia.com>
2026-02-09 15:03:26 -08:00
stevenhorsman
e6d291cf0a trace-forwarder: Bump time to 0.3.47
Bump time to remediate CVE-2026-25727

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:44:51 +01:00
stevenhorsman
79dc892e18 kata-ctl: Bump time to 0.3.47
Bump time to remediate CVE-2026-25727

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:44:51 +01:00
stevenhorsman
9e1ddcdde9 agent-ctl: Bump time to 0.3.47
Bump time to remediate CVE-2026-25727

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:44:51 +01:00
stevenhorsman
f840f9ad54 rust: Bump time to 0.3.47
To remediate CVE-2026-25727

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:44:51 +01:00
stevenhorsman
ffcb10b6a3 agent: Bump time crate to 0.3.47
Update time to resolve CVE-2026-25727.
Note: this involved bumping the versions of slog-term and slog-json
and bumping the MSRV to 1.88.0 which time 0.3.47 requires.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:44:51 +01:00
stevenhorsman
33d494b07e kata-deploy: Bump bytes to 1.11.1
To remediate CVE-2026-25541

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:43:23 +01:00
stevenhorsman
2ea29df99a genpolicy: Bump bytes to 1.11.1
To remediate CVE-2026-25541

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:43:23 +01:00
stevenhorsman
fa3b419965 kata-ctl: Bump bytes to 1.11.1
To remediate CVE-2026-25541

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:43:23 +01:00
stevenhorsman
e49a61eea2 agent: Bump bytes to 1.11.1
To remediate CVE-2026-25541

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:43:23 +01:00
stevenhorsman
bc45788356 versions: Bump bytes to 1.11.1
To remediate CVE-2026-25541

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2026-02-09 21:43:23 +01:00