Commit Graph

12805 Commits

Author SHA1 Message Date
Amulyam24
486b8a0538 dragonball: skip running static-checks for ppc64le
Since dragonball is not currently supported on ppc64le, skip running the targets for static-checks.

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2024-01-18 16:31:13 +01:00
Amulyam24
14934c7b0d github: run static checks on ppc64le
This PR adds ppc64le runner to the static-checks workflow.

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2024-01-18 16:31:13 +01:00
Hyounggyu Choi
8061a49ca5 kata-ctl: Clean up a test leftover file explicitely
It was observed that a tmporary file `/tmp/kata_hybrid_vsock02.hvsock`
for test_setup_hvsock_failed() is not removed from time to time.
This leads to a test failure for the same test next time due to the
file permission on a self-hosted runner.
This commit is to explicitely delete the file before the check starts.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-01-18 16:31:13 +01:00
Hyounggyu Choi
290ecf4c46 Static-check: Exclude s390x from dragonball and runtime-rs
At the moment, a project `dragonball` and `runtime-rs` does not support
for s390x. During the enablement, some errors due to the misconfiguration
of Makefile for `make check` and `make vendor` were identified.

This is to skip the build for the affected target of the projects.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-01-18 16:31:13 +01:00
Hyounggyu Choi
c0f57c9e0a Lint: Fix cargo clippy errors for s390x
Some linting errors were identified during the enablement of `make check`.
These have not been found by the Jenkins CI job because `make test` was
only triggered.

The errors for the `agent` occurs under the s390x specific tests while
the other ones for the `kata-ctl` are the architecture-specific code.

This commit is to fix those errors.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-01-18 16:31:13 +01:00
Hyounggyu Choi
a1f288e5d3 CI: Use sudo if yq_path is not writable by USER
If `yq_path` is set to `/usr/local/bin/yq`, there could be a situation
where the `yq` cannot be installed without `sudo`.
This commit handles the situation by putting `sudo` in front of `curl`
and `chmod`, respectively.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-01-18 16:31:13 +01:00
Hyounggyu Choi
354cbede9c GHA: Enable static check for s390x
As part of the CI migration from Jenkins to GitHub Action, a CI job named
`kata-containers-2.0-ubuntu-s390x-unit-PR` is covered by the static check.
This commit is to enable the check for s390x by incorporating a runner
`s390x` with the corresponding workflow.

Fixes: #8482

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-01-18 16:31:13 +01:00
Jianyong Wu
ba74a624a8 runtime-rs: use pathBuf only for x86
PathBuf here is only used for x86.

Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2024-01-18 16:31:13 +01:00
Jianyong Wu
a10779bf0b GHA: enable static check on arm64
This is to add a runner for arm64 to the workflow.

Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2024-01-18 16:31:11 +01:00
Dan Mihai
eeba459a6b
Merge pull request #8845 from microsoft/danmihai1/genpolicy-defaults
tools: install genpolicy settings files
2024-01-17 15:08:49 -08:00
Chelsea Mafrica
32ad465663
Merge pull request #8710 from jodh-intel/runtime-rs-ch-get-thread-ids
runtime-rs: ch: Implement minimal implementation for missing thread/pid APIs
2024-01-17 14:51:44 -08:00
Fabiano Fidêncio
147d5fd752
Merge pull request #8836 from microsoft/danmihai1/test-with-cbl-mariner
genpolicy: use root path from cbl-mariner Guest VM
2024-01-17 17:51:44 +01:00
Pavel Mores
f550d9a325 runtime-rs: add basic implementation of qemu command line generation
This current framework is enough to launch a VM with a simple container
in it (e.g. busybox).

Signed-off-by: Pavel Mores <pmores@redhat.com>
2024-01-17 12:55:00 +01:00
Pavel Mores
e8e13044da runtime-rs: add simple impls to some of Qemu's Hypervisor functions
The idea of most of these is just to prevent running into todo!()s where
we can at the moment, while implementing the fundamental functionality of
VM launch.

Signed-off-by: Pavel Mores <pmores@redhat.com>
2024-01-17 12:55:00 +01:00
Dan Mihai
febabef08c tools: install genpolicy settings files
Install the default genpolicy OPA rules and settings JSON files, in
addition to the genpolicy binary.

Fixes: #8844

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-01-16 23:59:59 +00:00
David Esparza
e11c520ffa
Merge pull request #8808 from kata-containers/memory_usage_test_skip_virtiofs_when_req
tests: Ignore virtiofs contribution to memory usage when it is disabled.
2024-01-16 16:50:06 -06:00
Dan Mihai
69557e5ad6
Merge pull request #8814 from microsoft/danmihai1/genpolicy-kata-deploy
tools: genpolicy static checks
2024-01-16 07:33:42 -08:00
Dan Mihai
13f2398fe8
Merge pull request #8837 from microsoft/danmihai1/allow_storages
genpolicy: temporarily disable allow_storages()
2024-01-16 07:10:49 -08:00
Alex.Lyn
17719f1ac5
Merge pull request #8708 from Apokleos/directvol-bugfix-blk-pci
runtime-rs: bugfix for DirectVolume/rawblock when driver is blk
2024-01-16 14:25:16 +08:00
alex.lyn
99717371c1 runtime-rs: bugfix for DirectVolume/rawblock when driver is blk
DirectVolume/Rawblock doesn't work well when device's block driver
is virtio-blk-pci and the storage handler is DRIVER_BLK_PCI_TYPE.

Fixes: #8707

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2024-01-16 10:35:08 +08:00
Dan Mihai
205dafd323 genpolicy: temporarily disable allow_storages()
Temporarily disable the allow_storages() rules, because they are based
on the tarfs snapshotter + container image integrity information that
are not available yet in the main branch - see #8833.

Fixes: #8834

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-01-15 23:55:27 +00:00
Dan Mihai
f4106a6107 genpolicy: use root path from cbl-mariner Guest VM
Adjust genpolicy-settings.json to match the container root path from
the main branch + cbl-mariner Guest VMs.

This configuration might have to be adjusted again when other types of
Guest VMs will be tested during CI using genpolicy, in the future.

Also, improve logging from allow_root_path(), to easier debug these
issues in the future.

Fixes: #8835

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-01-15 23:33:28 +00:00
GabyCT
37a4049d0f
Merge pull request #8830 from GabyCT/topic/removeprotocol
metrics: Remove iperf3 server protocol
2024-01-15 14:44:39 -06:00
Dan Mihai
201eec628a tools: genpolicy static checks
Package genpolicy and enable static checks for it.

Fixes: #8813

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-01-15 16:49:58 +00:00
David Esparza
4b772d2480 tests: Ignore virtiofs contribution to memory usage when it is disabled.
This PR removes the references to virtiofs from memory average
calculation when the container uses a shared file system other than
virtiofs.

Fixes: #8807

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2024-01-15 08:07:06 -08:00
Gabriela Cervantes
dff800a8ff metrics: Remove iperf3 server protocol
This PR removes the iperf3 server protocol as this server definition is
also used for the UDP iperf3 benchmarks to avoid duplication of the
same yaml files.

Fixes #8829

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-01-15 15:44:24 +00:00
Fabiano Fidêncio
0dc00ae373
Merge pull request #8822 from microsoft/danmihai1/cargo-clippy
genpolicy: cargo clippy fixes
2024-01-15 14:59:04 +01:00
Fabiano Fidêncio
73cf31bd9e
Merge pull request #8827 from microsoft/danmihai1/disable-k8s-oom
tests: cbl-mariner: disable k8s-oom.bats
2024-01-15 14:40:16 +01:00
Xuewei Niu
923bd65dff
Merge pull request #8819 from justxuewei/rm-protocol-backend
dragonball: Remove unused definition
2024-01-15 10:09:46 +08:00
Dan Mihai
b7c31e3b98 tests: cbl-mariner: disable k8s-oom.bats
Disable k8s-oom.bats on cbl-mariner until it passes more often.

Fixes: #8824

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-01-14 17:39:25 +00:00
Dan Mihai
681cb1626a genpolicy: cargo clippy fixes
Clean up cargo clippy errors.

Fixes: #8818

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-01-14 01:23:46 +00:00
Dan Mihai
3af713acd4
Merge pull request #8817 from microsoft/danmihai1/cargo-fmt
genpolicy: "cargo fmt -- --check" clean-up
2024-01-13 16:22:27 -08:00
Xuewei Niu
f1fda3d6b0 dragonball: Remove unused definition
`EndpointProtocolFlags::ProtocolBackend` is removed due to no reference.

Fixes: #8745

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2024-01-13 13:25:11 +08:00
Dan Mihai
dcaae54cf6 genpolicy: "cargo fmt -- --check" clean-up
Also, update Cargo.lock

Fixes: #8816

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-01-13 01:57:00 +00:00
GabyCT
a7114a35a8
Merge pull request #8792 from GabyCT/topic/updatenhwc
metrics: Use a specific python version to run tensorflow benchmark
2024-01-12 11:24:54 -06:00
Alex.Lyn
ffcd95b6b4
Merge pull request #8737 from Apokleos/test-ci-dgb-cri-containerd
ci: enable test dragonball stability and cri-containerd
2024-01-12 11:56:22 +08:00
Fabiano Fidêncio
a606401722
Merge pull request #8803 from jodh-intel/issues-8784-runtime-rs-ch-rm-todo-to-unbreak
runtime-rs: ch: Unbreak CH driver
2024-01-11 19:37:13 -03:00
Gabriela Cervantes
12a41f89b1 metrics: Use a specific python version to run tensorflow benchmark
This PR uses a specific python version to run tensorflow benchmark
as it needs python 3.8 to run correctly and avoid failures.

Fixes #8791

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-01-11 22:15:31 +00:00
GabyCT
2ffb161958
Merge pull request #8763 from stevenhorsman/fix-backport-check-hub
Fix backport check hub
2024-01-11 15:15:12 -06:00
Fabiano Fidêncio
86a6d133e4
Merge pull request #8248 from microsoft/danmihai1/genpolicy-main
tools: add policy generation tool
2024-01-11 17:02:54 -03:00
GabyCT
69be050ff9
Merge pull request #8657 from WenyuanLau/8656/Fix_StratoVirt_on_gha_metrics
gha: Fix the failure of gha metrics for StratoVirt
2024-01-11 11:41:25 -06:00
James O. D. Hunt
29e0de4e4a runtime-rs: ch: Implement minimal memory hotplug APIs
Replace the `todo!()` calls with a minimal NOP implementation to return
the CH driver to working order since the `todo!()`'s forcibly crash the
driver at runtime. Full implementations for these APIs will be added on
issues #8800, #8801, and #8802.

Fixes: #8784.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2024-01-11 14:11:31 +00:00
James O. D. Hunt
1c0df670af runtime-rs: ch: Add minimal implementation of hypervisor metrics method
Remove the `todo!()` macro which would cause a runtime crash and replace
with a implementation that returns an error as a stop-gap until #8800 is
implemented.

Fixes: #8785.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2024-01-11 14:11:01 +00:00
alex.lyn
b97efc3139 CI: enable test container memory update for dragonball
Fixes: #8746

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2024-01-11 19:07:33 +08:00
alex.lyn
6c85e95c34 CI: bugfix for dragonball when CI running with cri-containerd
Containerd runtime options with wrong setting cause it failed.
Correct it as below:
...
 [plugins.cri.containerd.runtimes.${runtime}.options]
   ConfigPath= "${KATA_CONFIG_PATH}"
...

Fixes: #8746

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2024-01-11 17:35:33 +08:00
alex.lyn
cd59d31a15 CI: make CI work for dragonball to test stability and cri-containerd
It needs to remove the skip setting, and make it work for dragonball.

Fixes: #8746

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2024-01-11 17:35:13 +08:00
Hyounggyu Choi
f62ec0a7f5
Merge pull request #8693 from BbolroC/ibm-se-config-validation-fix
runtime: Allow no initrd path for IBM Z Secure Execution
2024-01-11 09:53:51 +01:00
Xuewei Niu
70305fefc5
Merge pull request #8780 from justxuewei/containerd-events
runtime-rs: Forward events to containerd via ttrpc
2024-01-11 14:58:14 +08:00
Xuewei Niu
6fd49f7604 runtime-rs: Forward events to containerd via ttrpc
It is a little bit heavy for the runtime-rs to forwards events via
containerd CLI, contrast to the ttrpc way. Plus, for runtimes that haven't
this mechanism, e.g. CRI-O, we can't get those events anywhere.

This patch introduces two types of forwarders:

- `ContainerdForwarder`: Acquire ttrpc address from environment variables
  and forward events via ttrpc connection.
- `LogForwarder`: Write event info into logs.

Fixes: #7881

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2024-01-11 10:32:50 +08:00
GabyCT
a8be3d0450
Merge pull request #8796 from GabyCT/topic/uruncv
versions: Update runc version
2024-01-10 14:16:20 -06:00