Commit Graph

13813 Commits

Author SHA1 Message Date
gaohuatao
4cb4e44234 runtime-rs: fix the bug of func count_files
When the total number of files observed is greater than limit, return -1 directly.
runtime has fixed this bug, it should b ported to runtime-rs.

Fixes:#9829

Signed-off-by: gaohuatao <gaohuatao@bytedance.com>
2024-06-13 16:02:33 +08:00
Fabiano Fidêncio
3a0247ed43
Merge pull request #9819 from stevenhorsman/config-envvar-precedence
agent: config: Ensure envs take precedence
2024-06-12 11:26:02 +02:00
Xuewei Niu
92cc5e0adb
Merge pull request #9781 from gaohuatao-1/ght/shm 2024-06-12 12:39:28 +08:00
Wainer Moschetta
f66a5b6287
Merge pull request #9807 from wainersm/qemu-rs_kata-deploy
kata-deploy: add qemu-runtime-rs runtimeClass
2024-06-11 14:50:01 -03:00
Dan Mihai
d47f40210a
Merge pull request #9808 from microsoft/saulparedes/oci_from_settings
genpolicy: load OCI version from settings
2024-06-11 10:42:04 -07:00
Wainer dos Santos Moschetta
be9990144a workflow: run kata-deploy tests to qemu-runtime-rs on AKS
Start testing the ability of kata-deploy to install and configure
the qemu-runtime-rs runtimeClass.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2024-06-11 12:58:47 -03:00
Wainer dos Santos Moschetta
4f398cc969 kata-deploy: add qemu-runtime-rs runtimeClass
Allow kata-deploy to install and configure the qemu-runtime-rs runtimeClass
which ties to qemu hypervisor implementation in rust for the runtime-rs.

Fixes: #9804
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2024-06-11 12:58:47 -03:00
stevenhorsman
40e02b34cb agent: config: Ensure envs take precedence
- Update the config parsing logic so that when reading from the
agent-config.toml file any envs are still processed
- Add units tests to formalise that the envs take precedence over values
from the command line and the config file

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-06-11 16:31:10 +01:00
Steve Horsman
59ff40f054
Merge pull request #9811 from mkulke/mkulke/use-kebabcase-for-enum-values-in-config-file-parsing
agent: convert enum vals to kebab-case in cfg file
2024-06-11 14:49:30 +01:00
gaohuatao
638e9acf89 runtime: fix the bug of func countFiles
When the total number of files observed is greater than limit, return (-1, err).
When the returned err is not nil, the func countFiles should return -1.

Fixes:#9780

Signed-off-by: gaohuatao <gaohuatao@bytedance.com>
2024-06-11 18:17:18 +08:00
Alex Lyn
1c8db85d54
Merge pull request #9784 from Apokleos/bufix-testcases
kata-types: fix bug in kata-types several test cases
2024-06-11 10:01:45 +08:00
Saul Paredes
6a84562c16 genpolicy: load OCI version from settings
Load OCI version from genpolicy-settings.json and validate it in
rules.rego

Fixes: #9593

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
2024-06-10 15:30:39 -07:00
GabyCT
0c5849b68b
Merge pull request #9809 from microsoft/danmihai1/yq-breaking-change
tests: k8s: use newer yq command line format
2024-06-10 16:29:59 -06:00
Wainer Moschetta
ade69e44f9
Merge pull request #9785 from BbolroC/kubectl-retry
CI: Introduce retry mechanism for kubectl in gha-run.sh
2024-06-10 18:33:34 -03:00
Magnus Kulke
abc704a720 agent: convert enum vals to kebab-case in cfg file
fixes #9810

Add an annotation to the enum values in the agent config that will
deserialize them using a kebab-case conversion, aligning the behaviour
to parsing of params specified via kernel cmdline.

drive-by fix: add config override for guest_component_procs variable

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
2024-06-10 21:55:05 +02:00
Dan Mihai
32198620a9 tests: k8s: use newer yq command line format
Fix the recent collision between:
- https://github.com/kata-containers/kata-containers/pull/9377
- https://github.com/kata-containers/kata-containers/pull/9725

One enabled a newer yq command line format and the other used the older
format. Both passed CI because they were not tested together.

Fixes: #9789

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-06-10 18:48:25 +00:00
Dan Mihai
079a0a017c
Merge pull request #9557 from portersrc/ci-debug-output-nydus-pod
CI: describe pod on k8s-create-pod wait failure
2024-06-10 08:17:54 -07:00
Ryan Savino
84280115f6
Merge pull request #9151 from niteeshkd/nd_snp_kernel_hashes
runtime: enable kernel-hashes for SNP confidential container
2024-06-07 18:19:51 -05:00
GabyCT
03bcc167a4
Merge pull request #9779 from GabyCT/topic/fixcoscript
tests: Fix indentation in common script
2024-06-07 15:37:10 -06:00
Wainer Moschetta
7a28535277
Merge pull request #9800 from fidencio/topic/ci-tdx-re-enable-some-of-the-tests
ci: tdx: Re-enable a bunch of volume related tests
2024-06-07 16:17:19 -03:00
Hyounggyu Choi
8ff128dda8 CI: Introduce retry mechanism for kubectl in gha-run.sh
Frequent errors have been observed during k8s e2e tests:

- The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?
- Error from server (ServiceUnavailable): the server is currently unable to handle the request
- Error from server (NotFound): the server could not find the requested resource

These errors can be resolved by retrying the kubectl command.

This commit introduces a wrapper function in common.sh that runs kubectl up to 3 times
with a 5-second interval. Initially, this change only covers gha-run.sh for Kubernetes.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-06-07 18:24:19 +02:00
Fabiano Fidêncio
81c221c1b4
ci: k8s: tdx: Re-enable volume tests
It seems I was very lose on disabling some of the tests, and the issues
I faced could be related to other instabilities in the CI.

Let's re-enable this one, following what was done for the SEV, SNP, and
coco-qemu-dev.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-06-07 18:13:36 +02:00
Fabiano Fidêncio
9db9d35198
ci: k8s: tdx: Re-enable projected-volume tests
It seems I was very lose on disabling some of the tests, and the issues
I faced could be related to other instabilities in the CI.

Let's re-enable this one, following what was done for the SEV, SNP, and
coco-qemu-dev.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-06-07 18:12:36 +02:00
Fabiano Fidêncio
f6a6cba8ca
ci: k8s: tdx: Re-enable nested-configmap-secret tests
It seems I was very lose on disabling some of the tests, and the issues
I faced could be related to other instabilities in the CI.

Let's re-enable this one, following what was done for the SEV, SNP, and
coco-qemu-dev.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-06-07 18:12:06 +02:00
Fabiano Fidêncio
957d0cccf6
ci: k8s: tdx: Re-enable inotify tests
It seems I was very lose on disabling some of the tests, and the issues
I faced could be related to other instabilities in the CI.

Let's re-enable this one, following what was done for the SEV, SNP, and
coco-qemu-dev.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-06-07 18:10:39 +02:00
Fabiano Fidêncio
fc6f662ae0
ci: k8s: tdx: Re-enable credentials-secrets tests
It seems I was very lose on disabling some of the tests, and the issues
I faced could be related to other instabilities in the CI.

Let's re-enable this one, following what was done for the SEV, SNP, and
coco-qemu-dev.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-06-07 18:08:29 +02:00
Fabiano Fidêncio
5741c6d3e6
Merge pull request #9768 from fidencio/topic/ci-tdx-enable-cdh-test
ci: kbs: Enable CDH tests for TDX
2024-06-07 17:59:12 +02:00
Greg Kurz
afeb98d73f
Merge pull request #9782 from ldoktor/ci-centos-9
ci.ocp: Switch base to centos-9
2024-06-07 13:15:02 +02:00
Fabiano Fidêncio
fde457589e ci: kbs: tdx: Enable basic attestation tests
Let's stop skipping the CDH tests for TDX, as know we should have an
environmemnt where it can run and should pass. :-)

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-06-07 12:18:50 +02:00
Fabiano Fidêncio
cac525059e ci: kbs: tdx: Use the hostname ip instead of localhost for the PCCS
We must ensure we use the host ip to connect to the PCCS running on the
host side, instead of using localhost (which has a different meaning
from inside the KBS pod).

The reason we're using `hostname -i` isntead of the helper functions, is
because the helper functions need the coco-kbs deployed for them to
work, and what we do is before the deployment.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-06-07 12:18:07 +02:00
Alex Lyn
27685c91e5 kata-types: fix bug in kata-types several test cases
(1) As mis-use of cap.set causing previous Caps lost which
causing assert! failed, just replacing cap.set with cap.add.

(2) It will return error if there's no such name setting when
do update_config_by_annotation {
    ...
if config.runtime.name.is_empty() {
            return Err(io::Error::new(
                io::ErrorKind::InvalidData,
                "Runtime name is missing in the configuration",
            ));
        }
...
}

Fixes #9783

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2024-06-07 09:16:23 +08:00
David Esparza
822c641b58
Merge pull request #9760 from amshinde/kata-manager-link-runc
kata-manager: Add symlinks for runc and slirp4netns
2024-06-06 12:55:57 -06:00
Lukáš Doktor
699376c535
ci.ocp: Switch base to centos-9
Centos8 is EOL and repos are not available anymore. Centos9 contains the
same packages and should do well as a base for testing.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2024-06-06 09:03:17 +02:00
Chris Porter
4172ccb3a0 CI: describe pod on k8s-create-pod wait failure
This is generally useful debug output on test failures,
and specifically this has been useful for nydus-related
issues recently.

Signed-off-by: Chris Porter <porter@ibm.com>
2024-06-05 12:37:53 -04:00
Gabriela Cervantes
264c7e9473 tests: Fix indentation in common script
This PR fixes the indentation in common script.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-06-05 15:52:40 +00:00
Niteesh Dubey
1dbf5208ac versions: Upgrade ovmf
This is required to support SEV-SNP confidential container with kernel-hashes.
Since this ovmf is latest stable version, it is good to upgrade for tdx
and Vanilaa builds too.

Signed-off-by: Niteesh Dubey <niteesh@us.ibm.com>
2024-06-05 15:02:02 +00:00
Niteesh Dubey
62d3d7c58f runtime: enable kernel-hashes for SNP confidential container
This is required to provide the hashes of kernel, initrd and cmdline
needed during the attestation of the coco.

Fixes: #9150

Signed-off-by: Niteesh Dubey <niteesh@us.ibm.com>
2024-06-05 15:02:02 +00:00
Steve Horsman
b30d085271
Merge pull request #9702 from ildikov/blog-submission-guide
docs: Adding blog submission guidelines
2024-06-05 09:03:19 +01:00
Amulya Meka
b323afeda9
Merge pull request #9214 from Amulyam24/oras
kata-deploy: install oras using release artefacts on ppc64le
2024-06-05 11:40:55 +05:30
Fabiano Fidêncio
138ef2c55f
Merge pull request #9678 from AdithyaKrishnan/main
TEEs: Skip a few CI tests for SEV/SNP
2024-06-04 23:42:51 +02:00
GabyCT
ba30f0804a
Merge pull request #9770 from GabyCT/topic/fixvad
tests: Use variable definition for better uniformity
2024-06-04 15:23:34 -06:00
GabyCT
6c2e8bed77
Merge pull request #9725 from 3u13r/feat/genpolicy/filter-by-runtime
genpolicy: add ability to filter for runtimeClassName
2024-06-04 10:06:14 -06:00
Hyounggyu Choi
869f89c338
Merge pull request #9773 from BbolroC/use-qemu-coco-dev-s390x
GHA: Use qemu-coco-dev for k8s nydus test on s390x
2024-06-04 17:49:38 +02:00
Gabriela Cervantes
cafba23f3e tests: Use variable definition for better uniformity
This PR replaces the name to use a variable that is already defined
to have a better uniformity across the general script.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-06-04 15:49:27 +00:00
Wainer Moschetta
2b8cdd9ff2
Merge pull request #9765 from wainersm/disable_failing_jobs
CI: disable jobs that failed > 50% on nightly CI recently - part 1
2024-06-04 12:05:36 -03:00
Hyounggyu Choi
246ee83768 GHA: Use qemu-coco-dev for k8s nydus test on s390x
In line with the changes for x86_64, the k8s nydus test for s390x should
also use `qemu-coco-dev` for `KATA_HYPERVISOR`.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-06-04 15:49:23 +02:00
Hyounggyu Choi
3aff6c5bd8 CI: Retry fetching node_start_time when it is empty
It was observed that the `node_start_time` value is sometimes empty,
leading to a test failure.

This commit retries fetching the value up to 3 times.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-06-04 15:41:15 +02:00
Zvonko Kaiser
647560539f
Merge pull request #9769 from zvonkok/initrd-image-no-sudo
ci: remove sudo and make sure artifacts is owned by user
2024-06-04 07:16:51 +02:00
Wainer Moschetta
b5561074c3
Merge pull request #9377 from beraldoleal/yqbump
deps: bumping yq to v4.40.7
2024-06-03 14:34:58 -03:00
Ildiko Vancsa
5e03bec26b docs: Adding blog submission guidelines
The Kata blog was recently moved to the project's website. The content
of the blog is stored together with the rest of the website source on
GitHub.

This patch adds a short guide that describes how to submit a new
blog post as a PR, to appear on the project's website.

Signed-off-by: Ildiko Vancsa <ildiko.vancsa@gmail.com>
2024-06-03 08:58:05 -07:00