Commit Graph

12337 Commits

Author SHA1 Message Date
Aurélien Bombo
af16d3fca4 gha: Unbreak CI and fix cluster creation step
This fixes the regression introduced by #6686 by properly injecting the
`--os-sku mariner --workload-runtime KataMshvVmIsolation` flags.

Error reference:
https://github.com/kata-containers/kata-containers/actions/runs/5111460297/jobs/9188819103

Fixes: #6982

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-05-29 13:32:47 -07:00
Zhongtao Hu
099b4b0d0e
Merge pull request #6598 from Apokleos/sandbox_bind_mounts
runtime-rs/sandbox_bindmounts: add support for sandbox bindmounts
2023-05-28 12:00:39 +08:00
Zhongtao Hu
cb962b0dc9
Merge pull request #6702 from Apokleos/directvol-common
runtime-rs/kata-ctl: Enhancement of DirectVolumeMount.
2023-05-28 12:00:12 +08:00
Fabiano Fidêncio
44546a4a57
Merge pull request #6686 from sprt/sprt/mariner-ci
gha: Create Mariner host as part of k8s tests
2023-05-27 05:34:28 +02:00
Yohei Ueda
5cb8221977
kata-deploy-cc: Ignore annotations in kata-remote
Pod annotations (io.katacontainers.*) are not meaningful
for the remote hypervisor. This patch disables pod annotations
in the kata-remote settings of the containerd configuration.

Fixes: #6345
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2023-05-26 17:04:21 +09:00
stevenhorsman
cd118ae216 versions: Clean up qemu
- Remove not-needed qemu-tdx-experimental

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-26 07:58:04 +01:00
alex.lyn
5ddc4f94c5 runtime-rs/kata-ctl: Enhancement of DirectVolumeMount.
Move the get_volume_mount_info to kata-types/src/mount.rs.
If so, it becomes a common method of DirectVolumeMountInfo
and reduces duplicated code.

Fixes: #6701

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-05-26 11:18:29 +08:00
Fupan Li
25d2fb0fde agent: fix the issue of exec hang with a backgroud process
When run a exec process in backgroud without tty, the
exec will hang and didn't terminated.

For example:

crictl -i <container id> sh -c 'nohup tail -f /dev/null &'

Fixes: #4747

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2023-05-26 10:56:46 +08:00
Tim Zhang
5231aff90f
Merge pull request #6860 from lifupan/main
netlink: Fix the issue of update_interface
2023-05-26 10:54:07 +08:00
Aurélien Bombo
4af4ced1aa gha: Create Mariner host as part of k8s tests
The current testing setup only supports running Kata on top of an Ubuntu
host. This adds Mariner to the matrix of testable hosts for k8s
tests, with Cloud Hypervisor as a VMM.

As preparation for the upcoming PR that will change only the actual test
code (rather than workflow YAMLs), this also introduces a new file
`setup.sh` that will be used to set host-specific parameters at test
run-time.

Fixes: #6961

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-05-25 14:29:46 -07:00
stevenhorsman
38e7c2be62 doc: Update ccv0.sh to reflect changes
- Update prefix
- Add new requirement environment variables
- Use new ci scripts

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-25 20:09:36 +01:00
stevenhorsman
0032b8bfbf static_build: sev ovmf
- Update sev omvf to use main code base

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-25 19:36:25 +01:00
stevenhorsman
66ca2f1bc4 qemu: static-check disable
Disable gocyclo on large complex function in CCv0 branch

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-25 17:05:16 +01:00
stevenhorsman
c87c8ffce5 runtime: Fix bad merge
- Re-add removed CC features from sandbox.go

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-25 16:30:01 +01:00
Fabiano Fidêncio
59cefa719c
Merge pull request #6965 from fidencio/topic/gha-increase-aks-creation-waiting-time
gha: Increase timeout for AKS jobs and give more time to start running the tests
2023-05-25 17:23:17 +02:00
GabyCT
4ab93e662c
Merge pull request #6963 from dborquez/CCv0
kata-deploy: Remove trailing and leading white spaces in kata-deploy-binaries.sh
2023-05-25 09:22:18 -06:00
stevenhorsman
33143eb342 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: kata-containers#5645
Depends-on: github.com/kata-containers/kata-containers#6885

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-25 16:17:59 +01:00
Greg Kurz
837f7a2fe6
Merge pull request #6959 from beraldoleal/issues/6757
runtime: sending SIGKILL to qemu
2023-05-25 16:24:37 +02:00
alex.lyn
eee7aae71d runtime-rs/sandbox_bindmounts: add support for sandbox bindmounts
sandbox_bind_mounts supports kinds of mount patterns, for example:

(1) "/path/to", default readonly mode.
(2) "/path/to:ro", same as (1).
(3) "/path/to:rw", readwrite mode.

Both support configuration and annotation:
(1)[runtime]
sandbox_bind_mounts=["/path/to", "/path/to:rw", "/mnt/to:ro"]
(2) annotation will alse be supported, restricted as below:
io.katacontainers.config.runtime.sandbox_bind_mounts
                         = "/path/to /path/to:rw /mnt/to:ro"

Fixes: #6597

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-05-25 20:00:25 +08:00
Fupan Li
62b2838962
Merge pull request #6846 from ZhangShuaiyi/DeviceMgrMethod
dragonball: convert BlockDeviceMgr and VirtioNetDeviceMgr functions to methods
2023-05-25 18:11:44 +08:00
Steve Horsman
ba263d2b04
Merge pull request #6956 from stevenhorsman/kata-deploy-cc-fixes
kata-deploy-cc: Port fixes
2023-05-25 10:26:21 +01:00
QuanweiZhou
377b7735f5
Merge pull request #6872 from justxuewei/rm-virtio-devices
dragonball: Remove virtio-net and vsock devices gracefully
2023-05-25 17:08:36 +08:00
Fabiano Fidêncio
3d5d6eb361
Merge pull request #6958 from fidencio/topic/kata-deploy-improve-backup-restore
kata-deploy: Improve shim backup / restore
2023-05-25 10:54:06 +02:00
Fabiano Fidêncio
3f0735a7e8
Merge pull request #6952 from stevenhorsman/git-clone-doc-fix
doc: Update git commands
2023-05-25 10:36:08 +02:00
Fabiano Fidêncio
557b840814 gha: aks: Wait longer to start running the tests
We're still facing issues related to the time taken to deploy the
kata-deplot daemonset and starting to run the tests.

Ideally, we should solve this with a readiness probe, and that's the
approach we want to take in the future.  However, for now, let's just
make sure those tests are not on the way of the community.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-25 10:13:19 +02:00
Fabiano Fidêncio
c04c872c42 gha: aks: Increase the timeout time
We've seen tests being aborted close to the end of the run due to the
timeout.  Let's increase it, avoiding to hit such cases again..

Fixes: #6964

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-25 10:13:08 +02:00
David Esparza
fb40ad37a9
kata-deploy: Remove trailing and leading white spaces in kata-deploy-binaries
This PR removes unwanted white spaces in order to fix the format
of the kata-deploy-binaries script.

Fixes: #6962

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-05-24 17:35:16 -06:00
GabyCT
8d98484230
Merge pull request #6926 from GabyCT/topic/fixtabsmerge
kata-deploy: Fix indentation on kata deploy merge script
2023-05-24 14:55:51 -06:00
Steve Horsman
499ec324a9
Merge pull request #6933 from fidencio/topic/cc-fix-image-used-with-qemu-tdx
CC | runtime: config: Fix image path for QEMU TDX
2023-05-24 21:15:28 +01:00
Fabiano Fidêncio
370811b017 runtime: Fix TDVF configuration with QEMU TDX
Instead of setting:
```
firmware = "/path/to/OVMF.fd"
firmware_volume = "/path/to/OVMF_VARS.fd"
```

We should either be setting:
```
firmware = "/path/to/OVMF.fd"
```
Or:

```
firmware = "/path/to/OVMF_CODE.fd"
firmware_volume = "/path/to/OVMF_VARS.fd"
```

I'm taking the approach to setting up the latter, as that's what's been
tested as part of our TDX CI.

Fixes: #4926

This patch is the same as #4927, but it ended up reverted somewhere in
the CCv0 -> main process, or in the attempts to fix TDX after that.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-24 19:01:44 +02:00
Fabiano Fidêncio
428041624a kata-deploy: Improve shim backup / restore
We're currently backing up and restoring all the possible shim files,
but the default one ("containerd-shim-kata-v2").

Let's ensure this is also backed up and restored.

Fixes: #6957

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-24 18:39:27 +02:00
stevenhorsman
b1fc929191 kata-deploy-cc: Port fixes
Port over fixes from `kata-deploy` into `kata-deploy-cc`
- https://github.com/kata-containers/kata-containers/pull/6829
- https://github.com/kata-containers/kata-containers/pull/6913
- https://github.com/kata-containers/kata-containers/pull/6648

Fixes: #6955
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-24 17:14:03 +01:00
Gabriela Cervantes
14c3f1e9f5 kata-deploy: Fix indentation on kata deploy merge script
This PR fixes the indentation on the kata deploy merge script
that instead of single spaces uses a tap.

Fixes #6925

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-05-24 16:01:10 +00:00
Beraldo Leal
0e47cfc4c7 runtime: sending SIGKILL to qemu
There is a race condition when virtiofsd is killed without finishing all
the clients. Because of that, when a pod is stopped, QEMU detects
virtiofsd is gone, which is legitimate.

Sending a SIGTERM first before killing could introduce some latency
during the shutdown.

Fixes #6757.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
2023-05-24 11:31:28 -04:00
stevenhorsman
6a0035e419 doc: Update git commands
Fix bad migrations from `go get` to `git clone` and update the cloned
directory path

Fixes: #6951
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-24 13:16:48 +01:00
Fabiano Fidêncio
7c9faab523
Merge pull request #6947 from fidencio/topic/gha-release-fix-payload-tagging
gha: release: Simplify the process for tagging the payload
2023-05-24 11:22:09 +02:00
Fabiano Fidêncio
f636c1f8a4 gha: release: Simplify the process for tagging the payload
We previously were doing:
* Create a new image on kata-deploy-ci using the commit hash of the
  latest tag
  * This was used to test on AKS, which is no longer needed as we test
    on AKS on every PR
* Create a new image on kata-deploy using the release tag and "latest"
  or "stable", by tagging the kata-deploy-ci image accordingly

As part of cfe63527c5, we broke the
workflow described above, as in the first step we would save the PKG_SHA
to be used in the second step, but that part ended up being removed.

Anyways, this back and forth is not needed anymore and we can simplify
the process by doing:
* Create a new image on kata-deploy, using:
  - The tag received as ref from the event that triggered this worklow
  - "latest" or "stable" tag, depending on whether it's a stable release
    or not

Fixes: #6946

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-24 08:54:43 +02:00
Fabiano Fidêncio
efb0ac55c8 runtime: config: tdx: Enable service_offload
This also as mistakenly overwritten by the `main` -> `CCv0` merge.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-24 07:57:49 +02:00
Fabiano Fidêncio
8b4b233358 runtime: config: Fix image path for QEMU TDX
The rebase from `main` to `CCv0` ended up overwriting the image path
that should be used for QEMU, in the CCv0 branch.

Fixes: #6932

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-24 07:57:22 +02:00
Fabiano Fidêncio
01827911f4
Merge pull request #6943 from fidencio/topic/gha-login-dont-specify-the-registry-if-using-docker-io
gha: release: login-action: Don't specify docker.io registry
2023-05-24 07:33:12 +02:00
Fabiano Fidêncio
1c9ad4435a
Merge pull request #6939 from GabyCT/topic/updatenydus
versions: Update nydus version to 2.2.1
2023-05-24 00:12:57 +02:00
Fabiano Fidêncio
d10c9be603 gha: release: login-action: Don't specify docker.io registry
For some bizarre reason, the login-action will simply fail to
authenticate to docker.io in it's specified as a registry.  The way to
proceed, instead, is to *not* specify any registry as it'd be used by
default.

Fixes: #6943

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-23 22:38:12 +02:00
Fabiano Fidêncio
9aae333343
Merge pull request #6871 from kmjohansen/bugfix/ptmx
runtime: make debug console work with sandbox_cgroup_only
2023-05-23 22:24:51 +02:00
Fabiano Fidêncio
df77fefce8
Merge pull request #6941 from fidencio/3.2.0-alpha3-branch-bump
# Kata Containers 3.2.0-alpha3
2023-05-23 22:21:03 +02:00
Fabiano Fidêncio
585edca06d
Merge pull request #6931 from stevenhorsman/ccv0-cherry-pick-build-script
Ccv0 cherry pick build script
2023-05-23 19:59:02 +02:00
Fabiano Fidêncio
c54363114d release: Kata Containers 3.2.0-alpha3
- release: Fix `docker/login-action` version

f3702268d release: Fix `docker/login-action` version

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-23 18:39:16 +02:00
Fabiano Fidêncio
c7a77f980b
Merge pull request #6935 from fidencio/topic/release-fix-docker-login-action-version
release: Fix `docker/login-action` version
2023-05-23 18:35:03 +02:00
Gabriela Cervantes
0b1c5ea5bb versions: Update nydus version to 2.2.1
This PR updates the nydus version to 2.2.1. This change includes:
nydus-image: fix a underflow issue in get_compressed_size()
backport fix/feature to stable 2.2
[backport] contrib: upgrade runc to v1.1.5
service: add README for nydus-service
nydus: fix a possible panic caused by SubCmdArgs::is_present
Backports two bugfixes from master into stable/v2.2
[backport stable/v2.2] action: upgrade golangci-lint to v1.51.2
[backport] action: fix smoke test for branch pattern

Fixes #6938

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-05-23 15:39:04 +00:00
Fabiano Fidêncio
248aa0cb8c
Merge pull request #6927 from stevenhorsman/ccv0-cherry-pick-fedora-bump
CC | osbuilder: Bump fedora image version
2023-05-23 16:22:27 +02:00
Fabiano Fidêncio
f3702268d1 release: Fix docker/login-action version
`docker/login-action@v3` does *not* exist and `docker/login-action@v2`
should be used instead.

Fixes: #6934

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-23 14:11:03 +02:00