Commit Graph

14381 Commits

Author SHA1 Message Date
Archana Shinde
c747852bce agent: image-rs: check xattrs for image unpacking
This commit includes a fix for pulling an image on platforms that do not
support xattr.

Some platforms/file-systems do not support xattrs, this would make the
image pull fail because of failing to set xattr. This commit will check
whether the target path supports xattr. If yes, the unpacking will
maintain xattrs; if not, it will not set xattrs.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2024-08-28 00:02:46 -07:00
Fabiano Fidêncio
890fa26767
Merge pull request #10196 from fidencio/topic/ci-commit-message-take-reapply-into-consideration
ci: commit-message-check: Take re-revert into consideration
2024-08-22 17:31:27 +02:00
Fabiano Fidêncio
2f6edc4b9b
Merge pull request #10194 from fidencio/topic/kata-deploy-re-work-logic
kata-deploy: Rework the logic a little bit
2024-08-22 16:46:36 +02:00
Fabiano Fidêncio
a9a1345a31 kata-deploy: Print the action the script was invoked with
This increases debuggability.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-08-22 14:32:33 +02:00
Fabiano Fidêncio
ab493b6028 kata-deploy: Move general logic to the correct actions
therwise we may end up running into unexpected issues when calling the
cleanup option, as the same checks would be done, and files could end up
being copied again, overwriting the original content which was backked
up by the install option.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-22 14:32:29 +02:00
Fabiano Fidêncio
6596012956 kata-deploy: Simplify check for runtime
Let's write the runtime check in a shorter and simpler to read form.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-08-22 14:32:02 +02:00
GabyCT
3fd108b09a
Merge pull request #10198 from GabyCT/topic/remvaropenvino
metrics: Remove unused variable in openvino script
2024-08-21 15:48:56 -06:00
Dan Mihai
8ccc8a8d0b
Merge pull request #9911 from microsoft/saulparedes/mounts
genpolicy: deny UpdateEphemeralMountsRequest
2024-08-21 10:12:28 -07:00
Gabriela Cervantes
59e31baaee metrics: Remove unused variable in openvino script
This PR removes an unused variable in the openvino script for kata
metrics.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-08-21 16:05:55 +00:00
Greg Kurz
09a13da8ec
Merge pull request #10197 from beraldoleal/release-3.8
release: Bump VERSION to 3.8.0
2024-08-21 17:50:10 +02:00
Beraldo Leal
55bdb380fb release: Bump VERSION to 3.8.0
Let's start the 3.8.0 release.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
2024-08-21 10:24:07 -04:00
Fabiano Fidêncio
3fd021a9b3 ci: commit-message-check: Take re-revert into consideration
`Reapply "` should be taken into sonsideration as well.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-08-21 14:19:16 +02:00
Fabiano Fidêncio
f071c8cada
Merge pull request #10191 from fidencio/topic/ci-temporarily-revert-helm-usage
ci: Let's temporarily revert the helm charts usage in our CI
2024-08-21 10:52:23 +02:00
Dan Mihai
6654491cc3 genpolicy: deny UpdateEphemeralMountsRequest
* genpolicy: deny UpdateEphemeralMountsRequest

Deny UpdateEphemeralMountsRequest by default, because paths to
critical Guest components can be redirected using such request.

Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
2024-08-20 18:28:17 -07:00
Fabiano Fidêncio
b18c3dfce3
Revert "kata-deploy: Add Helm Chart" (partially)
This partially reverts commit 94b3348d3c,
as there's more work needed in order to have this one done in a robust
way, and we are taking the safer path of reverting for now, and adding
it back as soon as the release is cut out.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-08-21 00:09:11 +02:00
Fabiano Fidêncio
36f4038a89
Revert "ci: Use helm to deploy kata-deploy" (partially)
This partially reverts commit 51690bc157,
as there's more work needed in order to have this one done in a robust
way, and we are taking the safer path of reverting for now, and adding
it back as soon as the release is cut out.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-08-21 00:09:11 +02:00
Fabiano Fidêncio
21f9f01e1d
Revert "ci: make cleanup_kata_deploy really simple"
This reverts commit 1221ab73f9, as there's
more work needed in order to have this one done in a robust way, and we
are taking the safer path of reverting for now, and adding it back as
soon as the release is cut out.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2024-08-21 00:09:11 +02:00
GabyCT
e0bff7ed14
Merge pull request #10177 from GabyCT/topic/cocoghas
gha: Add k8s stability Kata CoCo GHA workflow
2024-08-20 15:12:29 -06:00
Gabriela Cervantes
ca3d778479 gha: Add Kata CoCo Stability workflow
This PR adds the Kata CoCo Stability workflow that will setup the
environment to run the k8s tests on a non-tee environment.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-08-20 16:34:33 +00:00
Gabriela Cervantes
3ebaa5d215 gha: Add Kata CoCo stability weekly yaml
This PR adds the Kata CoCo stability weekly yaml that will trigger
weekly the k8s stability tests.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-08-20 16:32:03 +00:00
Fabiano Fidêncio
aeb6f54979
Merge pull request #10180 from fidencio/topic/ci-ensure-the-key-was-created-on-kbs
ci: Ensure the KBS resources are created
2024-08-20 09:07:56 +02:00
Fabiano Fidêncio
40d385d401
Merge pull request #10188 from wainersm/kbs_key
tests/k8s: check and save kbs.key
2024-08-19 23:29:10 +02:00
Fabiano Fidêncio
c0d7222194
ci: Ensure the KBS resources are created
Otherwise we may have tests failing due to the resource not being
created yet.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-19 23:27:06 +02:00
Wainer dos Santos Moschetta
e014eee4e8 tests/k8s: check and save kbs.key
The deploy-kbs.sh script generates the kbs.key that's used to install
KBS. This same file is used lately by kbs-client to authenticate. This ensures
that the file was created, otherwise fail.

Another problem solved here is that on bare-metal machines the key doesn't survive
a reboot as it is created in a temporary directory (/tmp/trustee). So let's save
the file to a non-temporary location.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2024-08-19 16:03:03 -03:00
Wainer Moschetta
6a982930e2
Merge pull request #10183 from fidencio/topic/kata-deploy-use-runtime_path
kata-deploy: Stop symlinking into /usr/local/bin
2024-08-19 13:17:21 -03:00
Fabiano Fidêncio
42d48efcc2
Merge pull request #10181 from fidencio/topic/ci-fix-stdio-typo
ci: stdio: Fix typo on getting the containerd version
2024-08-18 16:05:42 +02:00
Fabiano Fidêncio
e0ae398a2e
Merge pull request #10151 from squarti/rootdir2
runtime: Files are not synced between host and guest VMs
2024-08-18 12:32:52 +02:00
Fabiano Fidêncio
d03b72f19b
kata-deploy: Stop linking binaries to /usr/local/bin
Neither CRI-O nor containerd requires that, and removing such symlinks
makes everything less intrusive from our side.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-18 01:25:12 +02:00
Fabiano Fidêncio
c2393dc467
kata-deploy: Use shim's absolute path for crio's runtime_path
This will allow us, in the future, not have to do symlinks here and
there.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-18 01:25:12 +02:00
Fabiano Fidêncio
58623723b1
kata-deploy: Use runtime_path for containerd
It's already being used with CRi-O, let's simplify what we do and also
use this for containerd, which will allow us to do further cleanups in
the coming patches.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-18 01:25:12 +02:00
Fabiano Fidêncio
e75c149dec
ci: stdio: Properly start running the test
"gha-run.sh" requires a `run` argument in order to run the tests, which
seems to be forgotten when the test was added.

This PR needs to get merged before the test can successfully run.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-17 14:41:44 +02:00
Fabiano Fidêncio
dd2d9e5524
ci: stdio: Fix typo on getting the containerd version
I assume the PR that introduced this was based on an older version of
yq, and as the test couldn't run before it got merged we never noticed
the error.

However, this test has been failing for a reasonable amount of time,
which makes me think that we either need a maintainer for it, or just
remove it completely, but that's a discussion for another day.

For now, let's make it, at least, run.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-17 14:06:24 +02:00
Fabiano Fidêncio
7113490cb1
Merge pull request #10179 from fidencio/topic/switch-nginx-image
ci: k8s: Replace nginx alpine images
2024-08-17 13:07:31 +02:00
Fabiano Fidêncio
0831081399
ci: k8s: Replace nginx alpine images
The previous ones are gone, so let's switch to our own multi-arch image
for the tests.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-17 12:19:33 +02:00
Fabiano Fidêncio
a78d82f4f1
Merge pull request #10159 from squarti/main
agent: Handle EINVAL error when umounting container rootfs
2024-08-16 22:07:50 +02:00
Dan Mihai
79c1d0a806
Merge pull request #10136 from microsoft/danmihai1/docker-image-volume2
genpolicy: add bind mounts for image volumes
2024-08-16 13:07:01 -07:00
Fabiano Fidêncio
28aa4314ba
Merge pull request #10175 from ChengyuZhu6/error_message
runtime: Add specific error message for gRPC request timeouts
2024-08-16 22:06:49 +02:00
Fabiano Fidêncio
720edbe3fc
Merge pull request #10174 from ChengyuZhu6/install_script
tools: install luks-encrypt-storage script by guest-components
2024-08-16 22:04:56 +02:00
Fabiano Fidêncio
7b5da45059
Merge pull request #10178 from fidencio/topic/revert-trustee-bump
Revert "version: bump trustee version"
2024-08-16 21:48:30 +02:00
Gabriela Cervantes
6ea34f13e1 gha: Add k8s stability Kata CoCo GHA workflow
This PR adds the k8s stability Kata CoCo GHA workflow to run weekly
the k8s stability tests.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-08-16 16:14:15 +00:00
Fabiano Fidêncio
45f43e2a6a
Revert "version: bump trustee version"
This reverts commit d35320472c.

Although the commit in question does solve an issue related to the usage
of busybox from docker.io, as it's reasonably easy to hit the rate
limit, the commit also brings in functionalities that are causing issues
in, at least, the TDX CI, such as:
```sh
[2024-08-16T16:03:52Z INFO  actix_web::middleware::logger] 10.244.0.1 "POST /kbs/v0/attest HTTP/1.1" 401 259 "-" "attestation-agent-kbs-client/0.1.0" 0.065266
[2024-08-16T16:03:53Z INFO  kbs::http::attest] Auth API called.
[2024-08-16T16:03:53Z INFO  actix_web::middleware::logger] 10.244.0.1 "POST /kbs/v0/auth HTTP/1.1" 200 74 "-" "attestation-agent-kbs-client/0.1.0" 0.000169
[2024-08-16T16:03:54Z INFO  kbs::http::attest] Attest API called.
[2024-08-16T16:03:54Z INFO  verifier::tdx] Quote DCAP check succeeded.
[2024-08-16T16:03:54Z INFO  verifier::tdx] MRCONFIGID check succeeded.
[2024-08-16T16:03:54Z INFO  verifier::tdx] CCEL integrity check succeeded.
[2024-08-16T16:03:54Z ERROR kbs::http::error] Attestation failed: Verifier evaluate failed: TDX Verifier: failed to parse AA Eventlog from evidence

    Caused by:
        at least one line should be included in AAEL
```

Let's revert this for now, and then once we get this one fixed on
trustee side we'll update again.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-08-16 18:10:38 +02:00
Dan Mihai
c22ac4f72c genpolicy: add bind mounts for image volumes
Add bind mounts for volumes defined by docker container images, unless
those mounts have been defined in the input K8s YAML file too.

For example, quay.io/opstree/redis defines two mounts:
/data
/node-conf
Before these changes, if these mounts were not defined in the YAML file
too, the auto-generated policy did not allow this container image to
start.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-08-16 15:11:05 +00:00
Fabiano Fidêncio
b203f715e5
Merge pull request #10170 from beraldoleal/deploy-reset-fix
kata-deploy: fix kata-deploy reset
2024-08-16 16:51:14 +02:00
Fabiano Fidêncio
8d63723910
Merge pull request #10161 from microsoft/saulparedes/ignore_role_resource
genpolicy: ignore Role resource
2024-08-16 16:50:16 +02:00
Fabiano Fidêncio
6c58ae5b95
Merge pull request #10171 from fidencio/topic/ci-treat-nydus-snapshotter-as-a-dep
ci: nydus: Treat the snapshotter as a dependency
2024-08-16 16:39:48 +02:00
ChengyuZhu6
1eda6b7237 tests: update error message with guest pulling image timeout
update error message with guest pulling image timeout.

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-08-16 20:26:33 +08:00
ChengyuZhu6
ca05aca548 runtime: Add specific error message for gRPC request timeouts
Improved error handling to provide clearer feedback on request failures.

For example:
Improve createcontainer request timeout error message from
"Error: failed to create containerd task: failed to create shim task:context deadline exceed"
to "Error: failed to create containerd task: failed to create shim task: CreateContainerRequest timed out: context deadline exceed".

Fixes: #10173 -- part II

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-08-16 20:24:48 +08:00
Beraldo Leal
b3a4cd1a06
Merge pull request #10172 from deagon/fix-typo
osbuilder: fix typo in ubuntu rootfs depends
2024-08-16 08:01:59 -04:00
Beraldo Leal
b843b236e4 kata-deploy: improve kata-deploy script
For the rare cases where containerd_conf_file does not exist, cp could fail
and let the pod in Error state. Let's make it a little bit more robust.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
2024-08-16 07:52:38 -04:00
ChengyuZhu6
aa31a9d3c4 tools: install luks-encrypt-storage script by guest-components
Install luks-encrypt-storage script by guest-components. So that we can maintain a single source and prevent synchronization issues.

Fixes: #10173 -- part I

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-08-16 16:28:20 +08:00