Commit Graph

666 Commits

Author SHA1 Message Date
James O. D. Hunt
68821f0814 tools: Rename agent-ctl command to GetGuestDetails
Rename the `GuestDetails` command to `GetGuestDetails` to match the
actual agent API name.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-15 17:32:20 +01:00
James O. D. Hunt
8553f06298 tools: Fix comment in agent-ctl
Correct a comment in the agent control tool.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-15 16:54:34 +01:00
Fabiano Fidêncio
1c528cd1cf packaging: Apply virtiofs performance related fixes to 5.x
Vivek Goyal found out that using "shared" thread pool, instead of
"exclusive" results in better performance.

Knowning that and with the plan to have virtio-fs as the default fs for
the 2.0, let's bring this patch in for both 5.0 and 5.1.

Fixes: #944

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-10-13 19:06:13 +02:00
Ychau Wang
0e0564a55d docs: update the build kata containers kernel document
Update the build kata containers kernel document for 2.0 release. Fixed
the 1.x release project paths and urls, using the kata-containers
project file paths and urls.

Fixes: #929

Signed-off-by: Ychau Wang <wangyongchao.bj@inspur.com>
2020-10-13 15:12:53 +08:00
Fupan Li
7470055cdc
Merge pull request #898 from bergwolf/arm-musl
fix arm CI
2020-10-12 10:03:45 +08:00
Peng Tao
82e9450124 packaging: fix cloud-hypervisor binary path
1. ensure build-static-clh.sh puts cloud-hypervisor under ./cloud-hypervisor directory
2. install cloud-hypervisor/cloud-hypervisor binary

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-10 20:10:03 +08:00
Peng Tao
154a356ad4 packaging: apply qemu v5.1 stable fixes
Qemu v5.1 was released with an affending commit 9b3a35ec82
(virtio: verify that legacy support is not accidentally on).
As a result, it breaks commandline compatiblilities for old qemu
users. Upstream qemu has fixed it but no release has been put out yet.
Let's apply these fixes by hand for now.

Refs: https://www.mail-archive.com/qemu-devel@nongnu.org/msg729556.html

Depends-on: github.com/kata-containers/tests#2945
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-10 18:29:23 +08:00
Peng Tao
78318c18f3 packaging: fix missing cloud_hypervisor_repo
It is needed in order to build from source.

Fixes: #916
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-10 15:47:41 +08:00
Peng Tao
00ad3fd308 agent-ctl: include cargo lock updates
Simply running `make` would generate some cargo lock updates for
agent-ctl. Let's include them so that we have fixed dependencies.

Fixes: #883
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-09 10:50:45 +08:00
Peng Tao
367e436ff8
Merge pull request #795 from c3d/bug/750-warnings
Remove compilation warnings
2020-10-09 10:26:08 +08:00
Ralf Haferkamp
e3cdc89b6c osbuilder: Create target directory for agent
When building with AGENT_SOURCE_BIN pointing to an already built
kata-agent binary, the target directory needs to be created in the
rootfs tree.

Fixes #873

Signed-off-by: Ralf Haferkamp <rhafer@suse.com>
2020-10-08 17:07:40 +02:00
Eric Ernst
7cad865d13 packaging: fix image build script
There were a couple of issues with the build-scripts discovered while
doing release:
 - Relative paths are error prone. Fix error.
 - short_commit_length is used to truncate sha for commits when
 appending agent version to resulting files. Before this was
 in pkglib.sh, which is otherwise an unused file from when we
 supported OBS. Add this define to lib.sh, which is sourced by
 the applicable packaging scripts.

There's plenty of room for improvement, but these fixes make the
existing scripts functional again.

Fixes: #871

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2020-10-07 09:09:31 -07:00
Christophe de Dinechin
0e898c6bc4 rust-agent: Treat warnings as error
Avoid the accumulation of warnings we had, as reported in #750.

Fixes: #750

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-10-07 17:30:21 +02:00
Christophe de Dinechin
d617caf1b5 rust-agent: Remove unused imports
This addresses the following warnings (and similar ones)::

    Compiling rustjail v0.1.0 (/home/ddd/go/src/github.com/kata-containers-2.0/src/agent/rustjail)
    warning: unused import: `debug`
      --> rustjail/src/container.rs:57:12
       |
    57 | use slog::{debug, info, o, Logger};
       |            ^^^^^

    warning: unused imports: `AddressFamily`, `SockFlag`, `SockType`, `self`
      --> rustjail/src/process.rs:18:24
       |
    18 | use nix::sys::socket::{self, AddressFamily, SockFlag, SockType};
       |                        ^^^^  ^^^^^^^^^^^^^  ^^^^^^^^  ^^^^^^^^

    warning: unused import: `nix::Error`
      --> rustjail/src/process.rs:23:5
       |
    23 | use nix::Error;
       |     ^^^^^^^^^^

    warning: unused import: `protobuf::RepeatedField`
      --> rustjail/src/validator.rs:11:5
       |
    11 | use protobuf::RepeatedField;
       |     ^^^^^^^^^^^^^^^^^^^^^^^

Fixes: #750

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-10-07 17:29:46 +02:00
Eric Ernst
0793002464 packaging: cleaning, updating based on new filepaths
Update scripts to take into account some files being moved, and some
general cleanup.

Fixes: #866

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2020-10-06 13:44:03 -07:00
Eric Ernst
f0f205cd7b packaging: remove obs-packaging
No longer required -- let's remove them.

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2020-10-06 13:44:03 -07:00
Eric Ernst
4b1753c53f packaging: pull versions, build-image out from obs dir
These are still required; let's pull them out.

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2020-10-06 13:44:03 -07:00
Eric Ernst
3f6cd4d5f7 packaging: Revert "packaging: Stop providing OBS packages"
This reverts commit c0ea910273.

Two scripts are still required for release and testing, which should
have never been under obs-packaging dir in the first place.  Let's
revert, move the scripts / update references to it, and then we can
remove the remaining obs-packaging/ tooling.

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2020-10-06 13:43:53 -07:00
Julio Montes
3fec031100
Merge pull request #817 from edmond-hk/qemu
version: upgrade qemu version to v5.1.0 for arm64
2020-10-01 10:31:19 -05:00
Edmond AK Dantes
a6221a74e7 qemu: upgrade qemu version to 5.1.0 for arm64.
Now, the qemu version used in arm is so old. As some new features have merged
in current qemu, so it's time to upgrade it. As obs-packaging has been removed,
I put the qemu patch under qemu/patch/5.1.x.
As vxfs has been Deprecated in qemu-5.1, it will be no longer exist in
configuration-hyperversior.sh when qemu version larger than 5.0.

Fixes: #816
Signed-off-by: Edmond AK Dantes <edmond.dantes.ak47@outlook.com>
2020-09-30 22:40:49 +08:00
Ychau Wang
f30b86f131 Packaging: release notes script using error kernel path urls
2.0 Packaging runtime-release-notes.sh script is using 1.x Packaging
kernel urls. Fix these urls to 2.0 branch Packaging urls.

Fixes: #829

Signed-off-by: Ychau Wang <wangyongchao.bj@inspur.com>
2020-09-30 14:47:46 +08:00
Fabiano Fidêncio
3360fb343f
Merge pull request #628 from fidencio/wip/update-install-information
Update Installation Guide to better reflect the current state of the project
2020-09-29 17:30:47 +02:00
Peng Tao
9b2eaeeff0
Merge pull request #787 from wainersm/static_build_qemu
Fix to qemu experimental and improvements
2020-09-29 10:26:23 +08:00
Peng Tao
1569b3b32a docs: fix static check errors
Somehow we are not running static checks for a long time.
And that ended up with a lot for errors.

* Ensure debug options are valid is dropped
* fix snap links
* drop extra CONTRIBUTING.md
* reference kata-pkgsync
* move CODEOWNERS to proper place
* remove extra CODE_OF_CONDUCT.md.
* fix spell checker error on Developer-Guide.md

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:01:03 +08:00
zhanghj
ca501e5478 osbuilder: specify default toolchain verion in rust-init.
Specify default toolchain version in rust-init.

Fixes: #799

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2020-09-24 23:20:43 -04:00
Wainer dos Santos Moschetta
ce675075e1 static-build/qemu-virtiofs: Refactor apply virtiofs patches
In static-build/qemu-virtiofs/Dockerfile the code which
applies the virtiofs specific patches is spread in several
RUN instructions. Refactor this code so that it runs in a
single RUN and produce a single overlay image.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2020-09-23 15:42:22 -04:00
Wainer dos Santos Moschetta
512b38cf61 packaging/qemu: Add common code to apply patches
The qemu and qemu-virtiofs Dockerfile files repeat the code to apply
patches based on QEMU stable branch being built. Instead, this adds
a common script (qemu/apply_patches.sh) and make it called by the
respective Dockerfile files.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2020-09-23 15:42:22 -04:00
Wainer dos Santos Moschetta
edce2712cd static-build/qemu-virtiofs: Fix to apply QEMU patches
Fix a bug on qemu-virtiofs Dockerfile which end up not applying
the QEMU patches.

Fixes #786

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2020-09-23 15:41:45 -04:00
Bo Chen
86a864b8c3 packaging: Build from source if the clh release binary is missing
This patch add fall-back code path that builds cloud-hypervisor static
binary from source, when the downloading of cloud-hypervisor binary is
failing. This is useful when we experience network issues, and also
useful for upgrading clh to non-released version.

Together with the changes in the tests repo
(https://github.com/kata-containers/tests/pull/2862), the Jenkins config
file is also updated with new Execute shell script for the clh CI in the
kata-containers repo. Those two changes fix the regression on clh CI
here. Please check details in the issue below.

Fixes: #781
Fixes: https://github.com/kata-containers/tests/issues/2858

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-09-23 11:41:49 -07:00
James O. D. Hunt
6e9592e13d
Merge pull request #778 from YchauWang/update-docs-2.0-1
docs: Update the reference path of kata-deploy in the packaging
2020-09-23 08:32:48 +01:00
Ychau Wang
52984b6724 docs: Update the reference path of kata-deploy in the packaging
Use the relative path of kata-deploy to replace the 1.x packaging url in
the kata-deploy/README.md file. Fixed the path issue, producted by
creating new branch.

Fixes: #777

Signed-off-by: Ychau Wang <wangyongchao.bj@inspur.com>
2020-09-22 16:48:51 +08:00
Ychau Wang
9f2f520130 docs: Fix the kata-pkgsync tool's docs script path
Fix the kata-pkgsync tool's docs, change the download path of the
packaging tool in 2.0 release.

Fixes: #773

Signed-off-by: Ychau Wang <wangyongchao.bj@inspur.com>
2020-09-22 09:21:02 +08:00
Peng Tao
53b0e085e1
Merge pull request #757 from Kvasscn/update-version-file-url-in-packaging-makefile
packaging: update version file url for kata 2.0 in Makefile
2020-09-21 11:47:36 +08:00
zhanghj
61181b9f86 packaging: use local version file for kata 2.0 in Makefile
Use local version file instead of downloading from upstream repo.

Fixes: #756

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2020-09-20 21:21:47 -04:00
Peng Tao
1acfba4dd7 packaging: fix release notes
Should mention the 2.0 branch docs.

Fixes: #763
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-19 09:10:14 +08:00
Bin Liu
6c034baa00
Merge pull request #761 from bergwolf/fix-clh-build
packaging: fix cloud-hypervisor build
2020-09-19 10:31:00 +08:00
Peng Tao
18d325edb0 packaging: fix cloud-hypervisor build
We should just download the official static build binary instead of
trying to build on our own.

Fixes: #760
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-18 23:00:07 +08:00
Peng Tao
e6f16b7bb1 packaging: fix release notes scripts
It should only check kata-containers repository.

Fixes: #758
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-18 18:47:05 +08:00
Fabiano Fidêncio
22ca2da6f7 packaging: Stop providing OBS packages
The community has discussed and took the decision in favour of promoting
kata-deploy as the way of distributing and using kata for distros that
officially don't maintain the project.

Fixes: #623
Fixes: https://github.com/kata-containers/packaging/issues/1120

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-09-15 17:26:17 +02:00
Archana Shinde
55354d5509
Merge pull request #651 from Kvasscn/fix-rust-agent-default-value-rootfs.sh
osbuilder: update usage of RUST_AGENT variable
2020-09-10 13:35:11 -07:00
Pradipta Kumar
8667df4d09
Merge pull request #679 from Amulyam24/fix-initrd-ppc64le
osbuilder: fix rootfs build on ppc64le
2020-09-09 12:32:28 +05:30
Amulya Meka
ebd3f316f2 osbuilder: fix rootfs build on ppc64le
The default toolchain used for building the
rust agent would be different for ppc64le.

Fixes: #678

Signed-off-by: Amulya Meka <amulmek1@in.ibm.com>
2020-09-09 03:09:03 +00:00
Peng Tao
7f20587433
Merge pull request #616 from amshinde/2.0-kernel-ptp
kernel: Enabling PTP clock support in kernel
2020-09-09 09:45:06 +08:00
Pavel Mores
2dfb8bc549 rootfs-builder: fix unbootable dracut-based initramfs on Fedora
This is a forward port of Kata 1.x PR's
https://github.com/kata-containers/osbuilder/pull/480 and
https://github.com/kata-containers/osbuilder/pull/494 .

Fixes #646

Signed-off-by: Pavel Mores <pmores@redhat.com>
2020-09-08 20:10:38 +02:00
Bo Chen
d2a89d668e
Merge pull request #569 from devimc/2020-08-25/port/noReflink
[port] image-builder: disable reflink
2020-09-04 12:50:01 -07:00
Julio Montes
85642c328d snap: move snapcraft.yaml to the right place
In order to use a build systemd like launchpad, the snapcraft.yaml file
must be in the root directory of the project or under the `snap`
directory, that way launchpad detects that this project can be build
using the `snapcraft` command

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-03 08:09:05 -05:00
Archana Shinde
b474828052 kernel: Remove arm patches for ptp
These patches are causing compilation issues while building on x86.
Remove these while we fix the issue.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-09-02 13:21:28 -07:00
Archana Shinde
82efd2f267 kernel: Enabling PTP clock support in kernel
Allows time synchronization.

Fixes #587

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-09-02 13:21:28 -07:00
Julio Montes
8666e01e11 qemu/default-configs: update default-config for QEMU 5
Disable the following IPMI configs, since they are not needed
for kata containers and fixes the snap job in launchpad

CONFIG_PCI_IPMI_KCS
CONFIG_PCI_IPMI_BT
CONFIG_IPMI_SSIF

fixes #581

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-02 11:58:38 -05:00
Julio Montes
2d12da8ed0 qemu: update default-configs
Update QEMU x86_64 default config to support QEMU 5

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-02 11:58:35 -05:00
Julio Montes
ae98ea450d obs-packaging: fix wait for obs
Reimplement the loop that waits for OBS. Look for the packages
that are still building, not for the repos.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-01 13:58:18 -05:00
Julio Montes
f5b71d3455 qemu: update build dependencies to support QEMU 5
Add the following packages as build dependencies to build QEMU
5 in OBS and launchpad (snap)

* libselinux1
* libffi
* libmount
* libblkid
* python3

fixes #1075

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-01 13:58:09 -05:00
Julio Montes
c422d061cb
Merge pull request #629 from gvancuts/add-kata-acrn-runtime-docker
kata-deploy: add ACRN runtime to Docker configuration
2020-09-01 07:27:04 -05:00
Fupan Li
e429f79d36
Merge pull request #644 from devimc/2020-08-28/agent/updateCargoToml
agent: update Cargo files authors
2020-09-01 17:33:58 +08:00
zhanghj
dae6c7d967 osbuilder: update usage of RUST_AGENT variable
Update the default value of RUST_AGENT variable to 'yes' in
usage description.

fixes: #650

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2020-09-01 05:23:29 -04:00
Peng Tao
c624fa7469 osbuilder: install musl for aarch64
So that it can do musl static build.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:10:32 +08:00
Peng Tao
cf1b72d6c6 osbuilder: install rust before sourcing cargo env
Otherwise we cannot find it.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
7b5ab58689 packaging: fix kata-deploy yaml path
Should use the 2.0 directory structure.

Fixes: #547
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
76c18aa345 osbuilder: fix alpine agent build
Since we always build musl kata-agent, there is no need to build
it inside a musl container. We can just build on the host and then
copy the binary to the target rootfs.

There are still a lot to clean up and it should be made so for ALL
target distros instead of just alpine. But this is at least working
for alpine first.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
5216815d1c packaging: make build-kernel.sh work for 2.0
We do not need to clone packaging repository, nor apply
virtio_vsock as virtio-fs-dev has already included that fix.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
aa3fb4db28 packaging: make kata-deploy work for 2.0
We no longer need to deploy multiple repositories.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
86a6e0b3e7 packaging: fix build image scripts
We do not need to clone osbuilder anymore.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
ceebd06b64 release: add 2.0 release actions
Use a different action yaml file so that we do not affect the original
1.x release actions.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
dadab1febf osbuilder: build rust agent by default
Since we only have the rust agent.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
1bd5825955 packaging: tag releases on kata-containers repo
As we do not need to tag other repositories any more.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
f56f68bf2f obs-packaging: adjust for building on kata-containers repo
As we do not need to build on other repositories any more.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Julio Montes
60245a83fa agent: update Cargo files authors
Anyone can collaborate in the Kata Containers project, so instead of
adding her/his name and email to the Cargo.toml files, use
`The Kata Containers community` as name and
`kata-dev@lists.katacontainers.io` as email.

fixes #643

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-08-31 08:47:10 -05:00
Peng Tao
4c328b3bb4
Merge pull request #617 from amshinde/2.0-kata-deploy-conf
Forward-port kata deploy conf
2020-08-31 17:28:50 +08:00
GabyCT
bc9c8ddf8e
Merge pull request #592 from GabyCT/topic/portyq
[forward port]: osbuilder: Update yq
2020-08-28 09:41:21 -05:00
James O. D. Hunt
10b1deb274 tools: Add Unix socket support to agentl-ctl
Rather than specifying the VSOCK address as two CLI options
(`--vsock-cid` and `--vsock-port`), allow the agent's ttRPC server
address to be specified to the `agent-ctl` tool using a single URI
`--server-address` CLI option. Since the ttrpc crate supports VSOCK and
UNIX schemes, this allows the tool to be run inside the VM by specifying
a UNIX address.

Fixes: #549.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-08-28 08:06:11 +01:00
Gabriela Cervantes
f879acd6e7 scripts: Foward port osbuilder scripts to update yq
This PR ports kata-containers/osbuilder#454 to kata 2.0

Fixes #576

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-08-27 15:00:03 -05:00
James O. D. Hunt
7be95b15eb tools: Simplify error handling in agent-ctl
Don't format the error string before passing to the `anyhow!()` macro
since it can format strings itself.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-08-27 15:50:14 +01:00
Geoffroy Van Cutsem
5b0e6f375b kata-deploy: add ACRN runtime to Docker configuration
Add an ACRN runtime ('kata-acrn') to the Docker configuration
('/etc/docker/daemon.json').

Fixes: #579
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-08-27 15:45:30 +02:00
Archana Shinde
bee17d1c8f kata-deploy: Add containerd configuration to support kata annotations.
In case of containerd, not all annotations are passed down to the OCI
layer. We need to configure "pod_annotations" field for a runtime class.
This field is a list of annotations that can be passed by Kata as OCI
annotations. Add this as default configuration with kata-deploy.

Fixes: #594

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-08-26 15:06:06 -07:00
Archana Shinde
219f93ffad kata-deploy: Add default privileged_without_host_devices
For privieleged containers, all host devices are passed to
container. We have done work in crio and containerd to define a
scope of privileged in Kata to prevent this from happening.
Add this as the default as this falls under a best practice to follow
with Kata.
Note that if this flag has been already defined, then this change
does not override it.

Fixes #582

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-08-26 15:06:06 -07:00
Julio Montes
f7ff6d3297 image-builder: disable reflink
Disable reflink when using DAX. Reflink is a xfs feature that cannot be
used together with DAX.

fixes kata-containers/osbuilder#456
fixes #577

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-08-26 09:42:17 -05:00
Julio Montes
c14d44aba8
Merge pull request #568 from Jakob-Naucke/vfio-ap-fragment
packaging: Add VFIO-AP fragment for s390x
2020-08-26 07:59:09 -05:00
Bin Liu
b4c105336e
Merge pull request #563 from bergwolf/guest-hooks
agent: support guest hooks
2020-08-26 17:36:32 +08:00
Jakob-Naucke
2ee40027e5
packaging: Add VFIO-AP fragment for s390x
Add vfio-ap.conf to the s390 kernel config fragments, which includes
the necessary flags for passing an IBM Adjunct Processor (AP) device
over VFIO.

Fixes: #567

Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
Reviewed-by: alicefr <afrosi@redhat.com>
2020-08-25 17:10:35 +02:00
Julio Montes
e6757de2ac
Merge pull request #543 from likebreath/clh_backporting
clh: Port cloud-hypervisor related changes from kata-runtime
2020-08-25 08:42:03 -05:00
Alice Frosi
9f1a3d15db
kernel: add s390x fragment
Support for s390x kernel fragments.

Fixes: #1041

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:36:01 +02:00
Alice Frosi
f13506163b
kernel: config CONFIG_GENERIC_MSI_IRQ_DOMAIN
Moved CONFIG_GENERIC_MSI_IRQ_DOMAIN in arch base.conf.
The config is not selected for s390x

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:36:01 +02:00
Alice Frosi
b67325c3ac
kernel: add missing configs
Some kernel configs need additional dependencies:
  - CONFIG_NO_HZ depends on
      CONFIG_GENERIC_CLOCKEVENTS
  - CONFIG_CGROUP_PERF depends on
      CONFIG_PERF_EVENTS
        CONFIG_HAVE_PERF_EVENTS
  - CONFIG_BLK_DEV_LOOP depends on
      CONFIG_BLK_DEV
        CONFIG_BLOCK

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:36:00 +02:00
Alice Frosi
454dd85432
kernel: config CONFIG_ PARAVIRT
Moved CONFIG_ PARAVIRT to each arch base.conf.

CONFIG_ PARAVIRT only defined in x86, arm64, arm in arch/$arch/Kconfig.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:36:00 +02:00
Alice Frosi
62b45064d4
kernel: config CONFIG_NO_HZ_FULL
Moved CONFIG_NO_HZ_FULL config to each arch base.conf.

The config CONFIG_NO_HZ_FULL depends on CONFIG_HAVE_CONTEXT_TRACKING.
See https://github.com/torvalds/linux/blob/
a811c1fa0a02c062555b54651065899437bacdbe/kernel/time/Kconfig#L96

The context tracking is not supported on s390x yet.
See https://github.com/torvalds/linux/blob/
a811c1fa0a02c062555b54651065899437bacdbe/Documentation/features/time/
context-tracking/arch-support.txt#L27

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:35:59 +02:00
Alice Frosi
6dca74ba72
kernel: moved acpi hotplug config
Moved:
---
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_PNPACPI=y
---
from hotplug to acpi.
In this way, it is possible to skip these config if the acpi feature is
not supported.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:35:59 +02:00
Alice Frosi
7c85decc82
kernel: config CONFIG_PCI_MSI_IRQ_DOMAIN
For certain kernel version CONFIG_PCI_MSI_IRQ_DOMAIN is only supported
on x86 and arm64.
See https://github.com/torvalds/linux/blob/
219d54332a09e8d8741c1e1982f5eae56099de85/drivers/pci/Kconfig#L55

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:35:44 +02:00
Alice Frosi
efe51b291c
kernel: fragment for pmem
The option CONFIG_VIRTIO_PMEM is not supported on s390x.
It requires nvdimm support.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:25:34 +02:00
Alice Frosi
08d046d994
kernel: config CONFIG_HAVE_NET_DSA
The kernel config CONFIG_HAVE_NET_DSA is not supported on s390x.
See https://github.com/torvalds/linux/blob/master/net/dsa/Kconfig#L4.
Config moved to arch directory.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:25:34 +02:00
Alice Frosi
7b49fa121b
kernel: fragments not supported on s390x
Add !s390x tag to skip these group of fragments for s390x.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:25:30 +02:00
Peng Tao
ccfb73cb8c agent/agent-ctl: update Cargo.lock
rustc 1.45.2 would just ask for these depenedencies.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-24 19:31:08 +08:00
Pradipta Kumar
bba2773d7d
Merge pull request #482 from Amulyam24/fix-ppc64le-rootfs
osbuilder : ppc64le support for rust agent based rootfs/initrd image
2020-08-21 12:46:10 +05:30
Jose Carlos Venegas Munoz
39b53f4467 clh: enable build using Podman
[ Port from packaging commit 4e1b5729f47d5f67902e1344521bc5b121673046 ]

Build clh with Podman, allow build the vmm in the Podman CI

Virtiofs qemu has to be build as this is requried by clh.

Fixes: #461

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-20 14:00:31 -07:00
Jose Carlos Venegas Munoz
04b156f604 qemu-virtiofs: Update to qemu 5.0 + virtiofs + dax
[ Port from packaging commit cbe53bdb14e303830fa9f2d5a7f3c9161a32f033 ]

Update build scripts for qemu-virtiofs.

- virtiofs-0.3 patches are not needed
- Sync build on how vanilla qemu is built
- Apply patches for virtiofsd if any (none today)
- Apply patches that are used for the qemu vanilla
- Apply patches in order

Fixes: #461

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-20 14:00:28 -07:00
Bin Liu
5f2a9fad4d
Merge pull request #536 from Kvasscn/packaging-build-kernel-sh-test
packaging: add usage instructions for -a (arch_target) option
2020-08-20 17:53:52 +08:00
zhanghj
bfd78104b2 packaging: add usage instructions for -a (arch_target) option
Add usage instructions for -a option in script and README,
currently supported architecture are aarch64/ppc64le/s390x/x86_64.

Fixes: #534

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2020-08-18 22:26:11 -04:00
Gabriela Cervantes
ecaa1f9e25 clh: Enable versions and kernel tag to enable CLH CI for kata 2.0
This PR updates the versions for the virtiofs kernel branch and
as there is a tag based in kernel 5.6 move patches to uses the tag name.
This PR is needed to enable CLH CI for kata 2.0. This PR is backporting
kata-containers/runtime#2843 and kata-containers/packaging#1098.

Fixes #532

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-08-18 10:44:02 -05:00
Amulya Meka
64b0694436 ppc64le: Support for rust agent based rootfs
For building rust agent on ppc64le, the rust toolchain is built using
the LIBC implementation - gnu instead of musl.

Fixes: #481

Signed-off-by: Amulya Meka <amulmek1@in.ibm.com>
2020-08-18 16:00:26 +05:30
Peng Tao
ad62eeffcb
Merge pull request #431 from liangxianlong/2.0-dev
rootfs-builder: Don't modify /sbin/init on the build host
2020-07-28 20:06:45 +08:00
Peng Tao
3246bdce7c
Merge pull request #445 from liubin/fix/444-remove-docs-about-shim-proxy
docs: remove shim/proxy topics and fix docs links
2020-07-28 20:06:02 +08:00
bin liu
d7f75dce83 docs: remove shim/proxy topics and fix docs links
And also change links from old documentation to docs sub-directory.

Fixes #444

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-24 17:53:38 +08:00
Jianyong Wu
c0720179d2 package: enable cloud-hypervisor for arm64
Now, cloud-hypervisor is capable to work on arm64. it's time to
enable it in kata for arm64.
as cloud-hypervisor can only use virtio-fs, a new patch should be
applied to kernel for virtiofs and some config should be removed
temporarily.

Fixes: #446
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2020-07-24 10:07:30 +08:00
liangxianlong
7bbb9e8122 rootfs-builder: Don't modify /sbin/init on the build host
Don't modify /sbin/init on the build host when using command `AGENT_INIT="yes" ./rootfs.sh centos` to build rootfs.

Fixes: #430

Signed-off-by: liangxianlong <liang.xianlong@zte.com.cn>
2020-07-18 14:19:06 +08:00
Julio Montes
5ff530371e tools: fix branch and runime repo
Kata 2.0 lives in `github.com/kata-containers/kata-containers`, so all scripts
should point to it.
Currently the branch for Kata 2.0 is 2.0-dev not master, then the branch envar
must be used instead of hardcoding `master` as default branch.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-03 16:12:22 +00:00
Peng Tao
2a8650baa1 agent-ctl: add Cargo.lock
A binary cargo should go with Cargo.lock

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-06-29 01:27:50 -07:00
Peng Tao
a8430b3791 gitignore: ignore more files
We don't need to track them.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-06-29 01:27:05 -07:00
Peng Tao
7a44025464 Makefile: add trace-forwarder/agent-ctl missing targets
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-06-28 20:36:33 -07:00
Peng Tao
ebfbca031b osbuilder: use newest golang
Instead of the oldest one.

Fixes: #345
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-06-27 20:42:30 -07:00
Peng Tao
a1ef594d2a cleanup: remove redundant files
And use top level VERSION for all components.

Fixes: #334
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-06-24 15:57:23 -07:00
Peng Tao
782cd2ed10 packaging: merge packaging repository
git-subtree-dir: tools/packaging
git-subtree-mainline: f818b46a41
git-subtree-split: 1f22d72d5d

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-06-23 22:58:18 -07:00
James O. D. Hunt
8a1949546c tools: Add agent-ctl tool
Add a low-level agent control tool that can manipulate the agent
via ttRPC.

Fixes: #222.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-06-08 11:22:19 +01:00
Salvador Fuentes
81e11c9f7c osbuilder: remove references to agent and runtime repos
tools/osbuilder/scripts/lib.sh was making references to agent and
runtime repositories to get golang, rust, cmake and musl versions.
Since runtime and agent repos are consolidating, we only need to
make reference to our versions.yaml in this (kata-containers) repo.

Fixes: #234.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-05-28 10:33:25 -05:00
Salvador Fuentes
629cc0ae8d rootfs-builder: remove EulerOS
EulerOS does not work with rust agent.

further info:
https://github.com/kata-containers/osbuilder/issues/387

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-30 08:27:25 -05:00
Salvador Fuentes
586d26480c rootfs-builder: Add license header to rootfs_lib_template.sh
Add license header to `tools/osbuilder/rootfs-builder/template/rootfs_lib_template.sh`

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-30 08:20:46 -05:00
Salvador Fuentes
11c3d81f68 docs: fix markdown check issues
- Removes `CODE_OF_CONDUCT.md` and `CONTRIBUTING.md` from osbuilder
directory.
- Fixes a reference from `image-builder/README.md` to
`rootfs-builder/README.md`
- Updates the main `README.md` making a reference to the local
`tools/osbuilder/README.md`

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-29 17:51:44 -05:00
Salvador Fuentes
715d342519 osbuilder: move code into tools directory
move all osbuilder files into `tools` directory to be able
to merge this into kata-containers repo.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-29 16:45:00 -05:00