Commit Graph

10056 Commits

Author SHA1 Message Date
Jeremi Piotrowski
ad8968c8d9 rustjail: print type of cgroup manager
Since the cgroup manager is wrapped in a dyn now, the print in
LinuxContainer::new has been useless and just says "CgroupManager". Extend the
Debug trait for 'dyn Manager' to print the type of the cgroup manager so that
it's easier to debug issues.

Fixes: #5779
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-02-21 10:07:03 +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
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
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
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
Bin Liu
b7fe29f033
Merge pull request #6308 from Tim-Zhang/remove-unnecessary-send-and-sync
runtime-rs: remove unnecessary Send/Sync trait implement
2023-02-17 19:53:54 +08:00
Fabiano Fidêncio
b835c40bbd workflows: Push the builder image to quay.io
Let's push the builder images to a registry, so we can take advantage of
those on each step of our building process.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
781ed2986a packaging: Allow passing a container builder to the scripts
This, combined with the effort of caching builder images *and* only
performing the build itself inside the builder images, is the very first
step for reproducible builds for the project.

Reproducible builds are quite important when we talk about Confidential
Containers, as users may want to verify the content used / provided by
the CSPs, and this is the first step towards that direction.

Fixes: #5517

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
45668fae15 packaging: Use existing image to build td-shim
Let's first try to pull a pre-existing image, instead of building our
own, to be used as a builder image for the td-shim.

This will save us some CI time.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
e8c6bfbdeb packaging: Use existing image to build td-shim
Let's first try to pull a pre-existing image, instead of building our
own, to be used as a builder image for the td-shim.

This will save us some CI time.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
3fa24f7acc packaging: Add infra to push the OVMF builder image
Let's add the needed infra for building and pushing the OVMF builder
image to the Kata Containers' quay.io registry.

Fixes: #5477

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
f076fa4c77 packaging: Use existing image to build OVMF
Let's first try to pull a pre-existing image, instead of buildinf our
own, to be used as a builder image for OVMF.

This will save us some CI time.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
c7f515172d packaging: Add infra to push the QEMU builder image
Let's add the needed infra for only building and pushing the QEMU
builder image to the Kata Containers' quay.io registry.

Fixes: #5481

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
fb7b86b8e0 packaging: Use existing image to build QEMU
Let's first try to pull a pre-existsing image, instead of building our
own, to be used as a builder image for QEMU.

This will save us some CI time.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
d0181bb262 packaging: Add infra to push the virtiofsd builder image
Let's add the needed infra for only building and pushing the virtiofsd
builder image to the Kata Containers' quay.io registry.

Fixes: #5480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
7c93428a18 packaging: Use existing image to build virtiofsd
Let's first try to pull a pre-existing image, instead of building our
own, to be used as a builder image for the virtiofsd.

This will save us some CI time.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
8c227e2471 virtiofsd: Pass the expected toolchain to the build container
Let's ensure we're building virtiofsd with a specific toolchain that's
known to not cause any issues, instead of always using the latest one.

On each bump of the virtiofsd, we'll make sure to adjust this according
to what's been used by the virtiofsd community.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:48 +01:00
Fabiano Fidêncio
7ee00d8e57 packaging: Add infra to push the shim-v2 builder image
Let's add the needed infra for only building and pushing the shim-v2
builder image to the Kata Containers' quay.io registry.

Fixes: #5478

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:47 +01:00
Fabiano Fidêncio
24767d82aa packaging: Use existing image to build the shim-v2
Let's try to pull a pre-existing image, instead of building our own, to
be used as a builder for the shim-v2.

This will save us some CI time.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 12:06:24 +01:00
Fabiano Fidêncio
6c3c771a52 packaging: Add infra to push the kernel builder image
Let's add the needed infra for only building and pushing the kernel
builder image to the Kata Containers' quay.io registry.

Fixes: #5476

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 11:30:28 +01:00
Fabiano Fidêncio
b9b23112bf packaging: Use existing image to build the kernel
Let's first try to pull a pre-existing image, instead of building our
own, to be used as a builder image for the kernel.

This will save us some CI time.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 11:30:28 +01:00
Fabiano Fidêncio
869827d77f packaging: Add push_to_registry()
This function will push a specific tag to a registry, whenever the
PUSH_TO_REGISTRY environment variable is set, otherwise it's a no-op.

This will be used in the future to avoid replicating that logic in every
builder used by the kata-deploy scripts.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 11:30:21 +01:00
Fabiano Fidêncio
e69a6f5749 packaging: Add get_last_modification()
Let's add a function to get the hash of the last commit modifying a
specific file.

This will help to avoid writing `git rev-list ...` into every single
build script used by the kata-deploy.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 10:39:33 +01:00
Fabiano Fidêncio
6c05e5c67a packaging: Add and export BUILDER_REGISTRY
BUILD_REGISTRY, which points to quay.io/kata-containers/builder, will be
used for storing the builder images used to build the artefacts via the
kata-deploy scripts.

The plan is to tag, whenever it's possible and makes sense, images like:
* ${BUILDER_REGISTRY}:${component}-${unique_identifier}

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-17 10:39:33 +01:00
Fabiano Fidêncio
bd9af5569f
Merge pull request #6296 from fidencio/topic/dont-build-runtime-rs-for-ppc64le-2nd-try
runtime-rs: Don't build on Power, don't break on Power.
2023-02-17 10:08:39 +01:00
Gabe Venberg
1047840cf8 utils: always check some dependencies.
Every dependency in check_deps is used inside the script (apart from
git, which may be a historical artifact), and therefore should be
checked even when the -f option is passed to the script. Simply changed
at what point check_deps is called in order to always run it.

Fixes #6302.

Signed-off-by: Gabe Venberg <gabevenberg@gmail.com>
2023-02-16 23:00:19 -06:00
Tim Zhang
95e3364493 runtime-rs: remove unnecessary Send/Sync trait implement
Send and Sync are automatically derived traits,
if a type is composed entirely of Send or Sync types, then it is Send or Sync.
Almost all primitives are Send and Sync,
so we don't need to implement them manually most of the time.

Fixes: #6307

Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-02-17 11:51:13 +08:00
Archana Shinde
619ef54452 docs: Change the order of release step
When a new stable branch is created, it is necessary to change the
references in the tests repo from main to the new stable branch.

However this step needs to be performed after the repos have been tagged
as the `tags_repos.sh` script is the one that creates the new branch.
Clarify this in the documentation and move the step to change branch
references in test repo after repos have been tagged.

Fixes: #1824

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-02-16 12:12:21 -08:00
Fabiano Fidêncio
a161d11920 versions: Use ubuntu as the default distro for the rootfs-image
Currently ubuntu is already the default distro for all the architectures
but x86_64, which uses clearlinux.  However, our CI does *not* test the
clearlinux image we ship.

Taking a look at our CI code [0], we've been using ubuntu as base for
the tests for a few years already, if not forever.

The minimum we can do is to switch to distributing ubuntu, as the tested
rootfs-image, and then decide later on whether we should switch back to
clearlinux (once we switch our CI to using that, and make sure all tests
will be green), or if we move to slimmer distro, such as alpine.

[0]: 0a39dd1a01/.ci/install_kata_image.sh (L44)

Fixes: #6303

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-16 20:30:40 +01:00
Fabiano Fidêncio
be40683bc5 runtime-rs: Add a generic powerpc64le-options.mk
There's a check in the runtime-rs Makefile that basically checks whether
the `arch/$arch-options.mk` exists or not and, if it doesn't, the build
is just aborted.

With this in mind, let's create a generic powerpc64le-options.mk file
and not bail when building for this architecture.

Fixes: #6142

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-16 16:29:24 +01:00
Fabiano Fidêncio
47c058599a packaging/shim-v2: Install the target depending on the arch/libc
In the `install_go_rust.sh` file we're adding a
x86_64-unknown-linux-musl target unconditionally.  That should be,
instead, based in the ARCH of the host and the appropriate LIBC to be
used with that host.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-02-16 16:29:24 +01:00
Fabiano Fidêncio
c1602c848a
Merge pull request #6300 from openanolis/footloose
runtime-rs: handle sys_dir bind volume
2023-02-16 12:53:15 +01:00
Yushuo
07802a19dc runtime-rs: handle sys_dir bind volume
For some cases, users will mount system directories as bind volume.
We should not bind mount these kind of directories in the host as it does
not make sense.

Fixes: #6299

Signed-off-by: Yushuo <y-shuo@linux.alibaba.com>
2023-02-16 15:45:33 +08:00
Bin Liu
629a31ec6e
Merge pull request #6287 from lifupan/main
sandbox: set the dns for the sandbox
2023-02-16 15:00:01 +08:00
Fabiano Fidêncio
f5b28736ce
Merge pull request #6294 from fidencio/topic/only-change-configs-if-the-config-files-exist
packaging/shim-v2: Only change the config if the file exists
2023-02-16 07:13:28 +01:00
Fupan Li
04e930073c sandbox: set the dns for the sandbox
The rust agent had supported to set the guest dns
server in start sandbox request, thus add the dns
in the runtime side.

Fixes:#6286

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2023-02-16 11:25:02 +08:00
Fupan Li
32ebe1895b agent: fix the issue of creating the dns file
We should make sure the dns's source file's parent
directory exist, otherwise, it would failed to create
the file directly.

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2023-02-16 11:24:54 +08:00
Peng Tao
139ad8e95f
Merge pull request #6201 from jodh-intel/runtime-rs-add-cloud-hypervisor
runtime-rs: Add basic CH implementation
2023-02-16 11:23:04 +08:00
Archana Shinde
eba2bb275d
Merge pull request #6284 from amshinde/revert-kata-deploy-changes-after-3.1.0-rc0-release
release: Revert kata-deploy changes after 3.1.0-rc0 release
2023-02-15 14:50:12 -08:00