Commit Graph

8194 Commits

Author SHA1 Message Date
Gabriela Cervantes
1d68a08f4b docs: Update contributing link
This PR updates the contributing documentation link to the
one that is using kata 2.0

Fixes #3740

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-02-21 17:01:09 +00:00
Fabiano Fidêncio
e604f83c40
Merge pull request #3735 from fidencio/wip/kata-deploy-use-kata-with-qemu-as-the-default-shim-v2-binary
kata-deploy: Use (kata with) qemu as the default shim-v2 binary
2022-02-21 14:52:55 +01:00
Fabiano Fidêncio
1e9f3c856d
Merge pull request #3553 from fgiudici/kata-monitor_cachefix
kata-monitor: simplify sandbox cache management and attach kubernetes POD metadata to metrics
2022-02-21 13:17:22 +01:00
Peng Tao
031da99914
Merge pull request #3687 from luodw/nydus-clh
nydus: add lazyload support for kata with clh
2022-02-21 19:31:45 +08:00
James O. D. Hunt
67c3195c9c
Merge pull request #3721 from Amulyam24/kernel-fix
kernel: remove SYS_SUPPORTS_HUGETLBFS from powerpc fragments
2022-02-21 09:10:21 +00:00
Fabiano Fidêncio
11220f052f kata-deploy: Use (kata with) qemu as the default shim-v2 binary
When using kata-deploy, no `containerd-shim-kata-v2` binary is deployed,
but we do deploy a `kata` runtime class, which seems very much
incosistent.

As the default configuration for kata-containers points to QEMU, let's
also use kata with QEMU as the default shim-v2 binary.

Fixes: #3228, #3734

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-21 10:03:47 +01:00
luodaowen.backend
3175aad5ba virtiofs-nydus: add lazyload support for kata with clh
As kata with qemu has supported lazyload, so this pr aims to
bring lazyload ability to kata with clh.

Fixes #3654

Signed-off-by: luodaowen.backend <luodaowen.backend@bytedance.com>
2022-02-19 21:55:31 +08:00
James O. D. Hunt
a671b455a2
Merge pull request #3691 from Jakob-Naucke/fix-apply-patches
packaging: Use `patch` for applying patches
2022-02-18 15:51:05 +00:00
Archana Shinde
7db9bef72c
Merge pull request #3718 from Kvasscn/kata_dev_fix_utils_assert_msg
virtcontainers: Remove duplicated assert messages in utils test code
2022-02-18 06:07:16 -08:00
Amulyam24
8cc1b18636 kernel: remove SYS_SUPPORTS_HUGETLBFS from powerpc fragments
The name of SYS_SUPPORTS_HUGETLBFS has been changed to
ARCH_SUPPORTS_HUGETLBFS which is being selected on default
by another kernel config.
More info- 855f9a8e87
Change applicable from v5.13.

Fixes: #3720

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2022-02-18 18:06:50 +05:30
Jakob Naucke
5c9d2b413f
packaging: Use patch for applying patches
`tools/packaging/scripts/apply_patches.sh` uses `git apply $patch`, but
this will not apply to subdirectories. If one wanted to apply with
`git apply`, they'd have to run it with `--directory=...`
_relative to the Git tree's root_ (absolute will not work!). I suggest
we just use `patch`, which will do what we expected `git apply` would
do.

`patch` is also added to build containers that require it.

Fixes: #3690
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-02-18 11:32:17 +01:00
Tim Zhang
12e83a99ed
Merge pull request #3699 from liubin/fix/3698-add-nydus-snapshotter-to-versions
versions: add nydus-snapshotter
2022-02-18 17:42:58 +08:00
Fabiano Fidêncio
5b3fb6f83d kernel: Build SGX as part of the vanilla kernel
Let's take advantage of the fact that we've bumped to our kernel version
ot the 5.15 LTS and enable SGX by default, as it's present there.

Fixes: #3692

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-18 10:41:08 +01:00
Fabiano Fidêncio
2c35d8cb8e workflows: Stop building the experimental kernel
Let's stop building the experimental kernel as, currently, we have
all the needed contents as part of the vanilla kernel.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-18 10:41:08 +01:00
Fabiano Fidêncio
32e7845d31 snap: Build vanilla kernel for all arches
There's no need to build an experimental kernel for x86_64 as all the
bits which were part of the experimental one (SGX only, really) are now
part of the vanilla one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-18 10:41:08 +01:00
Samuel Ortiz
27de212fe1 runtime: Always add network endpoints from the pod netns
As the container runtime, we're never inspecting, adding or configuring
host networking endpoints.
Make sure we're always do that by wrapping addSingleEndpoint calls into
the pod network namespace.

Fixes #3661

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-18 10:37:07 +01:00
James O. D. Hunt
f324305004
Merge pull request #3710 from GabyCT/topic/ulimidoc
docs: Update limitations document
2022-02-18 09:20:09 +00:00
zhanghj
1cee0a9452 virtcontainers: Remove duplicated assert messages in utils test code
Remove duplicated strings in assert.Errorf() and assert.NoErrorf().

Fixes: #3714

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2022-02-18 16:45:05 +08:00
Gabriela Cervantes
6c1d149a5d docs: Update limitations document
This PR updates the limitations document by removing the docker
references belonged to kata 1.x and add as a limitation the
docker and podman support for kata 2.0

Fixes #3709

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-02-17 21:15:56 +00:00
Julio Montes
0b31b7ccc2
Merge pull request #3707 from devimc/2022-02-16/qemu-tdx
packaging: support qemu-tdx
2022-02-17 12:20:05 -06:00
Julio Montes
7c4ee6ec48 packaging/qemu: create no_patches file for qemu-tdx
create no_patches.txt file for qemu-tdx, this way we can build it
using packaging scripts

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-17 09:17:57 -06:00
Julio Montes
d47c488b58 versions: add qemu tdx section
define qemu tdx version and repo url

fixes #3706

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-17 09:03:17 -06:00
Julio Montes
8d3ace4a7d
Merge pull request #3675 from jodh-intel/kata-manager-fix-install
Kata manager fix install
2022-02-17 08:00:23 -06:00
Samuel Ortiz
77c29bfd3b container: Remove VFIO lazy attach handling
With the recently added VFIO fixes and support, we should not need that
anymore.

Fixes #3108

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-17 08:39:44 +01:00
bin
7241d618f1 versions: add nydus-snapshotter
Add nydus-snapshotter to versions.yaml to
install nydus-snapshotter from its own
releases.

Fixes: #3698

Signed-off-by: bin <bin@hyper.sh>
2022-02-17 14:09:20 +08:00
Peng Tao
9e618f1fb2
Merge pull request #3684 from fidencio/kernel-lts-5.15.x
versions: Linux 5.15.x
2022-02-17 10:25:28 +08:00
Fupan Li
8694af6d92
Merge pull request #3657 from liubin/fix/3656-add-make-check-for-tools
trace-forwarder/agent-ctl: run cargo fmt/clippy in make check
2022-02-17 10:05:16 +08:00
GabyCT
ced5e910d5
Merge pull request #3558 from jodh-intel/docs-rework-readme
docs: Improve top-level README
2022-02-16 16:28:14 -06:00
Fabiano Fidêncio
6f9685fbf5
Merge pull request #3624 from mdlayher/mdl-vsock
runtime: use github.com/mdlayher/vsock@v1.1.0
2022-02-16 23:11:47 +01:00
Fabiano Fidêncio
1f28e87e00
Merge pull request #3689 from fidencio/wip/clh-build-and-ship-a-tdx-capable-binary
tools: Build cloud-hypervisor with "--features tdx"
2022-02-16 21:52:55 +01:00
Fabiano Fidêncio
be2e90469a
Merge pull request #3669 from fidencio/wip/virtiofsd-use-announce-submounts
virtiofsd: Use "-o announce_submounts"
2022-02-16 16:43:18 +01:00
Fabiano Fidêncio
a6b4015130 tools: clh: Remove unused variables
Right now we're getting the info for the Cloud Hypervisor repo and
version, but we don't do anything with them, as those are not passed
down to the build script.

Morever, the build script itself gets the info from exactly the same
place when those are not passed, making those redundant.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-16 14:54:51 +01:00
Peng Tao
b4a1150638
Merge pull request #3344 from liubin/f/3342-hugepages-support
feature: hugepages support
2022-02-16 21:52:26 +08:00
Fabiano Fidêncio
5816c132ec tools: Build cloud-hypervisor with "--features tdx"
Right now TDx support on Cloud Hypervisor is gated behind a "--features
tdx" flag.  However, having TDx support enabled should not and does not
impact on the general usability of cloud-hypervisor.

As sooner than later we'll need kata-deploy binaries to be tested on a
CI that's TDx capable, for the confidential containers effort, let's
take the bullet and already enable it by default.

By the way, touching kata-deploy-binaries.sh as it's ensure the change
will be used in the following workflows:
* kata-deploy-push
* kata-deploy-test
* release

Fixes: #3688

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-16 14:51:15 +01:00
Carlos Venegas
e6060cb7c0 versions: Linux 5.15.x
Upgrade to new Linux kernel LTS version.

Fixes: #3576

Signed-off-by: Carlos Venegas <jose.carlos.venegas.munoz@intel.com>
2022-02-16 11:12:44 +01:00
James O. D. Hunt
9818cf7196 docs: Improve top-level and runtime README
Various improvements to the top-level README file:

- Moved the following sections from the runtime's README to the
  top-level README:
  - License
  - Platform support / Hardware requirements
- Added the following sections to the top-level README:
  - Configuration
  - Hypervisors
- Improved formatting of the Documentation section in the top-level
  README.
- Removed some unused named links from the top-level README.

Also improvements to the runtime README:

- Removed confusing mention of the old 1.x runtime name.
- Clarify the binary name for the 2.x runtime and the utility program.

> **Note:**
>
> We cannot currently link to the AMD website as that site's
> configuration causes the CI static checks to fail. See
> https://github.com/kata-containers/tests/issues/4401

Fixes: #3557.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-16 09:52:48 +00:00
Fabiano Fidêncio
d0c8eb7e14
Merge pull request #3673 from fidencio/wip/allow-passing-a-build-flag-to-cloud-hypervisor
tools: clh: Allow to set when to build from sources and the build flags passed down to cargo
2022-02-16 09:45:54 +01:00
bin
36c3fc12ce agent: support hugepages for containers
Mount hugepage directories and configure the requested number of hugepages
dynamically by writing to sysfs files

Port from:
78b307b5bd

Fixes: #3342

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Signed-off-by: bin <bin@hyper.sh>
2022-02-16 15:14:53 +08:00
bin
81a8baa5e5 runtime: add hugepages support
Add hugepages support, port from:
b486387cba

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Signed-off-by: bin <bin@hyper.sh>
2022-02-16 15:14:53 +08:00
bin
7df677c01e runtime: Update calculateSandboxMemory to include Hugepages Limit
Support hugepages and port from:
96dbb2e8f0

Fixes: #3342

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Signed-off-by: bin <bin@hyper.sh>
2022-02-16 15:14:37 +08:00
GabyCT
1dcb413e68
Merge pull request #3677 from GabyCT/topic/removedockerrun
docs: Remove docker run and shared memory from limitations
2022-02-15 15:04:36 -06:00
Fabiano Fidêncio
948a2b099c tools: clh: Ensure the download binary is executable
We're downloading the released cloud-hypervisor binary from GitHub, but
we should also ensure we set the binary as executable.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-15 20:23:46 +01:00
bin
72bf5496fd agent: handle hook process result
Current hook process is handled by just calling
unwrap() on it, sometime it will cause panic.

By handling all Result type and check the error can
avoid panic.

Fixes: #3649

Signed-off-by: bin <bin@hyper.sh>
2022-02-15 19:01:54 +01:00
bin
80e8dbf1f5 agent: valid envs for hooks
Envs contain null-byte will cause running hooks to panic,
this commit will filter envs and only pass valid envs to hooks.

Fixes: #3667

Signed-off-by: bin <bin@hyper.sh>
2022-02-15 19:01:54 +01:00
James O. D. Hunt
493ebc8ca5 utils: Update kata manager docs
Update the `kata-manager.sh` README to recommend users view the
available options before running the script.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
34b2e67d48 utils: Added more kata manager cli options
Added CLI options to the `kata-manager.sh` script to:

- Force installation
- Disable cleanup (retain downloaded files)
- Only install Kata (don't consider containerd).

> **Note:**
>
> This change introduces a subtle behaviour difference:
>
> - Previously, the script would error if containerd was already installed.
>
> - Now, the script will detect the existing installation and skip
>   trying to install containerd.
>
> This new behaviour makes more sense for most users but if you wish
> to use the old behaviour, you (now) need to run the script specifying
> the `-f` (force) option.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
714c9f56fd utils: Improve containerd configuration
`kata-manager.sh` improvements for containerd:

- Fixed containerd default branch (which is now `main`).
- Only install service file if it doesn't already exist.
- Enable the containerd service to ensure it can be started.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
c464f32676 utils: kata-manager: Force containerd sym link creation
For consistency with the rest of the script force the creation of a
symbolic link for containerd in `kata-manager.sh`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
4755d004a7 utils: Fix unused parameter
Actually make use of the `requested_version` parameter in
`kata-manager.sh` and added a comment.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
601be4e63b utils: Fix containerd installation
Fix bug introduced inadvertently on #3330 which fixes the Kata
installation, but unfortunately breaks installing containerd.

The new approach is to check that the download URL matches a
project-specific regular expression.

Also improves the architecture test to handle the containerd
architecture name (`amd64` rather than `x86_64`).

Fixes: #3674.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00