Commit Graph

14576 Commits

Author SHA1 Message Date
GabyCT
4b257bcbb6
Merge pull request #10255 from Sumynwa/sumsharma/metrics_ci_kill_kata_components
ci: send SIGKILL to kill kata components
2024-09-05 12:04:57 -06:00
Aurélien Bombo
cc9aeee81a
Merge pull request #10263 from Sumynwa/sumsharma/add_ci_workflow
ci: Add workflow to run kata-agent api tests using kata-agent-ctl
2024-09-05 09:32:34 -07:00
Dan Mihai
7ab95b56f1
Merge pull request #10251 from microsoft/saulparedes/support_readonly_hostpath
genpolicy: support readonly hostpath
2024-09-05 09:27:15 -07:00
GabyCT
deb6d12ff6
Merge pull request #10237 from GabyCT/topic/k8soakcoco
tests: Enable k8s soak stability test for Kata CoCo CI
2024-09-05 09:56:48 -06:00
Gabriela Cervantes
fcc35dd3a7 metrics: Update openVINO and oneDNN tests references
This PR updates the machine learning tests references or urls for the
openVINO and oneDNN scripts as currently they are refering to a different
performance benchmark.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-09-05 15:39:21 +00:00
GabyCT
bb5d8bbcb5
Merge pull request #10229 from GabyCT/topic/ufcv
versions: Update firecracker version to 1.8.0
2024-09-05 09:19:36 -06:00
Fabiano Fidêncio
70491ff29f
Merge pull request #10244 from BbolroC/turn-on-kbs-qemu-coco-dev-s390x
gha: Turn on KBS for qemu-coco-dev on s390x
2024-09-05 13:02:42 +02:00
Sumedh Alok Sharma
ad66f4dfc9 ci: Add workflow to run kata-agent api tests using kata-agent-ctl
enable CI to add test cases for testing kata-agent APIs. This commit
introduces:
- a workflow to run tests
- setup scripts to prepare the test environment

Fixes #10262

Signed-off-by: Sumedh Alok Sharma <sumsharma@microsoft.com>
2024-09-05 14:38:29 +05:30
Saul Paredes
24c2d13fd3 genpolicy: support readonly emptyDir mount
Set emptyDir access based on volume mount readOnly value

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
2024-09-04 15:05:44 -07:00
Saul Paredes
36a4104753 genpolicy: support readonly hostpath
Set hostpath access based on volume mount readOnly value

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
2024-09-04 14:55:22 -07:00
Fabiano Fidêncio
7d048f5963
Merge pull request #10254 from fidencio/topic/remove-amd-specific-warning-from-non-amd-systems
runtime: Don't error out about SNP cert path on non SNP platforms
2024-09-04 23:42:32 +02:00
Fabiano Fidêncio
d44d66ddf6 kata-deploy: Remove kata-cleanup unneeded vars
As kata-cleanup will only call `reset_runtime()`, there's absolutely no
need to export the other set of environment variables in its yaml file.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-04 19:09:02 +02:00
Steve Horsman
f66e8c41a1
Merge pull request #10250 from squarti/remote-machine-type-default
runtime: fix bad default machine_type for remote hypervisor
2024-09-04 17:34:04 +01:00
Sumedh Alok Sharma
4025468e27 ci: send SIGKILL to kill kata components
metrics tests sometimes fail with kata components still running.
sending SIGKILL and waiting for the processes to reap.

Fixes #8651

Signed-off-by: Sumedh Alok Sharma <sumsharma@microsoft.com>
2024-09-04 18:58:17 +05:30
Fabiano Fidêncio
b10256a7ca runtime: Don't error out about SNP cert path on non SNP platforms
This error is specific to SNP platforms, so let's make sure we only
error this out when an SNP platform is used.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-04 11:54:52 +02:00
Hui Zhu
447a7feccf runtime-rs: configuration-dragonball.toml.in: Add config for balloon
Add enable_balloon_f_reporting config to
configuration-dragonball.toml.in.

Signed-off-by: Hui Zhu <teawater@antgroup.com>
2024-09-04 17:25:38 +08:00
Hui Zhu
9c1b5238b3 kernel/configs: Add ballon and f_reporting to dragonball-experimental
Add CONFIG_PAGE_REPORTING, CONFIG_BALLOON_COMPACTION and
CONFIG_VIRTIO_BALLOON to dragonball-experimental configs to open
dragonball function and free page reporting function.

Signed-off-by: Hui Zhu <teawater@antgroup.com>
2024-09-04 17:25:30 +08:00
Hui Zhu
ad9968ce2d runtime-rs: Add enable_balloon_f_reporting for dragonball
Under normal circumstances, the virtual machine only requests memory
from the host and does not actively release it back to host when it is
no longer needed, leading to a waste of memory resources.

Free page reporting is a sub-feature of virtio-balloon. When this
feature is enabled, the Linux guest kernel will send information about
released pages to dragonball via virtio-balloon, and dragonball will
then release these pages.

This commit adds an option enable_balloon_f_reporting to runtime-rs.
When this option is enabled, runtime-rs will insert a virtio-balloon
device with the f_reporting option enabled during the Dragonball virtual
machine startup.

Signed-off-by: Hui Zhu <teawater@antgroup.com>
2024-09-04 16:38:13 +08:00
Fabiano Fidêncio
13517cf9c1
Merge pull request #10192 from fidencio/topic/helm-add-post-delete-job
helm: Several fixes, including some reasonable re-work on kata-deploy.sh script
2024-09-04 09:34:57 +02:00
Chengyu Zhu
f0066568eb
Merge pull request #10233 from ChengyuZhu6/cdh-instance
agent:cdh: Refactor CDHClient usage and initialization
2024-09-04 13:34:36 +08:00
Silenio Quarti
9e1388728e runtime: fix bad default machine_type for remote hypervisor
Fixes: #10249

Signed-off-by: Silenio Quarti <silenio_quarti@ca.ibm.com>
2024-09-03 20:53:19 -04:00
GabyCT
c2774b09dd
Merge pull request #10247 from GabyCT/topic/removereportm
metrics: Remove metrics report for Kata Containers
2024-09-03 15:10:04 -06:00
Fabiano Fidêncio
bb9bcd886a kata-deploy: Add reset_cri_runtime()
This will help to avoid code duplication on what's needed on the helm
and non-helm cases.

The reason it's not been added as part of the commit which adds the
post-delete hook is simply for helping the reviewer (as the diff would
be less readable with this change).

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-03 23:08:22 +02:00
Fabiano Fidêncio
a773797594 ci: Pass --debug to helm
Just to make ourlives a little bit easier.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-03 23:08:22 +02:00
Fabiano Fidêncio
64ccb1645d helm: Add a post-delete hook
Instead of using a lifecycle.preStop hook, as done when we're using
using the helm chat, let's add a post-delete hook to take care of
properly cleaning up the node during when uninstalling kata-deploy.

The reason why the lifecyle.preStop hook would never work on our case is
simply because each helm chart operation follows the Kuberentes
"declarative" approach, meaning that an operation won't wait for its
previous operation to successfully finish before being called, leading
to us trying to access content that's defined by our RBAC, in an
operation that was started before our RBAC was deleted, but having the
RBAC being deleted before the operation actually started.

Unfortunately this hook brings in some code duplicatioon, mainly related
to the RBAC parts, but that's not new as the same happens with our
deamonset.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-09-03 23:08:22 +02:00
Wainer dos Santos Moschetta
3b23d62635 tests/k8s: fix wait for pods on deploy-kata action
On commit 51690bc157 we switched the installation from kubectl to helm
and used its `--wait` expecting the execution would continue when all
kata-deploy Pods were Ready. It turns out that there is a limitation on
helm install that won't wait properly when the daemonset is made of a
single replica and maxUnavailable=1. In order to fix that issue, let's
revert the changes partially to keep using kubectl and waitForProcess
to the exection while Pods aren't Running.

Fixes #10168
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2024-09-03 23:08:22 +02:00
Fabiano Fidêncio
40f8aae6db Reapply "ci: make cleanup_kata_deploy really simple"
This reverts commit 21f9f01e1d, as the
pacthes for helm are coming as part of this series.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-03 23:08:22 +02:00
Fabiano Fidêncio
cfe6e4ae71 Reapply "ci: Use helm to deploy kata-deploy" (partially)
This reverts commit 36f4038a89, as the
pacthes for helm are coming as part of this series.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-03 23:08:22 +02:00
Fabiano Fidêncio
424347bf0e Reapply "kata-deploy: Add Helm Chart" (partially)
This reverts commit b18c3dfce3, as the
pacthes for helm are coming as part of this series.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-03 23:08:22 +02:00
ChengyuZhu6
77521cc8d2 agent:cdh: introduce a function to check initialization of cdh client
introduce a function to check initialization of cdh client.

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-09-04 04:52:50 +08:00
ChengyuZhu6
07e0e843e8 agent:cdh: switch to the new method for initializing cdh client
Decouple the cdh client from AgentService and refactor cdh client usage and initialization.

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-09-04 04:51:55 +08:00
ChengyuZhu6
bc8156c3ae agent:cdh: Refactor cdh client methods for better integration
Move `unseal_env` and `secure_mount` functions on the global `CDH_CLIENT` instance to access the CDH client.

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-09-04 04:51:54 +08:00
ChengyuZhu6
0ad35dc91b agent:cdh: Initialize CDH client as a global asynchronous instance
Introduced a global `CDH_CLIENT` instance to hold the cdh client and
implemented `init_cdh_client` function to initialize the cdh client if not already set.

Fixes: #10231

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-09-04 04:49:54 +08:00
Gabriela Cervantes
5b0ab7f17c metrics: Remove metrics report for Kata Containers
This PR removes the metrics report which is not longer being used
in Kata Containers.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-09-03 16:11:07 +00:00
Hyounggyu Choi
1cefa48047 gha: Add necessary steps for KBS enablement
The following steps are required for enabling KBS:

- Set environment variables `KBS` and `KBS_INGRESS`
- Uninstall and install `kbs-client`
- Deploy KBS

This commit adds the above stpes to the existing workflow
for `qemu-coco-dev`.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-09-03 16:26:12 +02:00
Hyounggyu Choi
b0a912b8b4 tests: Enable KBS deployment for qemu-coco-dev on s390x
To deploy KBS on s390x, the environment variable `IBM_SE_CREDS_DIR`
must be exported, and the corresponding directory must be created.

This commit enables KBS deployment for `qemu-coco-dev`, in addition
to the existing `qemu-se` support on the platform.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-09-03 15:51:18 +02:00
Fabiano Fidêncio
057612f18f
Merge pull request #10238 from fidencio/topic/remove-stdio-test
ci: Remove stdio tests
2024-09-03 14:50:46 +02:00
ChengyuZhu6
0d519162b5 agent:storage: Refactor storage handler registration
- Added `driver_types` method to `StorageHandler` trait to return driver
  types managed by each handler.
- Implemented driver_types method for all storage handlers.
- Updated `STORAGE_HANDLERS` initialization to use `driver_types` for
  handler registration.

Fixes: #10242

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-09-03 18:38:52 +08:00
ChengyuZhu6
e47eb0d7d4 kata-types:mount: support registering multiple IDs to a single handler
- Updated the `add_handler` function in `StorageHandlerManager` to accept a slice of IDs (`&[&str]`) instead of a single ID (`&str`).
  This change allows a single handler to be registered for multiple storage device types.
- Refactored calls to `add_handler` in `Storage` of kata-agent to use the new function, passing arrays of storage drivers instead of single driver.

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-09-03 18:38:36 +08:00
Fabiano Fidêncio
e8657c502d Revert "CI: Add tests for stdio"
This reverts commit 704da86e9b, as the
tests never became stable to run.

This was discussed and agreed with the maintainer.

 Conflicts:
	.github/workflows/basic-ci-amd64.yaml
	tests/integration/stdio/gha-run.sh

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-03 11:52:30 +02:00
Greg Kurz
4698235e59
Merge pull request #10204 from fidencio/topic/kata-deploy-add-installation-prefix
kata-deploy: helm: Add INSTALLATION_PREFIX
2024-09-03 09:26:51 +02:00
Fabiano Fidêncio
e1d3fb8c00
Merge pull request #10236 from fidencio/topic/bump-image-rs-to-properly-handle-gzip-whiteouts
agent: Update image-rs to 02af65abc
2024-09-02 21:43:19 +02:00
Fabiano Fidêncio
0cb93ed1bb
kata-deploy: helm: Add INSTALLATION_PREFIX option
This will allow users to properly set the INSTALLATION_PREFIX when
deploying Kata Containers.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-02 20:25:22 +02:00
Gabriela Cervantes
c2aa288498 gha: Increase time to run Kata CoCo stability tests
This PR increases the time to run the Kata CoCo stability tests as
this tests are design to run for more than 2 hours.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-09-02 16:40:47 +00:00
Gabriela Cervantes
825cb2d22e tests: Enable k8s soak stability test for Kata CoCo CI
This PR enables the k8s soak stability test to run on the weekly
Kata CoCo stability CI.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-09-02 16:30:44 +00:00
Fabiano Fidêncio
1309c49c09 agent: Update image-rs to 02af65abc
As this brings in proper support to handle gzip whiteouts.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-02 14:15:04 +02:00
Fabiano Fidêncio
7be77ebee5 kata-deploy: helm: Stop mounting /opt/kata
It's simply easier if we just use /host/opt/kata instead in our scripts,
which will simplify a lot the logic of adding an INSTALLATION_PREFIX
later on.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-02 09:38:51 +02:00
Fabiano Fidêncio
6ce5e62c48 kata-deploy: Add a $dest_dir var
As we build our binaries with the `/opt/kata` prefix, that's the value
of $dest_dir.

Later in thise series it'll become handy, as we'll introduce a way to
install the Kata Containers artefacts in a different location.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-09-02 09:36:33 +02:00
Fabiano Fidêncio
ef5a5ea26e
Merge pull request #10038 from sprt/move-free-runner-iii
ci: Transition GARM tests to free runners, pt. III
2024-08-31 01:29:08 +02:00
Gabriela Cervantes
19d8f11345 versions: Update firecracker version to 1.8.0
This PR updates the firecracker version to 1.8.0 which includes the
following changes:
- Added ACPI support to Firecracker for x86_64 microVMs. Currently, we pass ACPI tables with information about the available vCPUs, interrupt controllers, VirtIO and legacy x86 devices to the guest. This allows booting kernels without MPTable support. Please see our kernel policy documentation for more information regarding relevant kernel configurations.
- Added support for the Virtual Machine Generation Identifier (VMGenID) device on x86_64 platforms. VMGenID is a virtual device that allows VMMs to notify guests when they are resumed from a snapshot. Linux includes VMGenID support since version 5.18. It uses notifications from the device to reseed its internal CSPRNG. Please refer to snapshot support and random for clones documention for more info on VMGenID. VMGenID state is part of the snapshot format of Firecracker. As a result, Firecracker snapshot version is now 2.0.0.
- Changed T2CL template to pass through bit 27 and 28 of MSR_IA32_ARCH_CAPABILITIES (RFDS_NO and RFDS_CLEAR) since KVM consider they are able to be passed through and T2CL isn't designed for secure snapshot migration between different processors.
- Avoid setting kvm_immediate_exit to 1 if are already handling an exit, or if the vCPU is stopped. This avoids a spurious KVM exit upon restoring snapshots.
- Changed T2S template to set bit 27 of MSR_IA32_ARCH_CAPABILITIES (RFDS_NO) to 1 since it assumes that the fleet only consists of processors that are not affected by RFDS.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-08-30 20:49:29 +00:00