Commit Graph

16092 Commits

Author SHA1 Message Date
Dan Mihai
d37feac679 tests: test mariner with disable_image_nvdimm=true
Run the k8s tests on mariner with annotation disable_image_nvdimm=true,
to use virtio-blk instead of nvdimm for the guest rootfs block device.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-06-10 02:03:31 +00:00
Dan Mihai
1aeef52bae clh: runtime: add disable_image_nvdimm support
Allow users to build using DEFDISABLEIMAGENVDIMM=true if they want to
set disable_image_nvdimm=true in configuration-clh.toml.

disable_image_nvdimm=false is the default config value.

Also, use virtio-blk instead of nvdimm if disable_image_nvdimm=true in
configuration-clh.toml.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-06-10 02:00:52 +00:00
Dan Mihai
0dd9325264 qemu: runtime: build variable for disable_image_nvdimm=true
Allow users to build using DEFDISABLEIMAGENVDIMM=true if they
want to set disable_image_nvdimm=true in configuration-qemu*.toml.

disable_image_nvdimm=false is the default configuration value.

Note that the value of disable_image_nvdimm gets ignored for
platforms using "confidential_guest = true".

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-06-10 01:57:42 +00:00
Dan Mihai
d51e0c9875 snp: gpu: comment out disable_image_nvdimm config
Comment out "disable_image_nvdimm = true" in:

- configuration-qemu-snp.toml
- configuration-qemu-nvidia-gpu-snp.toml

for consistency with the other configuration-qemu*.toml files.

Those two platforms are using "confidential_guest = true", and therefore
the value of disable_image_nvdimm gets ignored.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-06-10 01:44:51 +00:00
Alex Lyn
2979312f7b
Merge pull request #11381 from RuoqingHe/log-instead-of-format
runtime-rs: Log error instead of format
2025-06-09 11:54:13 +08:00
Ruoqing He
781510202a runtime-rs: Log error instead of format
Log on error condition when `umount` operation fail instead of `format!`
error message.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-06-08 08:28:22 +00:00
Xuewei Niu
17b2daf0a7
Merge pull request #11357 from justxuewei/nxw/remove-dcode
dragonball: Remove a useless dead_code attribute
2025-06-08 16:07:03 +08:00
Dan Mihai
e067a1be64
Merge pull request #11358 from burgerdev/gid-warning
genpolicy: improvements to /etc/passwd checks
2025-06-06 17:04:27 -07:00
Steve Horsman
31a8944da1
Merge pull request #11334 from kata-containers/remove-inherit-secrets
workflows: Replace secrets: inherit
2025-06-06 16:41:13 +01:00
Steve Horsman
9555f2ce08
Merge pull request #11387 from burgerdev/riscv-artifact-name
ci: fix artifact name of RISC-V tarball
2025-06-06 15:50:21 +01:00
stevenhorsman
66ef1c1198 workflows: Replace secrets: inherit
Having secrets unconditionally being inherited is
bad practice, so update the workflows to only pass
through the minimal secrets that are needed

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-06-06 09:56:46 +01:00
stevenhorsman
89d038d2b4 workflows: Switch QUAY_DEPLOYER_USERNAME to var
QUAY_DEPLOYER_USERNAME isn't sensitive, so update the secret for a var to simplify the workflows

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-06-06 09:49:14 +01:00
stevenhorsman
2eda21180a workflows: Switch AUTHENTICATED_IMAGE_USER to var
AUTHENTICATED_IMAGE_USER isn't sensitive, so
update the secret for a var to simplify the workflows

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-06-06 09:49:14 +01:00
Markus Rudy
9ffed463a1 ci: fix artifact name of RISC-V tarball
The artifact name accidentally referred to ARM64, which caused a clash
in CI runs.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
2025-06-06 08:29:48 +02:00
RuoqingHe
567296119d
Merge pull request #11317 from kimullaa/remove-obsolete-parameters
runtime: remove hotplug_vfio_on_root_bus from config.toml
2025-06-06 04:03:03 +02:00
Steve Horsman
9ff650b641
Merge pull request #11383 from stevenhorsman/remove-docker-hub-publish
Switch docker hub mirroring to ghcr.io
2025-06-05 17:16:18 +01:00
Shunsuke Kimura
5193cfedca runtime: remove hotplug_vfio_on_root_bus from toml
In this commit, hotplug_vfio_on_root_bus parameter is removed.
<dd422ccb69>

pcie_root_port parameter description
(`This value is valid when hotplug_vfio_on_root_bus is true and
machine_type is "q35"`) will have no value,
and not completely valid, since vrit or DB as also support for root-ports and CLH as well.
so removed.

Fixes: #11316

Co-authored-by: Zvonko Kaiser <zkaiser@nvidia.com>
Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
2025-06-05 21:53:06 +09:00
Steve Horsman
0f8104a2df
Merge pull request #11376 from RuoqingHe/upgrade-ttrpc-0.5.0
Upgrade `ttrpc-codegen` and `protobuf` to kill `#![allow(box_pointers)]`
2025-06-05 13:02:13 +01:00
stevenhorsman
6c6e16eef3 workflows: Remove docker hub registry publishing
As docker hub has rate limiting issues, inside mirror
quay.io to ghcr.io instead

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-06-05 11:46:51 +01:00
Markus Rudy
1c240de58d genpolicy: don't parse /etc/passwd in a loop
Instead of looping over the users per group and parsing passwd for each
user, we can do the reverse lookup uid->user up front and then compare
the names directly. This has the nice side-effect of silencing warnings
about non-existent users mentioned in /etc/group, which is not relevant
for policy decisions.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
2025-06-04 17:54:57 +02:00
Markus Rudy
a1baaf6fe2 genpolicy: ignore groups with same name as user
containerd does not automatically add groups to the list of additional
GIDs when the groups have the same name as the user:

https://github.com/containerd/containerd/blob/f482992/pkg/oci/spec_opts.go#L852-L854

This is a bug and should be corrected, but it has been present since at
least 1.6.0 and thus affects almost all containerd deployments in
existence. Thus, we adopt the same behavior and ignore groups with the
same name as the user when calculating additional GIDs.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
2025-06-04 10:29:49 +02:00
Xuewei Niu
3f8dd821e6 dragonball: Remove a useless dead_code attribute
The vhost-user-fs has been added to Dragonball, so we can remove
`update_memory`'s dead_code attribute.

Fixes: #8691

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2025-06-04 11:34:16 +08:00
Ruoqing He
77e68b164e agent: Upgrade ttrpc-codegen to 0.5.0
Propagate `ttrpc-codegen` upgrade from `libs/protocols` to `agent`.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-06-04 01:16:46 +00:00
Ryan Savino
1e686dbca7 agent: Remove casting and fix Arc declaration
Removed unnecessary dynamic dispatch for services. Properly dereferenced
service Box values and stored in Arc.

Co-authored-by: Ruoqing He <heruoqing@iscas.ac.cn>
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Signed-Off-By: Ryan Savino <ryan.savino@amd.com>
2025-06-04 01:16:46 +00:00
Ruoqing He
0471f01074 libs: Bump ttrpc-codegen and protobuf
Previous version of `ttrpc-codegen` is generating outdated
`#![allow(box_pointers)]` which was deprecated. Bump `ttrpc-codegen`
from v0.4.2 to v0.5.0 and `protobuf` from vx to v3.7.1 to get rid of
this.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2025-06-04 01:16:18 +00:00
Markus Rudy
eeb3d1384b genpolicy: compare additionalGIDs as sets
The additional GIDs are handled by genpolicy as a BTreeSet. This set is
then serialized to an ordered JSON array. On the containerd side, the
GIDs are added to a list in the order they are discovered in /etc/group,
and the main GID of the user is prepended to that list. This means that
we don't have any guarantees that the input GIDs will be sorted. Since
the order does not matter here, comparing the list of GIDs as sets is
close enough.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
2025-06-03 20:18:35 +02:00
Aurélien Bombo
8c3f8f8e21
Merge pull request #11339 from kata-containers/sprt/require-agent-ctl
ci: Require agent-ctl tests
2025-06-03 11:58:33 -04:00
Steve Horsman
74e47382f8
Merge pull request #11016 from stevenhorsman/dependabot-configuration
workflows: Add dependabot config
2025-06-03 15:12:32 +01:00
Steve Horsman
8176eefdac
Merge pull request #10748 from zvonkok/helm-doc
doc: Add Helm Chart entry
2025-06-03 14:48:19 +01:00
Markus Rudy
02ad39ddf1 genpolicy: push down warning about missing passwd file
The warning used to trigger even if the passwd file was not needed. This
commit moves it down to where it actually matters.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
2025-06-03 11:19:29 +02:00
Markus Rudy
ec969e4dcd genpolicy: remove redundant group check
https://github.com/kata-containers/kata-containers/pull/11077
established that the GID from the image config is never used for
deriving the primary group of the container process. This commit removes
the associated logic that derived a GID from a named group.

Signed-off-by: Markus Rudy <mr@edgeless.systems>
2025-06-03 10:59:10 +02:00
Zvonko Kaiser
985e965adb doc: Added Helm Chart README.md
We need more and accurate documentation. Let's start
by providing an Helm Chart install doc and as a second
step remove the kustomize steps.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
Co-authored-by: Steve Horsman <steven@uk.ibm.com>
2025-06-02 23:26:16 +00:00
Dan Mihai
dc0da567cd
Merge pull request #11340 from microsoft/danmihai1/image-size-alignment
image: custom guest rootfs image file size alignment
2025-06-02 14:33:21 -07:00
Dan Mihai
c2c194d860 kata-deploy: smaller guest image file for mariner
Align up the mariner Guest image file size to 2M instead of the
default 128M alignment.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-06-02 16:15:17 +00:00
Dan Mihai
65385a5bf9 image: custom guest rootfs image file size alignment
The Guest rootfs image file size is aligned up to 128M boundary,
since commmit 2b0d5b2. This change allows users to use a custom
alignment value - e.g., to align up to 2M, users will be able to
specify IMAGE_SIZE_ALIGNMENT_MB=2 for image_builder.sh.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2025-06-02 16:15:17 +00:00
Steve Horsman
c575048aa7
Merge pull request #11329 from Xynnn007/fix-initdata-snp
Fix | Support initdata for SNP
2025-06-02 15:24:12 +01:00
stevenhorsman
ae352e7e34 ci: Add dependabot groups
- Create groups for commonly seen cargo packages so that rather than
getting up to 9 PRs for each rust components, bumps to the same package
are grouped together.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-06-02 14:45:31 +01:00
stevenhorsman
a94388cf61 ci: Add dependabot config
- Create a dependabot configuration to check for updates
to our rust and golang packages each day and our github
actions each month

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2025-06-02 14:45:31 +01:00
Xynnn007
8750eadff2 test: turn SNP on for initdata tests
After the last commit, the initdata test on SNP should be ok. Thus we
turn on this flag for CI.

Fixes #11300

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
2025-06-02 20:33:19 +08:00
Xynnn007
39aa481da1 runtime: fix initdata support for SNP
the qemu commandline of SNP should start with `sev-snp-guest`, and then
following other parameters separeted by ','. This patch fixes the
parameter order.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
2025-06-02 20:33:19 +08:00
Fabiano Fidêncio
57f3cb8b3b
Merge pull request #11344 from fidencio/topic/kernel-add-tuntap-move-memagent-stuff
kernel: Add CONFIG_TUN (needed for VPNs) and move mem-agent related configs to common
2025-06-01 21:32:07 +02:00
RuoqingHe
51cc960cdd
Merge pull request #11346 from fidencio/topic/bump-cgroups-rs
rust: Update cgroups-rs to its v0.3.5 release
2025-05-31 04:13:05 +02:00
Fabiano Fidêncio
48f8496209
Merge pull request #11327 from Champ-Goblem/agent/increase-limit-nofile
agent: increase LimitNOFILE in the systemd service
2025-05-30 21:56:01 +02:00
Fabiano Fidêncio
02c46471fd rust: Update cgroups-rs to its v0.3.5 release
We're switching to using a rev as it may take some time for the package
to be updated on crates.io.

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-05-30 21:49:50 +02:00
Fabiano Fidêncio
dadbfd42c8 kernel: Move mem-agent configs to the common kernel build
There's no benefit on keeping those restricted to the dragonball build,
when they can be used with other VMMs as well (as long as they support
the mem-agent).

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-05-30 21:49:22 +02:00
Champ-Goblem
a37080917d kernel: Add CONFIG_TUN for VPN services
TUN/TAP is a must for VPN related services.

Signed-off-by: Champ-Goblem <cameron@northflank.com>
Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-05-30 21:49:22 +02:00
Fabiano Fidêncio
b8a7350a3d
Merge pull request #11324 from Champ-Goblem/runtime/fix-cgroup-deletion
runtime: fix cgroupv2 deletion when sandbox_cgroup_only=false
2025-05-30 21:23:07 +02:00
Champ-Goblem
ef642fe890 runtime: fix cgroupv2 deletion when sandbox_cgroup_only=false
Currently, when a new sandbox resource controller is created with cgroupsv2 and sandbox_cgroup_only is disabled,
the cgroup management falls back to cgroupfs. During deletion, `IsSystemdCgroup` checks if the path contains `:`
and tries to delete the cgroup via systemd. However, the cgroup was originally set up via cgroupfs and this process
fails with `lstat /sys/fs/cgroup/kubepods.slice/kubepods-besteffort.slice/....scope: no such file or directory`.

This patch updates the deletion logic to take in to account the sandbox_cgroup_only=false option and in this case uses
the cgroupfs delete.

Fixes: #11036
Signed-off-by: Champ-Goblem <cameron@northflank.com>
2025-05-30 17:51:31 +02:00
Champ-Goblem
f4007e5dc1 agent: increase LimitNOFILE in the systemd service
Increase the NOFILE limit in the systemd service, this helps with
running databases in the Kata runtime.

Signed-off-by: Champ-Goblem <cameron@northflank.com>
2025-05-30 17:49:29 +02:00
Fabiano Fidêncio
3f5dc87284
Merge pull request #11333 from stevenhorsman/csi-driver-permissions-fix
workflow: add packages: write to csi-driver publish
2025-05-30 17:45:47 +02:00