Commit Graph

10746 Commits

Author SHA1 Message Date
GabyCT
388b55175e
Merge pull request #7056 from FuuuOverclocking/fuu/fix-console_manager
dragonball: avoid obtaining lock twice in create_stdio_console
2023-06-23 16:47:00 -06:00
GabyCT
1a80fd66a2
Merge pull request #7161 from GabyCT/topic/enablemetricslimits
metrics: Add checkmetrics for kata metrics CI
2023-06-23 16:45:16 -06:00
Gabriela Cervantes
17198089ee vendor: Add vendor checkmetrics dependencies
This PR adds the vendor for the checkmetrics.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-23 20:55:30 +00:00
David Esparza
cfd6da9467
Merge pull request #7159 from dborquez/enable_launchtimes_test
metrics: enable launch-times test on gha-run metrics script
2023-06-23 12:59:46 -06:00
GabyCT
d6ff48f4e7
Merge pull request #7158 from GabyCT/topic/addmetricsreadme
docs: Add general metrics documentation
2023-06-23 11:28:00 -06:00
Gabriela Cervantes
f1dfea6e87 docs: Add metrics documentation reference
This PR adds the metrics documentation as a general reference in the
main README for kata containers.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-23 16:26:34 +00:00
David Esparza
8593594247
metrics: enable launch-times test on gha-run metrics script
This PR enables launch-times test on gha metrics workflow.

Fixes: #7049

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-06-22 18:05:46 -06:00
Fupan Li
469c678425
Merge pull request #7058 from Apokleos/vfio-dev
add support vfio device manager
2023-06-22 17:51:22 -06:00
Gabriela Cervantes
c4ee601bf4 metrics: Add checkmetrics for kata metrics CI
This PR adds the checkmetrics scripts that will be used for the kata metrics CI.

Fixes #7160

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-22 21:06:46 +00:00
Steve Horsman
267e97f9c0
Merge pull request #7162 from sprt/trusted-pr-authors
gha: Don't automatically trigger CI
2023-06-22 20:55:10 +01:00
Aurélien Bombo
e0d6475b49 gha: Don't automatically trigger CI
We have GH configured so that manual approval is required for CI runs
triggered by outside contributors. However, because CI is triggered by
the `pull_request_target` event, this setting isn't being honored
(see [1]). This means that an attacker could trivially extracts secrets
by submitting a PR.

This change aims to mititgate this issue by preventing PRs from
triggering CI unless the `ok-to-test` label is set.

Note: For further context, we use the `pull_request_target` event and
manually check out the PR branch because it is the only way to both
access secrets and test incoming code changes.

Fixes: #7163

 [1]: https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-22 11:05:53 -07:00
Archana Shinde
2d329125fd
Merge pull request #6800 from amshinde/check-vm-capability
kata-ctl: Check for vm capability
2023-06-21 23:52:46 -07:00
Zhongtao Hu
4b793222ab
Merge pull request #7154 from cheriL/7153/fix_spellings
docs: fix spelling of "crate"
2023-06-22 10:48:58 +08:00
Gabriela Cervantes
71071bdb63 docs: Add general metrics documentation
This PR adds a general metrics introduction documentation for the kata CI.

Fixes #7157

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-21 17:19:36 +00:00
Archana Shinde
610f7986e4 check: Relax the unrestricted_guest check when running in a VM
When running on a VM, the kernel parameter "unrestricted_guest" for
kernel module "kvm_intel" is not required. So, return success when running
on a VM without checking value of this kernel parameter.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-06-21 07:30:35 -07:00
Archana Shinde
1b406b9d0c kata-ctl:Implement functionality to check host is capable of running VM
Implement functionality to add to the env output if the host is capable
of running a VM.

Fixes: #6727

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-06-21 07:30:22 -07:00
David Esparza
90408d66c0
Merge pull request #7148 from GabyCT/topic/fixtabsinitscript
packaging: Fix indentation in init.sh script
2023-06-21 07:24:25 -06:00
soup
09720babc3 docs: fix spelling of "crate"
Fixes: #7153

Signed-off-by: soup <lqh348659137@outlook.com>
2023-06-21 16:10:54 +08:00
David Esparza
84b214d9d2
Merge pull request #7150 from GabyCT/topic/fixworkflows
gha: Fix gha actions
2023-06-20 18:08:23 -06:00
Gabriela Cervantes
7185afc50e gha: Fix gha actions
This PR removes an unrecognized value located in one of the yamls for the
gha in order to make it work the CI again.

Fixes #7149

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-20 23:13:25 +00:00
Gabriela Cervantes
21294b868d packaging: Fix indentation in init.sh script
This PR replaces single spaces for tabs in order to fix the indentation
in the init.sh script.

Fixes #7147

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-20 22:06:52 +00:00
GabyCT
90e36f43ff
Merge pull request #7138 from dborquez/setup-kata-and-configure-launchtimes-test
metrics: install kata and launch-times test
2023-06-20 16:00:38 -06:00
David Esparza
fad3ac9f58
metrics: install kata and launch-times test
This PR installs kata static tarball on metrics runner
and run launch-times tests.

Fixes: #7049

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-06-20 13:58:09 -06:00
David Esparza
d071a87c7b
Merge pull request #7109 from dborquez/add_common_libs_for_metrics
tests: Move tests helper script to this repo
2023-06-19 19:02:37 -06:00
David Esparza
4bbfcfaf15
tests: Move tests helper script to this repo
The common.sh script includes helper functions used in
our metrics tests, so we are gradually adding more
metrics used in kata.

Fixes: #7108

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-06-19 12:14:25 -06:00
David Esparza
f152f0e8c3
metrics: Add launch-times to metrics tests
This test measures the duration of a workload that starts, and then
immediately stops the contianer. Also measures the workload period,
the time to quit period, and the time to kernel period.

Fixes: #7049

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-06-19 10:40:16 -06:00
GabyCT
decbe77e28
Merge pull request #7129 from GabyCT/topic/metrlibjson
tests: Add json script for metrics tests
2023-06-19 09:59:41 -06:00
Fabiano Fidêncio
ef8b360711
Merge pull request #7085 from stevenhorsman/cherry-pick-initramfs
Cherry pick initramfs caching updates from CCv0
2023-06-19 11:59:00 +02:00
alex.lyn
59510cfee0 runtime-rs: add support vfio device based volume
A new choice of using vfio devic based volume for kata-containers.
With the help of kata-ctl direct-volume, users are able to add a
specified device which is BDF or IOMMU group ID.

To help users to use it smoothly, A doc about howto added in
docs/how-to/how-to-run-kata-containers-with-kinds-of-Block-Volumes.

Fixes: #6525

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-06-18 14:07:05 +08:00
alex.lyn
1e3b372bbb runtime-rs: add support vfio device manager
Limitations:
As no ready rust vmm's vfio manager is ready, it only supports
part of vfio in runtime-rs. And the left part is to call vmm
interfaces related to vfio add/remove.

So when vmm/vfio manager ready, a new PR will be pushed to
narrow the gap.

Fixes: #6525

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-06-18 14:05:59 +08:00
David Esparza
61e819ea8e
Merge pull request #7131 from GabyCT/topic/fixrunner
gha: Fix format for run launchtimes metrics yaml
2023-06-16 18:30:57 -06:00
Gabriela Cervantes
6b08489301 gha: Fix format for run launchtimes metrics yaml
This PR fixes the format for the run launchtimes metrics yaml which
is causing to the workflow to fail.

Fixes #7130

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-16 22:00:36 +00:00
Gabriela Cervantes
3cefa43e75 tests: Add json script for metrics tests
This PR adds the json script which allow us to save the metrics results
into a json file which will be used in the kata containers metrics.

Fixes #7128

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-16 19:45:26 +00:00
GabyCT
7976a0ac72
Merge pull request #7114 from GabyCT/topic/libcommontests
tests: Add tests lib common script
2023-06-16 11:48:19 -06:00
Greg Kurz
27045798bf
Merge pull request #7112 from gkurz/fix-virtiofsd-args
Fix deprecated virtiofsd args (go shim only)
2023-06-16 18:13:24 +02:00
Fabiano Fidêncio
6a3710055b initramfs: Build dependencies as part of the Dockerfile
This will help to not have to build those on every CI run, and rather
take advantage of the cached image.

Fixes: #7084

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit c720869eef)
2023-06-16 10:58:12 +01:00
Fabiano Fidêncio
aa2380fdd6 packaging: Add infra to push the initramfs builder image
Let's add the needed infra for only building and pushing the initramfs
builder image to the Kata Containers' quay.io registry.

Fixes: #7084

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit 111ad87828)
2023-06-16 10:58:12 +01:00
Fabiano Fidêncio
1c7fcc6cbb packaging: Use existing image to build the initramfs
Let's first try to pull a pre-existing image, instead of building our
own, to be used as a builder for the initramds.

This will save us some CI time.

Fixes: #7084

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit ebf6c83839)
2023-06-16 10:58:12 +01:00
Greg Kurz
a43ea24dfc virtiofsd: Convert legacy -o sub-options to their -- replacement
The `-o` option is the legacy way to configure virtiofsd, inherited
from the C implementation. The rust implementation honours it for
compatibility but it logs deprecation warnings.

Let's use the replacement options in the go shim code. Also drop
references to `-o` from the configuration TOML file.

Fixes #7111

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-06-16 11:42:54 +02:00
Greg Kurz
8e00dc6944 virtiofsd: Drop -o no_posix_lock
The C implementation of virtiofsd had some kind of limited support
for remote POSIX locks that was causing some workflows to fail with
kata. Commit 432f9bea6e hard coded `-o no_posix_lock` in order
to enforce guest local POSIX locks and avoid the issues.

We've switched to the rust implementation of virtiofsd since then,
but it emits a warning about `-o` being deprecated.

According to https://gitlab.com/virtio-fs/virtiofsd/-/issues/53 :

   The C implementation of the daemon has limited support for
   remote POSIX locks, restricted exclusively to non-blocking
   operations. We tried to implement the same level of
   functionality in #2, but we finally decided against it because,
   in practice most applications will fail if non-blocking
   operations aren't supported.

   Implementing support for non-blocking isn't trivial and will
   probably require extending the kernel interface before we can
   even start working on the daemon side.

There is thus no justification to pass `-o no_posix_lock` anymore.

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-06-16 11:42:39 +02:00
Greg Kurz
2a15ad9788 virtiofsd: Stop using deprecated -f option
The rust implementation of virtiofsd always runs foreground and
spits a deprecation warning when `-f` is passed.

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-06-16 10:30:40 +02:00
David Esparza
b9d92f4577
Merge pull request #7117 from dborquez/add_checkout_metrics_workflow
gha: Add base branch on SHA on pull requst
2023-06-15 17:06:16 -06:00
Gabriela Cervantes
c3043a6c60 tests: Add tests lib common script
This PR adds the test lib common script that is going to be used
for kata containers metrics.

Fixes #7113

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-15 21:23:00 +00:00
David Esparza
b16e0de734
gha: Add base branch on SHA on pull requst
The run-launchtimes-metrics workflow needs to get the commit ID
for the last commit to the head branch of the PR.

Fixes: #7116

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-06-15 13:11:33 -06:00
GabyCT
0f24f427d7
Merge pull request #7101 from dborquez/add_initial_metrics_gh_workflow
gha: ci-on-push: Run metrics tests
2023-06-15 10:08:56 -06:00
David Esparza
bc152b1141
gha: ci-on-push: Run metrics tests
This gh-workflow prints a simple msg, but is the base for future
PRs that will gradually add the jobs corresponding to the kata
metrics test.

Fixes: #7100

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-06-14 15:15:08 -06:00
GabyCT
a3180d0cb8
Merge pull request #7095 from GabyCT/topic/updatedebugconse
docs: Update Developer Guide
2023-06-14 13:49:37 -06:00
Gabriela Cervantes
dad731d5c1 docs: Update Developer Guide
This PR updates the developer guide at the connect to the debug console
section.

Fixes #7094

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-14 15:36:51 +00:00
Zhongtao Hu
11692a76e1
Merge pull request #7092 from Apokleos/virtiofs-enhancement
runtime-rs: Enhance flexibility of virtio-fs config
2023-06-14 20:01:46 +08:00
Fabiano Fidêncio
95bec479ca
Merge pull request #7090 from GabyCT/topic/ufcversion
versions: Update firecracker version to 1.3.3
2023-06-14 01:24:02 +02:00