Commit Graph

11289 Commits

Author SHA1 Message Date
Gabriela Cervantes
b34dda4ca6 tests: Add storage blogbench metrics documentation
This PR adds the storage metrics documentation for blogbench for kata
metrics.

Fixes #7329

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-13 16:00:14 +00:00
Anastassios Nanos
6787c63900 runtime-rs: add parameter for propagation of (u)mount events
Add an extra parameter in `bind_mount_unchecked` to specify
the propagation type: "shared" or "slave".

Fixes: #7017

Signed-off-by: Anastassios Nanos <ananos@nubificus.co.uk>
2023-07-13 15:58:22 +00:00
Gabriela Cervantes
6e5679bc46 tests: Add function before function name in common.bash for metrics
This PR adds function before the function name in common.bash script
in order to have uniformity across all the script.

Fixes #7327

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-13 15:48:47 +00:00
Archana Shinde
62080f83cb kata-sys-util: Fix compilation errors
Fix compilation errors for aarch64 and s390x

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-07-13 20:09:43 +05:30
Archana Shinde
02d99caf6d static-checks: Make cargo clippy pass.
Get rid of cargo clippy warnings.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-07-13 20:08:13 +05:30
Archana Shinde
9824206820 agent: Make the static checks pass for agent
The static checks for the agent require Cargo.lock to be updated.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-07-13 20:08:13 +05:30
Archana Shinde
61e4032b08 kata-ctl: Remove all utility functions to get platform protection
Since these have been added to kata-sys-util, remove these from
kata-ctl. Change all invocations to get platform protection to make use
of kata-sys-util.

Fixes: #7144

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-07-13 20:08:13 +05:30
Archana Shinde
a24dbdc781 kata-sys-util: Move utilities to get platform protection
Add utilities to get platform protection to kata-sys-util

Fixes: #7144

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-07-13 20:08:13 +05:30
Archana Shinde
dacdf7c282 kata-ctl: Remove cpu related functions from kata-ctl
Remove cpu related functions which have been moved to kata-sys-util.
Change invocations in kata-ctl to make use of functions now moved to
kata-sys-util.

Signed-off-by: Nathan Whyte <nathanwhyte35@gmail.com>
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-07-13 20:08:13 +05:30
Archana Shinde
f5d1957174 kata-sys-util: Move additional functionality to cpu.rs
Make certain imports architecture specific as these are not used on all
architectures.
Move additional constants and functionality to cpu.rs.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-07-13 20:08:13 +05:30
Nathan Whyte
304b9d9146 kata-sys-util: Move CPU info functions
Move get_single_cpu_info and get_cpu_flags into kata-sys-util.
Add new functions that get a list of flags and check if a flag
exists in that list.

Fixes #6383

Signed-off-by: Nathan Whyte <nathanwhyte35@gmail.com>
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-07-13 20:08:13 +05:30
Fabiano Fidêncio
eed3c7c046
Merge pull request #7322 from fidencio/topic/gha-ci-add-cri-containerd-tests-skeleton-follow-up
gha: ci: Add cri-containerd tests skeleton -- follow up 1
2023-07-13 13:53:48 +02:00
Fabiano Fidêncio
7319cff77a ci: cri-containerd: Add LTS / Active versions for containerd
As we'll be testing against the LTS and the Active versions of
containers, let's add those entries to the versions.yaml file and make
sure we export what we want to use for the tests as an env var.

The approach taken should not break the current way of getting the
containerd version.

LTS and Active versions of containerd can be found at:
https://containerd.io/releases/#support-horizon

Fixes: #6543

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-13 12:05:47 +02:00
Fabiano Fidêncio
2a957d41c8 ci: cri-containerd: Export GOPATH
Let's make sure this is exported, as it'll be needed in order to install
`yq`, which will be used to get the versions of the dependencies to be
installed.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-13 12:05:47 +02:00
Fabiano Fidêncio
75a294b74b ci: cri-containerd: Ensure deps are installed
Let's make sure we install the needed dependencies for running the
`cri-containerd` tests.

Right now this commit is basically adding a placeholder, and later on,
when we'll actually be able to test the job, we'll add the logic of
installing the needed dependencies.

The obvious dependencies we've spotted so far are:
* From the OS
  * jq
  * curl (already present)
* From our repo
  * yq (using the install_yq script)
* From GitHub
  * cri-containerd
  * cri-tools
  * cni plugins

We may need a few more packages, but we will only figure this out as
part of the actual work.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-13 12:04:22 +02:00
Zhongtao Hu
b69cdb5c21
Merge pull request #7286 from xuejun-xj/xuejun/up-fix
dragonball/agent: Add some optimization for Makefile and bugfixes of unit tests on aarch64
2023-07-13 09:39:23 +08:00
GabyCT
ee17097e88
Merge pull request #7282 from GabyCT/topic/enableblogbench
metrics: Enable blogbench test
2023-07-12 16:35:52 -06:00
David Esparza
f63673838b
Merge pull request #7315 from GabyCT/topic/machinelearning
tests: Add machine learning performance tests
2023-07-12 15:57:11 -06:00
David Esparza
6924d14df5 metrics: Fix metrics ts generator to treat numbers as decimals
Use bc tool to perform math operations even when variables contain
values with leading zero.

Fixes: #7317

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-07-12 20:57:33 +00:00
Gabriela Cervantes
9e048c8ee0 checkmetrics: Add blogbench read value for qemu
This PR adds the blogbench read value for qemu.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 20:38:27 +00:00
Gabriela Cervantes
2935aeb7d7 checkmetrics: Add blogbench write value for qemu
This PR adds the blogbench write value for qemu limit.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 20:37:27 +00:00
Gabriela Cervantes
02031e29aa checkmetrics: Add blogbench read value for clh
This PR adds the blogbench read value for clh limit.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 20:37:27 +00:00
Gabriela Cervantes
107fae033b checkmetrics: Add blogbench write value for clh
This PR adds the blogbench write value limit for clh.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 20:37:27 +00:00
Gabriela Cervantes
8c75c2f4bd metrics: Update blogbench Dockerfile
This PR udpates the blogbench dockerfile to have non interactive mode.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 20:37:27 +00:00
Gabriela Cervantes
49723a9ecf metrics: Add double quotes to variables
This PR adds double quotes to variables in the blogbench script to
have uniformity across all the tests.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 20:37:27 +00:00
Gabriela Cervantes
dc67d902eb metrics: Enable blogbench test
This PR enables the blogbench performance test for the kata metrics CI.

Fixes #7281

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 20:37:24 +00:00
Fabiano Fidêncio
3f38f75918
Merge pull request #7314 from fidencio/topic/gha-ci-add-cri-containerd-tests-skeleton
tests: gha: ci: Add cri-containerd tests skeleton
2023-07-12 22:21:47 +02:00
Fabiano Fidêncio
438fe3b829 gha: ci: Add cri-containerd tests skeleton
This PR builds the foundation for us to start migrating the
cri-containerd tests from Jenkins to GitHub Actions.

Right now the test does nothing and should always finish successfully.
The coming PRs will actually introduce logic to the `gha-run.sh` script
where we'll be able to run the tests and make sure those pass before
having them actually merged.

Fixes: #6543

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-12 20:57:39 +02:00
Fabiano Fidêncio
bd08d745f4 tests: metrics: Move metrics specific function to metrics gha-run.sh
`compress_metrics_results_dir()` is only used by the metrics GHA.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-12 20:56:55 +02:00
Fabiano Fidêncio
3ffd48bc16 tests: common: Move a few utility functions to common.bash
Those functions were originally introduced as part of the
`metrics/gha-run.sh` file, but those will be very hand at the time we
start adding more tests.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-12 20:55:05 +02:00
Gabriela Cervantes
7f961461bd tests: Add machine learning README
This PR adds machine learning README.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 16:37:15 +00:00
Fabiano Fidêncio
bb2ef4ca34 tests: Add function before each function
Let's just keep this standardised.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-12 18:36:09 +02:00
Gabriela Cervantes
063f7aa7cb tests: Add Pytorch Dockerfile
This PR adds Pytorch Dockerfile for kata metrics.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 16:34:17 +00:00
Fabiano Fidêncio
b6282f7053
Merge pull request #7255 from GabyCT/topic/memoryinsideenabled
metrics: Enable memory inside container metrics
2023-07-12 18:33:36 +02:00
Gabriela Cervantes
1af03b9b32 tests: Add Pytorch performance test
This PR adds Pytorch performance test for kata metrics.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 16:33:02 +00:00
Gabriela Cervantes
4cecd62370 tests: Add tensorflow Dockerfile
This PR adds the tensorflow Dockerfile.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 16:31:32 +00:00
Gabriela Cervantes
c4094f62c9 tests: Add metrics machine learning performance tests
This PR adds metrics machine learning performance tests like
Tensorflow and Pytorch.

Fixes #7313

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-12 16:28:25 +00:00
Jeremi Piotrowski
b9a63d66a4
Merge pull request #7297 from jepio/fix-mariner-cache
tools: Use a consistent target name when building mariner initrd
2023-07-12 13:43:47 +02:00
Fabiano Fidêncio
1ab99bd6bb
Merge pull request #7276 from fidencio/topic/gha-debug-gha-tests-start
gha: ci: Gather info about the node / pods
2023-07-12 12:35:10 +02:00
Chao Wu
f6a51a8a78
Merge pull request #7306 from justxuewei/none-network-model
runtime-rs: Do not scan network if network model is "none"
2023-07-12 14:53:52 +08:00
Zvonko Kaiser
4e352a73ee
Merge pull request #7308 from fidencio/topic/gha-temporarily-disable-tdx-runs
gha: k8s: tdx: Temporarily disable TDX tests
2023-07-12 08:39:02 +02:00
Fabiano Fidêncio
89b622dcb8 gha: k8s: tdx: Temporarily disable TDX tests
TDX tests need to be temporarily disabled as the current machine
allocated for this will be off for some time, and a new machine only
will be added next week.

Fixes: #7307

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-12 08:26:10 +02:00
Fabiano Fidêncio
8c9d08e872 gha: ci: Gather info about the node / pods
This is a very simple addition, that should be expanded by
https://github.com/kata-containers/kata-containers/pull/7185, and it's
targetting gathering more info that will help us to debug CI failures.

Fixes: #7296

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-12 08:04:37 +02:00
alex.lyn
283f809dda runtime-rs: Enhancing Device Manager for network endpoints.
Currently, network endpoints are separate from the device manager
and need to be included for proper management. In order to do so,
we need to refactor the implementation of the network endpoints.

The first step is to restructure the NetworkConfig and NetworkDevice
structures.
Next, we will implement the virtio-net driver and add the Network
device to the Device Manager.
Finally, we'll unify entries with do_handle_device for each endpoint.

Fixes: #7215

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-07-12 11:27:12 +08:00
xuejun-xj
a65291ad72 agent: rustjail: update test_mknod_dev
When running cargo test in container, test_mknod_dev may fail sometimes
because of "Operation not permitted". Change the device path to
"/dev/fifo-test" to avoid this case.

Fixes: #7284

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-07-12 11:22:32 +08:00
xuejun-xj
46b81dd7d2 agent: clippy: fix cargo clippy warnings
Replace "if let Ok(_) = ..." with ".is_ok()" method.

Fixes: #7284

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-07-12 11:22:32 +08:00
xuejun-xj
c4771d9e89 agent: Makefile: enable set SECCOMP dynamically
Change ":=" to "?:".

Fixes: #7284

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-07-12 11:22:32 +08:00
xuejun-xj
a88212e2c5 utils.mk: update BUILD_TYPE argument
Enable to dynamically set BUILD_TYPE argument.

Fixes: #7284

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-07-12 11:22:32 +08:00
xuejun-xj
883b4db380 dragonball: fix cargo test on aarch64
1. Update memory end assert because address space layout differs between
x86 and arm.
2. Set guest_addr for aarch64 in test_handler_insert_region case.

Fixes: #7284
TODO: #7290

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-07-12 11:22:31 +08:00
Xuewei Niu
6822029c81 runtime-rs: Do not scan network if network model is "none"
Skip to scan network from netns if the network model is specified to
"none".

Fixes: #7305

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2023-07-12 10:00:50 +08:00