Commit Graph

10477 Commits

Author SHA1 Message Date
Zhongtao Hu
8cdec5707e
Merge pull request #6540 from houstar/main
docs: update the rust version from version.yaml
2023-04-10 16:53:21 +08:00
Qingyuan Hou
d1f550bd1e docs: update the rust version from versions.yaml
Fixes: #6539
Signed-off-by: Qingyuan Hou <lenohou@gmail.com>
2023-04-10 03:34:15 +00:00
alex.lyn
f3595e48b0 nydus_rootfs/prefetch_files: add prefetch_files for RAFS
A sandbox annotation used to specify prefetch_files.list
path the container image being used, and runtime will pass
it to Hypervisor to search for corresponding prefetch file:
format looks like:
"io.katacontainers.config.hypervisor.prefetch_files.list"
      = /path/to/<uid>/xyz.com/fedora:36/prefetch_file.list

Fixes: #6582

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-04-10 10:05:52 +08:00
Zhongtao Hu
3bfaafbf44 fix: oci hook
1. when do the deserialization for the oci hook, we should use camel
case for createRuntime

2. we should pass the dir of bundle path instead of the path of
config.json

Fixes:#4693
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2023-04-10 09:53:43 +08:00
Greg Kurz
c1fbaae8d6 rustjail: Use CPUWeight with systemd and CgroupsV2
The CPU shares property belongs to CgroupsV1. CgroupsV2 uses CPU weight
instead. The correct value is computed in the latter case but it is passed
to systemd using the legacy property. Systemd rejects the request and the
agent exists with the following error :

        Value specified in CPUShares is out of range: unknown

Replace the "shares" wording with "weight" in the CgroupsV2 code to
avoid confusions. Use the "CPUWeight" property since this is what
systemd expects in this case.

Fixes #6636

References:

https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#CPUWeight=weight
https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#systemd%20252
https://github.com/containers/crun/blob/main/crun.1.md#cpu-controller

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-04-07 17:57:26 +02:00
Bo Chen
375187e045 versions: Upgrade to Cloud Hypervisor v31.0
Details of this release can be found in our new roadmap project as
iteration v31.0: https://github.com/orgs/cloud-hypervisor/projects/6.

Fixes: #6632

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-04-06 14:35:26 -07:00
Fabiano Fidêncio
79f3047f06 gha: k8s-on-aks: {create,delete} AKS must be a coded-in step
I should have seen this coming, but currently the "create" and "delete"
AKS workflows cannot be imported and uses as a job's step, resulting on
an error trying to find the correspondent action.yaml file for those.

Fixes: #6630

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-06 22:56:08 +02:00
Fabiano Fidêncio
ee5dda012b
Merge pull request #6629 from fidencio/topic/gha-refactor-run-k8s-tests-on-aks
gha: k8s-on-aks: Set {create,delete}_aks as steps
2023-04-06 22:02:34 +02:00
Fabiano Fidêncio
2f35b4d4e5 gha: ci-on-push: Only run on main branch
Let's ensure we're only running this workflow when PRs are opened
against the main branch.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-06 19:11:24 +02:00
Fabiano Fidêncio
e7bd2545ef Revert "gha: ci-on-push: Depend on Commit Message Check"
This reverts commit a159ffdba7.

Unfortunately we have to revert the PRs related to the switch done to
using `workflow_run` instead of `pull_request_target`.  The reason for
that being that we can only mark jobs as required if they are targetting
PRs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-06 19:11:14 +02:00
Fabiano Fidêncio
0d96d49633 Revert "gha: ci-on-push: Adjust to using workflow_run"
This reverts commit 3a760a157a.

Unfortunately we have to revert the PRs related to the switch done to
using `workflow_run` instead of `pull_request_target`.  The reason for
that being that we can only mark jobs as required if they are targetting
PRs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-06 19:11:06 +02:00
Fabiano Fidêncio
c7ee45f7e5 Revert "gha: ci-on-push: Adapt chained jobs to workflow_run"
This reverts commit 7855b43062.

Unfortunately we have to revert the PRs related to the switch done to
using `workflow_run` instead of `pull_request_target`.  The reason for
that being that we can only mark jobs as required if they are targetting
PRs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-06 19:09:54 +02:00
Fabiano Fidêncio
5d4d720647 Revert "gha: k8s-on-aks: Fix cluster name"
This reverts commit 85cc5bb534.

Unfortunately we have to revert the PRs related to the switch done to
using `workflow_run` instead of `pull_request_target`.  The reason for
that being that we can only mark jobs as required if they are targetting
PRs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-06 19:07:04 +02:00
Fabiano Fidêncio
13d857a56d gha: k8s-on-aks: Set {create,delete}_aks as steps
We've been currently using {create,delete}_aks as jobs.  However, it
means that if the tests fail we'll end up deleting the AKS cluster (as
expected), but not having a way to recreate the cluster without
re-running all jobs, which is a waste of resources.

Fixes: #6628

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-06 16:54:15 +02:00
Fabiano Fidêncio
abaf881f4a
Merge pull request #6612 from fidencio/topic/gha-k8s-on-aks-fix-cluster-name
gha: k8s-on-aks: Fix cluster name
2023-04-06 10:48:38 +02:00
alex.lyn
dc6569dbbc runtime-rs/virtio-fs: add support extra handler for cache mode.
Add support for virtiofsd when virtio_fs_extra_args with
"-o cache auto, ..." users specified.

Fixes: #6615

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-04-06 16:31:02 +08:00
Fabiano Fidêncio
85cc5bb534 gha: k8s-on-aks: Fix cluster name
This was missed from the last series, as GHA will use the "target
branch" yaml file to start the workflow.

Basically we changed the name of the cluster created to stop relying on
the PR number, as that's not easily accessible on `workflow_run`.

Fixes: #6611

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-06 08:50:07 +02:00
Fabiano Fidêncio
68cb5689f5
Merge pull request #6584 from fidencio/topic/gha-k8s-also-test-dragonball
gha: Also run k8s tests on AKS with dragonball
2023-04-05 22:50:14 +02:00
Fabiano Fidêncio
ae488cc09f
Merge pull request #6596 from fidencio/topic/gha-only-push-to-registry-when-merging-content
gha: Only push images to registry after merging a PR
2023-04-05 22:07:13 +02:00
Fabiano Fidêncio
2c38e17ef0
Merge pull request #6607 from fidencio/topic/gha-switch-to-using-a-D4_v5-instance
gha: aks: Use D4s_v5 instance
2023-04-05 22:06:40 +02:00
Archana Shinde
6af52cef3a
Merge pull request #6590 from zvonkok/build-kernel-fix
tools: Avoid building the kernel twice
2023-04-05 11:45:59 -07:00
Greg Kurz
a3e3b0591f
Merge pull request #6562 from c3d/issue/6561-unwrap-panic
rustjail: Fix panic when cgroup manager fails
2023-04-05 16:58:13 +02:00
James O. D. Hunt
cbe6f04194
Merge pull request #6501 from shippomx/dev_metrics
runtime: add filter metrics with specific names
2023-04-05 15:15:09 +01:00
Fabiano Fidêncio
1688e4f3f0 gha: aks: Use D4s_v5 instance
It's been pointed out that D4s_v5 instances are more powerful than the
D4s_v3 ones, and have the very same price.  With this in mind, let's
switch to the newer machines.

Fixes: #6606

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 16:02:17 +02:00
Fabiano Fidêncio
108d80a86d gha: Add the ability to also test Dragonball
With the changes proposed as part of this PR, an AKS cluster will be
created but no tests will be performed.

The reason we have to do this is because GitHub Actions will only run
the tests using the workflows that are part of the **target** branch,
instead of the using the ones coming from the PR, and we didn't find yet
a way to work this around.

Once this commit is in, we'll actually change the tests themselves (not
the yaml files for the actions), as those will be the ones we want as
the checkout action helps us on this case.

Fixes: #6583

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 15:53:03 +02:00
Fabiano Fidêncio
2550d4462d gha: build-kata-static-tarball: Only push to registry after merge
56331bd7bc oversaw the fact that we
mistakenly tried to push the build containers to the registry for a PR,
rather than doing so only when the code is merged.

As the workflow is now shared between different actions, let's introduce
an input variable to specify which are the cases we actually need to
perform a push to the registry.

Fixes: #6592

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 13:57:26 +02:00
Fabiano Fidêncio
e81b8b8ee5 local-build: build-and-upload-payload is not quay.io specific
Let's just print "to the registry" instead of printing "to quay.io", as
the registry used is not tied to quay.io.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 12:54:44 +02:00
Fabiano Fidêncio
13929fc610 gha: publish-kata-deploy-payload: Improve registry login
Let's only try to login to the registry that's being passed as an input
argument.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 12:54:44 +02:00
Fabiano Fidêncio
41026f003e gha: payload-after-push: Pass registry / repo as inputs
We made registry / repo mandatory, but we only adapted that to the amd64
job.  Let's fix it now and make sure this is also passed to the arm64
and s390x jobs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 12:54:44 +02:00
Fabiano Fidêncio
7855b43062 gha: ci-on-push: Adapt chained jobs to workflow_run
As we're using the `workflow_run` event, the checkout action would
pull the **current target branch** instead of the PR one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 12:54:44 +02:00
Fabiano Fidêncio
3a760a157a gha: ci-on-push: Adjust to using workflow_run
The way previously used to get the PR's commit sha can only be used with
`pull_request*` kind of events.

Let's adapt it to the `workflow_run` now that we're using it.

With this change we ended up dropping the PR number from the tarball
suffix, as that's not straightforward to get and, to be honest, not a
unique differentiator that would justify the effort.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 12:54:44 +02:00
Fabiano Fidêncio
a159ffdba7 gha: ci-on-push: Depend on Commit Message Check
Let's make this workflow dependent of the commit message check, and only
start it if the commit message check one passes.

As a side effect, this allows us to run this specific workflow using
secrets, without having to rely on `pull_request_target`.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-05 12:54:40 +02:00
Fabiano Fidêncio
8086c75f61 gha: Also run k8s tests on AKS with dragonball
As already done for Cloud Hypervisor and QEMU, let's make sure we can
run the AKS tests using dragonball.

Fixes: #6583

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-04 10:58:47 +02:00
Fabiano Fidêncio
1c6d7cb0f7
Merge pull request #6589 from fidencio/topic/gha-k8s-use-ghcr-instead-of-quay
gha: Use ghcr.io for the k8s CI
2023-04-04 10:48:16 +02:00
Zvonko Kaiser
fe86c08a63 tools: Avoid building the kernel twice
Two different kernel build targets (build,install) have both instructions to
build the kernel, hence it was executed twice. Install should only do
install and build should only do build.

Fixes: #6588

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2023-04-04 05:44:44 +00:00
Fabiano Fidêncio
3215860a47 gha: Set ci-on-push to run on pull_request_target
This is less secure than running the PR on `pull_request`, and will
require using an additional `ok-to-test` label to make sure someone
deliverately ran the actions coming from a forked repo.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-03 20:50:36 +02:00
Fabiano Fidêncio
d17dfe4cdd gha: Use ghcr.io for the k8s CI
Let's switch to using the `ghcr.io` registry for the k8s CI, as this
will save us some troubles on running the CI with PRs coming from forked
repos.

Fixes: #6587

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-04-03 15:52:33 +02:00
Fabiano Fidêncio
e1f972fb1d
Merge pull request #6568 from kata-containers/topic/add-k8s-tests-as-part-of-gha
GHA |Switch "kubernetes tests" from jenkins to GitHub actions
2023-04-03 14:25:35 +02:00
Christophe de Dinechin
b661e0cf3f rustjail: Add anyhow context for D-Bus connections
In cases where the D-Bus connection fails, add a little additional context about
the origin of the error.

Fixes: 6561

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
Suggested-by: Archana Shinde <archana.m.shinde@intel.com>
Spell-checked-by: Greg Kurz <gkurz@redhat.com>
2023-04-03 14:09:34 +02:00
Fabiano Fidêncio
60c62c3b69 gha: Remove kata-deploy-test.yaml
This workflow becomes redundant as we're already testing kubernetes
using kata-deploy, and also testing it on AKS.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 21:55:41 +02:00
Fabiano Fidêncio
43894e9459 gha: Remove kata-deploy-push.yaml
This becomes redundant now that its steps are covered as part of the
`ci-on-push.yaml`.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 21:55:41 +02:00
Fabiano Fidêncio
cab9ca0436 gha: Add a CI pipeline for Kata Containers
This is the very first step to replacing the Jenkins CI, and I've
decided to start with an x86_64 approach only (although easily
expansible for other arches as soon as they're ready to switch), and to
start running our kubernetes tests (now running on AKS).

Fixes: #6541

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 21:55:41 +02:00
Fabiano Fidêncio
53b526b6bd gha: k8s: Add snippet to run k8s tests on aks clusters
This will be shortly used as part of a newly created GitHub action which
will replace our Jenkins CI.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 21:55:41 +02:00
Fabiano Fidêncio
c444c24bc5 gha: aks: Add snippets to create / delete aks clusters
Those will be shortly used as part of a newly added GitHub action for
testing k8s tests on Azure.

They've been created using the secrets we already have exposed as part
of our GitHub, and they follow a similar way to authenticate to Azure /
create an AKS cluster as done in the `/test-kata-deploy` action.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 21:55:41 +02:00
Fabiano Fidêncio
11e0099fb5 tests: Move k8s tests to this repo
The first part of simplifying things to have all our tests using GitHub
actions is moving the k8s tests to this repo, as those will be the first
vict^W targets to be migrated to GitHub actions.

Those tests have been slightly adapted, mainly related to what they load
/ import, so they are more self-contained and do not require us bringing
a lot of scripts from the tests repo here.

A few scripts were also dropped along the way, as we no longer plan to
deploy kubernetes as part of every single run, but rather assume there
will always be k8s running whenever we land to run those tests.

It's important to mention that a few tests were not added here:

* k8s-block-volume:
* k8s-file-volume:
* k8s-volume:
* k8s-ro-volume:
  These tests depend on some sort of volume being created on the
  kubernetes node where the test will run, and this won't fly as the
  tests will run from a GitHub runner, targetting a different machine
  where kubernetes will be running.
  * https://github.com/kata-containers/kata-containers/issues/6566

* k8s-hugepages: This test depends a whole lot on the host where it
  lands and right now we cannot assume anything about that anymore, as
  the tests will run from a GitHub runner, targetting a different
  machine where kubernetes will be running.
  * https://github.com/kata-containers/kata-containers/issues/6567

* k8s-expose-ip: This is simply hanging when running on AKS and has to
  be debugged in order to figure out the root cause of that, and then
  adapted to also work on AKS.
  * https://github.com/kata-containers/kata-containers/issues/6578

Till those issues are solved, we'll keep running a jenkins job with
hose tests to avoid any possible regression.

Last but not least, I've decided to **not** keep the history when
bringing those tests here, otherwise we'd end up polluting a lot the
history of this repo, without any clear benefit on doing so.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 21:55:41 +02:00
David Esparza
5d89d08fc4
Merge pull request #6564 from GabyCT/topic/updateneturl
docs: Update CNM url in networking document
2023-03-31 09:58:55 -06:00
Fabiano Fidêncio
73be4bd3f9 gha: Update actions for release.yaml
checkout@v2 should not be used anymore, please, see:
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 13:24:26 +02:00
Fabiano Fidêncio
d38d7fbf1a gha: Remove code duplication from release.yaml
We can easily re-use the newly added build-kata-static-tarball-*.yaml as
part of the release.yaml file.

By doing this we consolidate on how we build the components accross our
actions.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 13:24:26 +02:00
Fabiano Fidêncio
56331bd7bc gha: Split payload-after-push-*.yaml
Let's split those actions into two different ones:
* Build the kata-static tarball
* Publish the kata-deploy payload

We're doing this as, later in this series we'll start taking advantage
of both pieces.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 13:24:26 +02:00
Gabriela Cervantes
a552a1953a docs: Update CNM url in networking document
This PR updates the url for the Container Network Model
in the network document.

Fixes #6563

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-30 16:20:33 +00:00