Commit Graph

10095 Commits

Author SHA1 Message Date
Fabiano Fidêncio
e07162e79d workflows: Fix action name
We have a few actions in the `payload-after-push.*.yaml` that are
referring to Confidential Containers, but they should be referring to
Kata Containers instead.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-02 10:17:18 +01:00
Fabiano Fidêncio
7286f8f706
Merge pull request #6391 from fidencio/topic/do-not-install-docker-as-part-of-the-actions
workflows: Do not install docker
2023-03-02 10:12:15 +01:00
Fabiano Fidêncio
7201279647
Merge pull request #6344 from fidencio/topic/generate-a-kata-deploy-payload-on-each-PR-merged
workflows: Publish kata-deploy payload after a merge
2023-03-02 09:02:34 +01:00
Chao Wu
2934ab4a3c
Merge pull request #6380 from Christopher-C-Robinson/#6256-typo-fix
src: Fixed typo mod.rs
2023-03-02 14:31:33 +08:00
Fabiano Fidêncio
bd1ed26c8d workflows: Publish kata-deploy payload after a merge
For the architectures we know that `make kata-tarball` works as
expected, let's start publishing the kata-deploy payload after each
merge.

This will help to:
* Easily test the content of current `main` or `stable-*` branch
* Easily bisect issues
* Start providing some sort of CI/CD content pipeline for those who
  need that

This is a forward-port work from the `CCv0` and groups together patches
that I've worked on, with the work that Choi did in order to support
different architectures.

Fixes: #6343

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-02 02:19:10 +01:00
Domesticcadiz
fea7e8816f runtime-rs: Fixed typo mod.rs
Fixed the typo in comment in the delete method located in mod.rs file.

Fixes: #6256.

Signed-off-by: Domesticcadiz <christopher.cadiz.robinson@gmail.com>
2023-03-01 18:03:41 -06:00
Archana Shinde
65fa19fe92
Merge pull request #6305 from amshinde/update-action-kernel-check
actions: Use `git-diff` to get changes in kernel dir
2023-03-01 13:46:50 -08:00
Fabiano Fidêncio
828d467222 workflows: Do not install docker
The latest ubuntu runners already have docker installed and trying to
install it manually will cause the following issue:
```
Run curl -fsSL https://test.docker.com/ -o test-docker.sh
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
+ sudo -E sh -c apt-get update -qq >/dev/null
E: The repository 'https://packages.microsoft.com/ubuntu/22.04/prod jammy Release' is no longer signed.
```

Fixes: #6390

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-28 23:53:28 +01:00
Steve Horsman
785310fe18
Merge pull request #6368 from yoheiueda/dir-perm
agent: don't set permission of existing directory in copy_file
2023-02-28 14:48:10 +00:00
Chelsea Mafrica
703589c279
Merge pull request #6369 from XDTG/6082/Fix-path-check-bypassed
runtime: use filepath.Clean() to clean the mount path
2023-02-27 17:24:50 -08:00
Bo Chen
ba9227184e
Merge pull request #6376 from likebreath/0224/clh_v30.0
Upgrade to Cloud Hypervisor v30.0
2023-02-27 11:48:52 -08:00
Bin Liu
e90989b16b
Merge pull request #6314 from openanolis/static_doc
feat(runtime): make static resource management consistent with 2.0
2023-02-27 16:43:27 +08:00
Bo Chen
3ac6f29e95 runtime: clh: Re-generate the client code
This patch re-generates the client code for Cloud Hypervisor v30.0.
Note: The client code of cloud-hypervisor's OpenAPI is automatically
generated by openapi-generator.

Fixes: #6375

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-02-24 10:20:29 -08:00
Bo Chen
262daaa2ef versions: Upgrade to Cloud Hypervisor v30.0
Details of this release can be found in our new roadmap project as
iteration v30.0: https://github.com/orgs/cloud-hypervisor/projects/6.

Fixes: #6375

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-02-24 10:19:46 -08:00
XDTG
dc86d6dac3 runtime: use filepath.Clean() to clean the mount path
Fix path check bypassed issuse introduced by #6082,
use filepath.Clean() to clean path before check

Fixes: #6082

Signed-off-by: XDTG <click1799@163.com>
2023-02-24 15:48:09 +08:00
Yohei Ueda
c4ef5fd325
agent: don't set permission of existing directory
This patch fixes the issue that do_copy_file changes
the directory permission of the parent directory of
a target file, even when the parent directory already
exists.

Fixes #6367

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2023-02-24 16:43:59 +09:00
Fabiano Fidêncio
44a780f262
Merge pull request #6262 from jepio/jepio/initrd-dev-nodes
osbuilder: Include minimal set of device nodes in ubuntu initrd
2023-02-22 20:34:13 +01:00
GabyCT
a0b1f81867
Merge pull request #5958 from Apokleos/kata-ctl-exec
kata-ctl/exec: add new command exec to enter guest VM.
2023-02-22 12:07:44 -06:00
Fabiano Fidêncio
109071855d
Merge pull request #6124 from Alex-Carter01/snp-kernel-config
kernel: Add CONFIG_SEV_GUEST to SEV kernel config
2023-02-22 18:42:35 +01:00
David Esparza
5e2fe5f932
Merge pull request #6332 from jodh-intel/runtime-rs-ch-config-convert
runtime-rs: Improve Cloud Hypervisor config handling
2023-02-22 10:15:50 -06:00
GabyCT
5c6e56931f
Merge pull request #6312 from Amulyam24/virtiofsd-fix
virtiofsd: update to a valid path on ppc64le
2023-02-22 08:57:51 -06:00
James O. D. Hunt
3483272bbd runtime-rs: ch: Enable initrd usage
Allow an initrd/initramfs image to be used with Cloud Hypervisor, which
is handled differently to the default rootfs image type.

Fixes: #6335.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-02-22 10:55:01 +00:00
James O. D. Hunt
fbee6c820e runtime-rs: Improve Cloud Hypervisor config handling
Replace `cloud_hypervisor_vm_create_cfg()` with a set of `TryFrom` trait
implementations in the new CH specific `convert.rs` to allow the generic
`Hypervisor` configuration to be converted into the CH specific
`VmConfig` type.

Note that device configuration is not currently handled in `convert.rs`
(it's handled in `inner_device.rs`).

This change removes the old hard-coded CH specific configuration.

Fixes: #6203.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-02-22 10:48:05 +00:00
Chao Wu
578f2e7c2e
Merge pull request #6080 from openanolis/rem
runtime-rs: cleanup kata host share path
2023-02-22 17:45:24 +08:00
GabyCT
7aff118c82
Merge pull request #6236 from jepio/jepio/osbuilder-fix-default-make-target
osbuilder: fix default build target in makefile
2023-02-21 17:00:21 -06:00
Alex Carter
1bff1ca30a kernel: Add CONFIG_SEV_GUEST to SEV kernel config
Adding kernel config to sev case since it is needed for SNP and SNP will use the SEV kernel.
Incrementing kernel config version to reflect changes

Fixes: #6123
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2023-02-21 16:48:45 +00:00
GabyCT
fc5c62a5a1
Merge pull request #6330 from c3d/issue/6329-contribution-link-in-devguide
devguide: Add link to the contribution guidelines
2023-02-21 09:17:20 -06:00
Fabiano Fidêncio
ab5b45f615
Merge pull request #6340 from fidencio/topic/ensure-go-binaries-can-still-run-on-ubuntu-2004
kata-deploy: Ensure go binaries can run on Ubuntu 20.04
2023-02-21 13:52:18 +01:00
Zhongtao Hu
4f20cb7ced
Merge pull request #6325 from HerlinCoder/herlincoder/config-manager
dragonball: config_manager: preserve device when update
2023-02-21 17:51:41 +08:00
SinghWang
b4a1527aa6 kata-deploy: Fix static shim-v2 build on arm64
Following Jong Wu suggestion, let's link /usr/bin/musl-gcc to
/usr/bin/aarch64-linux-musl-gcc.

Fixes: #6320
Signed-off-by: SinghWang <wangxin_0611@126.com>
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-21 10:00:28 +01:00
Fabiano Fidêncio
2c4f8077fd Revert "shim-v2: Bump Ubuntu container image to 22.04"
This reverts commit 9d78bf9086.

Golang binaries are built statically by default, unless linking against
CGO, which we do.  In this case we dynamically link against glibc,
causing us troubles when running a binary built with Ubuntu 22.04 on
Ubuntu 20.04 (which will still be supported for the next few years ...)

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-21 10:00:28 +01:00
Fabiano Fidêncio
73d0ca0bd5
Merge pull request #6334 from fidencio/topic/fix-push-to-registry-behaviour
Revert "workflows: Push the builder image to quay.io"
2023-02-21 10:00:13 +01:00
Bin Liu
5c16e98d4f
Merge pull request #6322 from Tim-Zhang/remove-remain-unsafe-impl
Remove all remaining unsafe impl
2023-02-21 14:08:05 +08:00
Fabiano Fidêncio
afaccf924d Revert "workflows: Push the builder image to quay.io"
This reverts commit b835c40bbd.

Right now I'm reverting this one as this should only run *after* commits
get pushed to our repo, not on very PR.
2023-02-20 18:37:28 +01:00
Fabiano Fidêncio
b1fd4b093b
Merge pull request #6319 from singhwang/main
kata-deploy: Fix building the kata static firecracker arm64 package occurred an error
2023-02-20 18:04:31 +01:00
Christophe de Dinechin
4c39c4ef9f devguide: Add link to the contribution guidelines
New developers are often confused by some of our requirements, notably porting
labels. While our CONTRIBUTING.md file points to the solution, the developer's
guide does not. Add a link there.

Fixes: #6329

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-02-20 15:27:19 +01:00
Fabiano Fidêncio
a3b615919e
Merge pull request #6323 from fidencio/topic/fix-make-shim-v2-tarball-on-aarch64
shim-v2: Bump Ubuntu container image  to 22.04
2023-02-20 14:57:34 +01:00
Jeremi Piotrowski
76e926453a osbuilder: Include minimal set of device nodes in ubuntu initrd
When starting an initrd the kernel expects to find /dev/console in the initrd,
so that it can connect it as stdin/stdout/stderr to the /init process. If the
device node is missing the kernel will complain that it was unable to open an
initial console. If kata-agent is the initrd init process, it will also result
in log messages not being logged to console and thus not forwarded to host
syslog.

Add a set of standard device nodes for completeness, so that console logging
works. To do that we install the makedev packge which provides a MAKEDEV helper
that knows the major/minor numbers. Unfortunately the debian package tries to
create devnodes from postinst, which can be suppressed if systemd-detect-virt
is present. That's why we create a small dummy script that matches what
systemd-detect-virt would output (anything is enough to suppress mknod).

Fixes: #6261
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-02-20 11:15:56 +01:00
Fabiano Fidêncio
6a0ac2b3a5
Merge pull request #6310 from kata-containers/topic/cache-artefacts-container-builder
packaging: Cache the container used to build the kata-deploy artefacts
2023-02-20 11:02:53 +01:00
James O. D. Hunt
0dea57c452
Merge pull request #6309 from gabevenberg/always-check-deps
utils: always check some dependencies.
2023-02-20 08:31:56 +00:00
SinghWang
697ec8e578 kata-deploy: Fix kata static firecracker arm64 package build error
When building the kata static arm64 package, the stages of firecracker report errors.

Fixes: #6318
Signed-off-by: SinghWang <wangxin_0611@126.com>
2023-02-20 16:10:18 +08:00
Helin Guo
ced3c99895 dragonball: config_manager: preserve device when update
DeviceConfigInfo contains config and device, so when we want to do
update we could simply update config part of the info, and device would
not be changed during update.

Fixes: #6324

Signed-off-by: Helin Guo <helinguo@linux.alibaba.com>
2023-02-20 14:34:09 +08:00
Tim Zhang
da8a6417aa runtime-rs: remove all remaining unsafe impl
Fixes: #6307

Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-02-20 14:29:59 +08:00
Tim Zhang
0301194851 dragonball: use crossbeam_channel in VmmService instead of mpsc::channel
Because crossbeam_channel has more features and better performance than
mpsc::channel and finally rust replace its channel implementation with
crossbeam_channel on version 1.67

Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-02-20 14:29:57 +08:00
Fabiano Fidêncio
9d78bf9086 shim-v2: Bump Ubuntu container image to 22.04
Let's bump the base container image to use the 22.04 version of Ubuntu,
as it does bring up-to-date package dependencies that we need to
statically build the runtime-rs on aarch64.

Fixes: #6320

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-20 07:14:09 +01:00
Fabiano Fidêncio
299fc35c37
Merge pull request #6304 from fidencio/topic/switch-the-default-x86_64-rootfs-image-to-ubuntu
versions: Use ubuntu as the default distro for the rootfs-image
2023-02-17 19:29:10 +01:00
Gabe Venberg
3cfce5a709 utils: improved unsupported distro message.
previously, if installing on unkown distro, script would tell user that
their distro was unsupported. Changed error message prompting user to
install dependecies manually, then retry.

Signed-off-by: Gabe Venberg <gabevenberg@gmail.com>
2023-02-17 09:06:26 -06:00
Bin Liu
f44dae75c9
Merge pull request #6267 from jongwooo/github-action/replace-deprecated-command-with-environment-file
github-action: Replace deprecated command with environment file
2023-02-17 22:54:12 +08:00
Fabiano Fidêncio
6a29088b81
Merge pull request #6298 from amshinde/update-release-doc
docs: Change the order of release step
2023-02-17 15:46:12 +01:00
Ji-Xinyou
919d19f415 feat(runtime): make static resource management consistent with 2.0
* add doc in the configuration
* make entry consistent with 2.0

Fixes: #6313
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
2023-02-17 21:36:56 +08:00