Commit Graph

10477 Commits

Author SHA1 Message Date
yaoyinnan
01765e1734 runtime: support cgroup v2 metrics marshal guest metrics
Support to use cgroup v2 metrics marshal guest metrics.

Fixes: #5998

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
2023-02-09 19:14:09 +08:00
yaoyinnan
49326fe4e1 fix(clippy): fix hypervisor clippy checks
Fix hypervisor clippy checks.

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
2023-02-09 14:32:27 +08:00
Jianyong Wu
6f86fb8e27
Merge pull request #6183 from singhwang/main
main | docs: Fix missing critical steps in how-to-hotplug-memory-arm64.md
2023-02-09 09:26:11 +08:00
Archana Shinde
94b1d9814c cargo: Update Cargo.lock files
The cargo.locks file under src/libs and agent-ctl seem to be outdated.
Updating these.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-02-08 13:50:54 -08:00
Archana Shinde
f1855594a2 make: Get rid of verbose output while creating tar
We already have verbose output while merging the builds from various
build targets. Getting rid of verbose output to speed up.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-02-08 13:41:41 -08:00
Archana Shinde
c3836010a8 make: clean up obsolete targets
Cleanup targets that have been removed in the past when the
makefile for kata-deploy was included.
Instead, add targets from the makefile under local-build kata-deploy.

Fixes: #6165

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-02-08 13:41:40 -08:00
Archana Shinde
a482b0d410
Merge pull request #6209 from amshinde/action-check-kernel-config-version
Action check kernel config version
2023-02-08 10:34:54 -08:00
Bin Liu
407d3146e6
Merge pull request #6234 from UiPath/fix-clh-timeout
clh: Enforce API timeout only for vm.boot request
2023-02-08 21:33:56 +08:00
Tim Zhang
d4f8f3a779
Merge pull request #6152 from liubin/fix/6151-refactor-cache-mod-const
virtiofsd: change cache mod to const
2023-02-08 17:53:57 +08:00
Alexandru Matei
ac64b021a6 clh: Enforce API timeout only for vm.boot request
launchClh already has a timeout of 10seconds for launching clh, e.g.
if launchClh or setupVirtiofsDaemon takes a few seconds the context's
deadline will already be expired by the time it reaches bootVM

Fixes #6240
Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2023-02-08 11:14:51 +02:00
Bin Liu
56071c6e7b virtiofsd: change cache mod to const
Change cache mod from literal to const and place them in one place.

Also set default cache mode from `none` to `never` in
`pkg/katautils/config-settings.go.in`.

Fixes: #6151

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-02-08 15:06:52 +08:00
Zhongtao Hu
2752225360
Merge pull request #6193 from jongwu/cgroup_del_err
runtime-rs: ignor "no such process" error when delete cgroup for a thread to let it go
2023-02-08 10:30:12 +08:00
Bin Liu
93b3d0a28e
Merge pull request #6163 from BbolroC/kernel-config-s390
kernel: Add console kernel config for s390
2023-02-08 10:02:38 +08:00
Bin Liu
71a3b73cb0
Merge pull request #6223 from d3c3mber/rm-unused-shim-config
runtime: remove not used shim configurations
2023-02-08 10:00:52 +08:00
Jeremi Piotrowski
0a21ad78b1 osbuilder: fix default build target in makefile
The .dracut_rootfs.done file is accidentally being picked up as the default
target, regardless of BUILD_METHOD. Move the 'all' target definition up, so
that it's the default (=first) target in the makefile. Additionally make the
.dracut_rootfs.done target conditional on the right BUILD_METHOD being
selected, as building it doesn't make sense with BUILD_METHOD=distro.

Fixes: #6235
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-02-07 18:36:03 +01:00
Jianyong Wu
5d37d31ac7 cgroups: upgrade cgroupfs to 0.3.1
Trait method cause for std::error::Error is deprecated thus need replace
it with source method for cgroups-fs::error::ErrorKind.

Fixes: #6192
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-02-07 18:09:31 +08:00
Jianyong Wu
ab59a65c92 runtime-rs: neglect a certain error when delete cgroup
Delete cgroup for a thread which may exit can lead to panic. Just
neglect that error is harmless also avoid this failure.

Fixes: #6192
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-02-07 18:09:31 +08:00
wllenyj
9a01d4e446 dragonball: add more unit test for virtio-blk device.
Added more unit tests for virtio-blk device.

Fixes: #4899

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2023-02-07 17:16:11 +08:00
d3c3mber
390916b33c runtime: remove not used shim configurations
ShimPath and ShimDebug are not needed anymore.

Fixes: #6147

Signed-off-by: d3c3mber <tangbo_gl_2022@163.com>
2023-02-07 14:06:12 +08:00
Bin Liu
8ae14f6a55
Merge pull request #6208 from joannejchen/fix-naming-conventions
improvement: Fix naming conventions for span name and log subsystem
2023-02-07 13:43:37 +08:00
joannejchen
9794c52c65 improvement: Fix naming conventions for span name and log subsystem
Normally, the span name should be the same as the function name, and the log subsystem should not contain spaces.

Fixes #6153

Signed-off-by: joannejchen <chenjjoanne@gmail.com>
2023-02-06 08:25:49 -06:00
Bin Liu
df93439c3b
Merge pull request #6009 from openanolis/dragonball/add_cpu_resize
Dragonball: add cpu resize ability
2023-02-05 19:54:08 +08:00
Archana Shinde
d3bb254188 utils: Add function to check vhost-vsock
Add function to check if the host-system has the vhost-vsock
kernel module.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-02-03 15:41:59 -08:00
GabyCT
7fc35f19eb
Merge pull request #6056 from jongwu/perm_deny
arm64/CI: fix unit test failure on arm64
2023-02-03 10:53:38 -06:00
Greg Kurz
1660d5651f
Merge pull request #6212 from BbolroC/fix-docker-buildx-s390x
CI: Make docker version stick to v20.10 in ubuntu:20.04 for s390x|ppc64le
2023-02-03 17:05:55 +01:00
Hyounggyu Choi
f49b89b632 CI: Set docker version to v20.10 in ubuntu:20.04 for s390x|ppc64le
This is to make a docker version to v20.10 in docker upstream image ubuntu:20.04 for s390x and ppc64le.

Fixes: #6211

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-02-03 14:21:23 +01:00
Archana Shinde
3c24e23409 README: Update Readme under packaging/kernel
Update Readme to instruct users to increment the kata config version
for any changes made to configs or patches under packaging/kernel.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-02-02 22:43:24 -08:00
Archana Shinde
d73f3a8a26 github-action: Add step to verify kernel config version id updated
The version mentioned in the `kata_config_version` needs to be
updated for any kernel config change or changed to the patches applied.
Without this, CI would not test with the latest kernel changes.
We use to enforce this earlier as part of CI when `packaging` was
a standalone repo.

Add back this check as part of a github action so that the check is
performed early on instead of a CI job.

Fixes: #6210

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-02-02 22:42:54 -08:00
Jianyong Wu
59f104c022 runtime: skip unit test that fail regularly on aarch64
There are lots of unit test cases fails regularly on aarch64, including
TestIOCopy, create_tmpfs. Temporarily skip it for now and enable it
after them get fixed.

Fixes: #6194
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-02-03 11:34:39 +08:00
Jianyong Wu
b7dd97cac6 kata-ctl: fix permission deny issue in test_add_remove
test_add_remove and test_get_sandbox_id_for_volume need root user, but
test_drop_privs can temporarily change the user to "nobody" that can
lead to the failure of these tests.

Serialise these three tests can fix it.

Fixes: #6055
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-02-03 11:34:39 +08:00
GabyCT
968f5b4031
Merge pull request #6140 from Amulyam24/rust-vitiofsd
virtiofsd: fix the build on ppc64le
2023-02-02 14:30:26 -06:00
Chao Wu
57c5e5629b Dragonball: add cpu resize ability
Add cpu resize ability upon upcall communication channel. Runtime could
use ResizeVcpu VmmAction and pass the desired vCPU number to the
Dragonball hypervisor.
Dragonball will trigger the device manager service in guest kernel's
upcall server to do cpu resize.

Fixes: #6008
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2023-02-03 00:26:33 +08:00
Greg Kurz
3c48f2202c runtime: Improve documentation of appendFDs
The cmd.ExtraFiles feature that is used to implement appendFDs takes an
array of arbitray file descriptors and internally renumbers them to be
consecutive starting from 3, using dup2().

This isn't especially obvious : document it for the sake of clarity.

Fixes #6199

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-02-02 12:52:10 +01:00
Amulyam24
856ab66871 virtiofsd: fix the build on ppc64le
link-self-contained is not supported on ppc64le rust target.
Hence, do not pass it while building virtiofsd.

Fixes: #6195

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2023-02-02 13:59:12 +05:30
SinghWang
f83115a838 docs: Fix missing critical steps in how-to-hotplug-memory-arm64.md
The key steps in how-to-hotplug-memory-arm64.md are missing, resulting in the kata qemu pod not being created successfully.

Fixes: #6105
Signed-off-by: SinghWang <wangxin_0611@126.com>
2023-02-02 12:12:39 +08:00
yahaa
e071d9251f Typo: change tabs in comment to spaces
Fixes: #6150

Signed-off-by: yahaa <1477765176@qq.com>
2023-02-02 12:08:33 +08:00
Peng Tao
a34f36f8f4
Merge pull request #6149 from openanolis/fix_kata_runtime
runtime:fix stat uds path
2023-02-02 11:00:07 +08:00
GabyCT
d6945200cc
Merge pull request #6170 from amshinde/update-cni-version
cni: Update cni plugins version to 1.2.0
2023-02-01 09:18:14 -06:00
Chao Wu
c282a1c709
Merge pull request #5616 from wllenyj/dragonball-ut-5
Built-in Sandbox: add more unit tests for dragonball. Part 5
2023-01-31 21:12:05 +08:00
Peng Tao
09d416fe43
Merge pull request #6174 from gkurz/remove-qemu-log-file
runtime: Drop QEMU log file support
2023-01-31 17:56:04 +08:00
Hyounggyu Choi
56f0a27fef kernel: Add console kernel config for s390
This config is to update console kernel config for s390.

Fixes: #6162

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-01-31 10:44:07 +01:00
Greg Kurz
334c4b8bdc runtime: Drop QEMU log file support
The QEMU log file is essentially about fine grain tracing of QEMU
internals and mostly useful for developpers, not production. Notably,
the log file isn't limited in size, nor rotated in any way. It means
that a container running in the VM could possibly flood the log file
with a guest triggerable trace. For example, on openshift, the log
file is supposed to reside on a per-VM 14 GiB tmpfs mount. This means
that each pod running with the kata runtime could potentially consume
this amount of host RAM which is not acceptable.

Error messages are best collected from QEMU's stderr as kata is doing
now since PR #5736 was merged. Drop support for the QEMU log file
because it doesn't bring any value but can certainly do harm.

Fixes #6173

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-01-31 09:20:29 +01:00
Archana Shinde
3a63e3c1f7 cni: Update cni plugins version to 1.2.0
A new release was made for the cni plugins. Use the new
version for the CI.

Fixes: #6169

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-01-30 22:33:34 -08:00
Chelsea Mafrica
1648b85e2d
Merge pull request #6137 from amshinde/agent-seccomp-doc
docs: Add documentation for building agent with seccomp support.
2023-01-30 19:08:15 -08:00
wllenyj
510798155d dragonball: Improve test cases
The same EpollManager should be used instead of creating two.

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2023-01-31 10:51:51 +08:00
wllenyj
dc90c6e30b dragonball: add more unit test for vm
Added more unit tests for vm module.

Fixes: #4899

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2023-01-31 10:51:51 +08:00
Fabiano Fidêncio
c071355359 runtime-rs: Improve s390x error message
Nothing much to add, let's just make the message more clear.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-30 20:32:07 +01:00
Fabiano Fidêncio
4e2db96ef7 runtime-rs: Don't try to build on Power
As done for s390x, let's just skip the runtime-rs build for Power.

Fixes: #6142

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-30 20:32:07 +01:00
Bin Liu
b29cbbfd2c
Merge pull request #6141 from fidencio/topic/upcall-follow-up
Add kernel-dragonball-experimental to kata-deploy, kata-deploy-test, and the release
2023-01-30 19:48:18 +08:00
Fabiano Fidêncio
8e8c720d51 kata-deploy-push: Ensure we build Dragonball specific kernel
As the dragonball specific kernel is now part of the release, let's make
sure we build it as part of the kata-deploy-push action.

Fixes: #5859

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-30 09:40:34 +01:00