1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-05-09 08:57:25 +00:00
Commit Graph

12412 Commits

Author SHA1 Message Date
Chelsea Mafrica
b785ef96ec docs: Change location of static checks script
We now use the static checks script from the main kata containers repo
and not the tests repo; update documentation to reflect this.

Fixes 

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-15 17:13:02 -08:00
Chelsea Mafrica
bfb756199f ci: Use static checks from kata repo for lib functions
Change the two functions in lib.sh to use the static checks script from
the kata containers repo instead of tests. Remove cloning the repo from
these functions since we don't need it anymore. Leave these two
functions because the document checking one may be used locally and the
static checks one is called from the virtcontainers Makefile.

Fixes 

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-15 17:08:33 -08:00
Zhongtao Hu
0f80dc636c
Merge pull request from openanolis/memory_hotlug
runtime-rs: support Memory hotplug
2023-12-15 14:28:35 +08:00
Zhongtao Hu
9a37e77f2a runtime-rs: check the update memory size
check the update memory size greater than default max memory size

Fixes:#6875
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2023-12-15 11:25:34 +08:00
Zhongtao Hu
6039417104 runtime-rs: add default_maxmemory in config file
add default_maxmemory in config file

Fixes:#6875
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2023-12-15 10:25:20 +08:00
Zhongtao Hu
8d9fd9c067 runtime-rs: support memory resize
Fixes:#6875
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2023-12-15 10:25:13 +08:00
Zhongtao Hu
81e55c424a runtime-rs: add resize_memory trait for hypervisor
Fixes: 
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2023-12-15 10:25:03 +08:00
Zhongtao Hu
d428a3f9b9 runtim-rs: get guest memory details
get memory block size and guest mem hotplug probe

Fixes:#6356
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2023-12-15 10:22:37 +08:00
GabyCT
4a49dd73db
Merge pull request from GabyCT/topic/fixins
tests: k8s: Fix indentation in setup script
2023-12-14 13:57:47 -06:00
GabyCT
7a606a19c4
Merge pull request from GabyCT/topic/improvecleanuplatency
metrics: Improve latency network cleanup
2023-12-14 13:57:28 -06:00
GabyCT
0831529279
Merge pull request from GabyCT/topic/updadockerresint
metrics: Update TensorFlow ResNet50 Int8 Dockerfile
2023-12-14 13:56:41 -06:00
Steve Horsman
04de6eb4fd
Merge pull request from ChengyuZhu6/fix_statis_check
static-checks: Add some dependencies to static checks for CoCo features
2023-12-14 16:47:01 +00:00
Greg Kurz
1bd9c1b4de
Merge pull request from wvell/patch-1
Remove warning for cgroupsv2 only operating systems
2023-12-14 17:37:59 +01:00
Gabriela Cervantes
c92b14da97 tests: k8s: Fix indentation in setup script
This PR fixes the indentation of the kubernetes setup script.

Fixes 

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-14 16:26:22 +00:00
Amulya Meka
ac7b3d4735
Merge pull request from Amulyam24/workflow
gha: add a post cleanup script for cri-containerd ppc64le workflow
2023-12-14 21:52:54 +05:30
Alex.Lyn
c7c7632203
Merge pull request from Apokleos/enhance-directv-using-csi
runtime-rs: Enhancement of DirectVolume when using a dedicated CSI
2023-12-14 22:59:09 +08:00
ChengyuZhu6
dfad0e6622 .github: fix the failure without devicemapper for host sharing
fix error when running checks and tests:
error: failed to run custom build command for `devicemapper-sys v0.1.5`
fatal error: 'libdevmapper.h' file not found

thread 'main' panicked at 'Could not generate dm.h bindings:
ClangDiagnostic("dm.h:2:10: fatal error: 'libdevmapper.h' file not found\n")',
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/devicemapper-sys-0.1.5/build.rs:24:10
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
     1: core::panicking::panic_fmt
               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
     2: core::result::unwrap_failed
               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1651:5
     3: core::result::Result<T,E>::expect
     4: build_script_build::main
     5: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
make: *** [../../utils.mk:177: standard_rust_check] Error 101

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2023-12-14 20:47:47 +08:00
ChengyuZhu6
983479748f .github: fix error when making checks for CoCo guest pull
Fix error when making checks:
```
error: failed to run custom build command for `image-rs v0.1.0
(https://github.com/confidential-containers/guest-components?tag=v0.8.0#e849dc89)`

Caused by:
  process didn't exit successfully: `/home/runner/work/kata-containers/kata-containers/src/
  agent/target/release/build/image-rs-fd932206d09362b7/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=./protos/getresource.proto
  cargo:rerun-if-changed=./protos

  --- stderr
  thread 'main' panicked at 'Could not find `protoc` installation and this build crate cannot proceed without
  this knowledge. If `protoc` is installed and this crate had trouble finding
  it, you can set the `PROTOC` environment variable with the specific path to your
  installed `protoc` binary.If you're on debian, try `apt-get install protobuf-compiler`
  or download it from https://github.com/protocolbuffers/protobuf/releases
```

Fixes 

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2023-12-14 20:47:42 +08:00
alex.lyn
aa42f0a03f runtime-rs: Enhancement of DirectVolume when using CSI.
We use a matching direct-volume path to determine whether an OCI mount
is a DirectVolume. However, we should handle the case where no match is
found appropriately.
This error will be defined as a non-DirectVolume type when judging the
OCI mount but not failed.

Fixes: 

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-12-14 18:19:03 +08:00
alex.lyn
80d631ee84 runtime-rs: Add attribute serde rename to each field of DirectVolume.
DirectVolume structure in runtime-rs is different from it in kata-runtime,
which causes they has no unified handling method for DirectVolumeMountInfo
and MountInfo.

We should align the two by simply adding the attribute #[serde(rename="x")
to each field in DirectVolumeMountInfo

Fixes: 

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-12-14 18:18:40 +08:00
Xuewei Niu
7f611dfe84
Merge pull request from justxuewei/runtime-rs-vhost-net
dragonball: Use vhost-net device by default
2023-12-14 16:33:29 +08:00
Amulyam24
0db820fa01 gha: add a post cleanup script for cri-containerd ppc64le workflow
This PR identifies and adds an action to cleanup the ppc64le self hosted runner.

Fixes: 

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2023-12-14 13:46:47 +05:30
Hyounggyu Choi
fbc04460f6
Merge pull request from BbolroC/put-pre-action-gha-s390x
GHA: Put all the preliminary steps into pre-action for s390x
2023-12-14 07:16:17 +01:00
Xuewei Niu
82fde4431e dragonball: Set default queue config for vhost-net device
Dragonball sets a default queue config in the case of `None`. The
queue_size and num_queues of vhost-net are set to `Some(0)` by default.
Therefore, we might get an invalid queue config. This patch fixes this
issue.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2023-12-14 11:18:33 +08:00
Xuewei Niu
c11b066728 runtime-rs: Use vhost-net device by default
This patch set vhost-net as default backend of networking. It allows users
to set `disable_vhost_net` to `true` to reenable virtio-net backend.
Plus, which backend to use is a matter of hypervisor, runtime-rs will no
longer need to know that.

Fixes: 

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2023-12-14 11:18:26 +08:00
Chelsea Mafrica
6c2e2a9120
Merge pull request from cmaf/migrate-static-checks-gha
static-checks: Direct Makefile to use new static checks
2023-12-13 16:00:16 -08:00
Gabriela Cervantes
8151117f73 metrics: Improve latency network cleanup
This PR improves the latency network cleanup by removing the pods
even if the test fails.

Fixes 

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-13 17:56:01 +00:00
Fabiano Fidêncio
a998e89bcf
Merge pull request from fidencio/topic/kata-deploy-use-tomlq-to-configure-containerd
kata-deploy: Use `tomlq` to configure containerd
2023-12-13 14:11:45 +01:00
Hyounggyu Choi
05e278de5b GHA: Put all the preliminary steps into pre-action for s390x
This is to introduce a pre-action to all the workflows for building artifacts.
The action could take care of tasks such as cleaning up files and reinstalling
packages, which prevents a workflow from getting affected by the environment.

This also includes the removal of the step `Adjust a permission for repo`,
because it could be incorporated into the action.

Fixes: 

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-13 13:24:40 +01:00
Chao Wu
dfaf006fcc
Merge pull request from openanolis/chao/add_pci_root_bus_device
dragonball: add pci root bus and root device
2023-12-13 17:57:16 +08:00
Fabiano Fidêncio
7ad873cf29
kata-deploy: Simplify shim configuration
We never have to add a configuration for the "default" case, as we're
already creating the runtime class pointing to what should be the
"default" handler.

This helps to simplify the logic by quite a lot.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-13 10:52:54 +01:00
Fabiano Fidêncio
e618949937
kata-deploy: Remove useless comment from CRI-O drop-in
The comment adds absolutely nothing to the runtime handler added, and
it'd make our life slightly harder to properly say which VMM is being
used when setting the default `kata` handler.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-13 10:49:52 +01:00
Fabiano Fidêncio
dd9f5b07b9
kata-deploy: Use tomlq to configure containerd
This save us a lot of trouble on properly sed'ing content that may or
may not be in the containerd configuration file.

Fixes: 

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-13 10:49:49 +01:00
Fabiano Fidêncio
4f01f294bb
kata-deploy: Install tomlq to the base image
This will help us to have an easier time playing with the containerd
configuration, instead of having to sed the **** out of it, which is
super error prone.

`tomlq` is a tool that comes from https://github.com/kislyuk/yq, and
that depends on `jq` to do the toml parsing / editing.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-13 10:49:07 +01:00
James O. D. Hunt
d7c6219dfe
Merge pull request from jodh-intel/runtime-rs-ch-set-state-on-vm-stop
runtime-rs: ch: Change state when VM stopped
2023-12-13 09:26:30 +00:00
Xuewei Niu
855adbc63b
Merge pull request from justxuewei/disable-packed-vq
dragonball: Disable packed virtqueue for vhost-user devices
2023-12-13 17:03:05 +08:00
wvell
af4622fcc1 docs: Remove warning for cgroupsv2 only operating systems
Removes warning for cgroupsv2 as it is not needed anymore according to .

Fixes 

Signed-off-by: wvell <w.vellema@slash2.nl>
2023-12-13 09:18:39 +01:00
Chelsea Mafrica
b46cb22270 static-checks: Direct Makefile to use new static checks
Direct the Makefile to use the static checks script in the tests
directory of the main Kata Containers repo so it is run in GHA.

Fixes 

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-12 16:43:35 -08:00
Chelsea Mafrica
63636b869c static-checks: Update copyright dates
Some copyright dates were not updated with the most recent changes to
code; update them.

Fixes 

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-12 16:34:06 -08:00
Chelsea Mafrica
b11c772865 static-checks: Change dir for building tools
Change directory for running make due to local errors when building with
make -C.

Fixes 

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-12 16:34:06 -08:00
James O. D. Hunt
2a518f0898 runtime-rs: ch: Change state when VM stopped
Make the CH (Cloud Hypervisor) `stop_vm()` method check the VM state before
attempting to stop the VM, and update the state once the VM has stopped.

This avoids the method failing if called multiple times which will
happen if the workload exits before the container manager requests that
the container stop.

This change ensures the CH driver finishes cleanly.

Fixes: .

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-12-12 18:25:20 +00:00
Fabiano Fidêncio
39f5cea3b1
kata-deploy: Fix k0s cri notation comment
We can safely assume we're using the *newer* notation, not the *older*
one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-12-12 18:20:18 +01:00
Gabriela Cervantes
23f76653e5 metrics: Update command to run the tensorflow int8 benchmark
This PR updates the command to run the tensorflow resnet50 int8 benchmark.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-12 16:24:09 +00:00
Gabriela Cervantes
8fd5ef7fb7 metrics: Update TensorFlow ResNet50 Int8 Dockerfile
This PR updates the TensorFlow ResNet50 Int8 Dockerfile to use the
proper python version for kata metrics.

Fixes 

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-12-12 16:20:56 +00:00
James O. D. Hunt
1195692d3c runtime-rs: ch: Move state handling to top-level APIs
Move the state setting to the `Hypervisor` trait calls. This makes the
code clearer.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-12-12 15:25:27 +00:00
Chelsea Mafrica
a9d360728e static-checks: Fix directory for github labels
Fix paths for yqdir (where the install_yq.sh script currently is) so
that static checks can run without error.

Fixes 

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-12 02:16:35 -08:00
Xuewei Niu
86918e91b3 dragonball: Disable packed virtqueue for vhost-user devices
The layout of packed virtqueue isn't supported by `Endpoint::negotiate()`.
Communication between device and driver will be failed due to the failure
of parsing virtqueue if we don't disable the packed feature. This patch
fixes this issue.

Fixes: 

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2023-12-12 17:24:20 +08:00
Chao Wu
b079e1aabc dragonball: add pci root bus and root device
In order to follow up the PCI implementation in Dragonball, we need to
add PCI root device and root bus support.

root device is a pseudo PCI root device to manage accessing to PCI
configuration space.

root bus is mainly for emulating PCI root bridge and also create the PCI
root bus with the given bus ID with the PCI root bridge.

fixes: 

Signed-off-by: Gerry Liu <gerry@linux.alibaba.com>
Signed-off-by: Zizheng Bian <zizheng.bian@linux.alibaba.com>
Signed-off-by: Shifang Feng <fengshifang@linux.alibaba.com>
Signed-off-by: Yang Su <yang.su@linux.alibaba.com>
Signed-off-by: Zha Bin <zhabin@linux.alibaba.com>
Signed-off-by: Xin Lin <jingshan@linux.alibaba.com>
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2023-12-12 11:43:14 +08:00
GabyCT
ee74fca92c
Merge pull request from GabyCT/topic/enabletestnerdctl
tests: nerdctl: Enable nerdctl tests for cloud hypervisor runtime-rs
2023-12-11 14:09:58 -06:00
David Esparza
584a26dab0
Merge pull request from dborquez/metrics_fix_deployment_cleaning
metrics: cleans k8s iperf deployment when the test finishes.
2023-12-11 13:14:39 -06:00