Commit Graph

5116 Commits

Author SHA1 Message Date
GabyCT
4f49b160c0
Merge pull request #426 from Rajpratik71/enhancement/debian_apt
pod : optimization Some debian package manager tweaks
2020-03-17 13:08:08 -06:00
Jimmy Xu
d0768d5c3c use-cases: Add documentation for using Nvidia GPU with Kata
This document decsribes how an Nvidia GPU can be used with Kata Containers in Nvidia GPU pass-through mode.

Fixes #616

Signed-off-by: Jimmy Xu <junming.xjm@antfin.com>
2020-03-18 01:24:33 +08:00
Salvador Fuentes
7d5cac092d
Merge pull request #608 from Amulyam24/fix-documentation
docs: Change in setting up a debug console
2020-03-17 10:39:14 -06:00
James O. D. Hunt
fe0a3a0c7c
Merge pull request #156 from lifupan/master
add a workspace and run all the tests in the workspace
2020-03-17 11:10:27 +00:00
Pratik Raj
9a6bd12e11 debian: Install missing ca-certificates package
Because CI build is

1.  Slow and in log it is showing because "apt-utils" not installed

2. to avoid CI build to exits with error without having certificate

Fixes: #970

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2020-03-17 12:04:01 +05:30
Pratik Raj
d527c4ff64 debian: Don't install recommended software
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages .

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .

Fixes: #970

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2020-03-17 12:04:01 +05:30
Pratik Raj
8d7817805a debian: Install missing ca-certificates package
Because CI build is

1.  Slow and in log it is showing because "apt-utils" not installed

2. to avoid CI build to exits with error without having certificate

Fixes: #427 

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2020-03-17 11:55:39 +05:30
Pratik Raj
7c92854e5d debian: Don't install recommended software
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages .

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .

Fixes: #427 

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2020-03-17 11:55:17 +05:30
Penny Zheng
00da1270be unit-test: refine related unit tests
We need to refine related unit tests.

Fixes: #2511

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-17 05:22:00 +00:00
Penny Zheng
13390df005 Jailer: re-mount jailerRoot with exec
The default chrootBaseDir "/run/vc" in many distributions is mounted
with `noexec` flag, which will bring 'permission denied' error
when running kata-containers with jailer.
Therefore, we decided to remount the jailerRoot dir with exec when setting
up a new firecracker sandbox and umount it when cleaning up.

Fixes: #2511

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-17 04:10:33 +00:00
Penny Zheng
9d3022a85a mount: modify func bindMount
originally, we forcefully set any bind-mount with `private` propagation
type, and it's not applied for all scenarios. e.g. we need to provide
`slave` or `shared` propagation type for bind-mounts in setting up jail
house.
Here, we add another parameter `pgtype` in func bindMount for providing
customized propagation parameters.

Fixes: #2511

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-17 04:10:28 +00:00
Archana Shinde
aaa4e5c661
Merge pull request #2529 from likebreath/clh_remove_deadcode
clh: Remove dead-code on maxClhVcpus
2020-03-16 11:07:10 -07:00
Archana Shinde
73eb5c1a04
Merge pull request #435 from bergwolf/1.11.0-alpha1-branch-bump
# Kata Containers 1.11.0-alpha1
2020-03-16 09:58:36 -07:00
Peng Tao
17a92aed6f release: Kata Containers 1.11.0-alpha1
- README: logging: add shimv2 information
- vc: add agent.container_pipe_size annotation
- clh: set rootfstype
- logging: reduce default log level to Warn from Info
- vc: Remove container share dir when stopping
- clh: enable CPU hotplug
- clh: add 'APIsocket' to persist HypervisorState
- vc: Use BlockIndexMap instead of BlockIndex
- vendor: update agent client
- cri-o: fix netns mount point leaking from cri-o
- cli: add virtioFsDaemon to kata-env
- qemu: pass rootfs image in readonly mode
- Fix rescan PCI conflicts with shpchp / pciehp
- clh: Fix version check
- Implement cgroup manager
- vc: do not follow symlink when umounting contanier host path

4ce44ab0 clh: set rootfstype
4c287173 vc: add agent.container_pipe_size annotation
eee4d701 katutils: logging: default log level to Warn
913d1530 cli: logging: Default to Warn level
2cd0c885 README: logging: add shimv2 information
ed431175 vc: Remove container share dir when stopping
17b9de14 clh: enable CPU hotplug
63c7ac5b clh: add 'APIsocket' to persist HypervisorState
e9a46580 vc: Use BlockIndexMap instead of BlockIndex
376c4252 cli: add virtioFsDaemon to kata-env.
171eb705 qemu: use govmm vhost user device types directly
c6cc8b93 virtcontainers: support lazy attach devices
46392945 qemu: pass guest image file readonly
63fdf532 vendor: update govmm dependency
7427fea8 dnm: vendor: update agent client
ea82922a virtcontainers/pkg/cgroups: implement cgroup manager
03cdf6c4 virtcontainers: add new package for cgroups
33459779 clh: update minimal supported version to check.
20332298 clh: Fix version check
0da10105 version-update: version update for cri-o and k8s
5f9a77cc vc: validate container path when cleaning up
5bf32312 vc: do not follow symlink when umounting contanier host path

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-16 12:39:48 +00:00
Peng Tao
dc7d5bb754 release: Kata Containers 1.11.0-alpha1
- ci: Provide source directory path for script execution
- kernel: Install uncompressed kernel by Image instead of  vmlinux on arm64
- ACPI: Always build evged in for experimental kernel
- obs: Update obs packages for ppc64le
- scripts: enable libpmem only for x86_64
- scripts/qemu: enable libpmem
- release: Remove release docs
- test: Test for kata-containers packages on Fedora 31
- obs: Remove obs packages and testing for ubuntu 19.04 and fedora 29
- kernel: enable BPF to support libcontainer's cgroups V2 implementation
- kata-deploy: improve logic for crio.conf runtime additions
- yq: Use install_yq.sh script from tests repository

f599c8e kernel: Install uncompressed kernel by Image instead of  vmlinux on arm64
c3949fd ACPI: Always build evged in for experimental kernel
83a69de scripts: enable libpmem only for x86_64
aad1e0e obs: Update obs packages for ppc64le
c0d45d8 scripts/qemu: enable libpmem
acf5b91 release: Remove release docs
3418d40 build: Enclose source dir for script execution
ac0d569 kernel: enable BPF to support libcontainer's cgroups V2 implementation
d7c2a38 obs: Remove obs packages and testing for ubuntu 19.04 and fedora 29
c8c3e46 test: Test for kata-containers packages on Fedora 31
43ab57f yq: Use install_yq.sh script from tests repository
cd6d364 kata-deploy: improve logic for crio.conf runtime additions

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-16 12:39:19 +00:00
Peng Tao
65717ba6d0 release: Kata Containers 1.11.0-alpha1
- scripts: set a default path to the yq binary
- AArch64: Build rust image on aarch64
- image-builder: Add NSDAX_BIN for passing in compiled nsdax tool
- rootfs: Don't overwrite /sbin/init if it already exists
- tests: Improve running test_images.sh locally

1c063af scripts: set a default path to the yq binary
67343a1 rust-agent: Separate the build up of rust-agent and go-agent
a390a36 rootfs: remove RUST_SRC_PATH
41aaa36 ubuntu/debian: create aarch64-specific Dockerfile.in
9cba8c4 musl: install musl on aarch64
87a5d5c rootfs: Don't overwrite /sbin/init if it already exists
4004bd8 image-builder: Add NSDAX_BIN for passing in compiled nsdax tool
134175b tests: Document the changed KATA_DEV_MODE behavior
0f4eac4 tests: Skip initrd/image launch if KATA_DEV_MODE
762ec28 tests: Drop kata-runtime env validation if KATA_DEV_MODE is set
6f17b9c tests: Skip set_runtime if KATA_DEV_MODE is set
17a8fb1 tests: Skip all kata-manager usage if KATA_DEV_MODE is set
e787bb0 tests: Define KATA_DEV_MODE
cef2591 tests: Rework dracut docker bind mounts
f3ab6d2 tests: Don't run commands with `chronic` if DEBUG is set
7a8e816 tests: Specify DRACUT_OVERLAY_DIR
7dd99c0 tests: Add project_dir helper variable
1ae3922 tests: Have DEBUG=1 set bash xtrace
555ddf3 tests: Remove unused USE_DOCKER export
0e6a12c tests: Pass DOCKER_RUNTIME to osbuilder scripts
e8624d8 tests: Rename docker_build_runtime -> DOCKER_RUNTIME
cd46d09 tests: Remove hardcoded 'runc' reference
c574ec0 tests: Remove dead unset images_dir check
44f2931 tests: Remove unused test_func_prefix

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-16 12:39:05 +00:00
Peng Tao
fbf1d015e7 release: Kata Containers 1.11.0-alpha1
- actions: Add verbose information
- systemd-service: build rust-agent systemd services
- grpc: fix the issue of crash agent when didn't find the process

cd233c0 actions: Add verbose information
f0eaeac path-absolutize: version update
3136712 systemd-service: build rust-agent systemd services
289d617 grpc: fix the issue of crash agent when didn't find the process

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-16 12:38:41 +00:00
James O. D. Hunt
2d2fb3e3d6
Merge pull request #962 from mramanathan/dir_context_bump_release_scripts
ci: Provide source directory path for script execution
2020-03-16 11:45:03 +00:00
James O. D. Hunt
1ad221eb2a
Merge pull request #931 from justin-he/uncompress_kernel
kernel: Install uncompressed kernel by Image instead of  vmlinux on arm64
2020-03-16 11:40:16 +00:00
Peng Tao
8f0bb09b7c howto: add sandbox config annotation howto
It explains the details of current supported annotations.

Fixes: #486
Fixes: #294
Depends-on: github.com/kata-containers/tests#2240
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-16 03:29:38 -07:00
fupan.lfp
245183cb28 cargo: add a workspace and run all the tests in the workspace
Add a worksapce and run all of the tests in
under this workspace.

Fixes:#155

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-03-16 16:34:59 +08:00
Amulya Meka
80702f6dd7 docs: Change in setting up the debug console
The debug console can be set up with the help of both rootfs or initrd image.

Fixes: #609

Signed-off-by: Amulya Meka <amulmek1@in.ibm.com>
2020-03-16 09:29:08 +05:30
Bo Chen
94298dd15c clh: Remove dead-code on maxClhVcpus
Our CLH driver in kata defines its own constant variable 'maxClhVcpus'
which can conflict with the maximum number of vCPUs specified from the
kata configuration file 'clh.config.DefaultMaxVCPUs'. As the value from
kata configuration file is preferred anyway and the code on 'maxClhVcpus'
is not being used. We'd better remove it for better readability and
avoiding further confusions.

Fixes: #2528

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-03-13 13:02:22 -07:00
Salvador Fuentes
9e0807a7f5
Merge pull request #430 from devimc/topic/scripts/fixYqNotFound
scripts: set a default path to the yq binary
2020-03-12 12:30:00 -06:00
Julio Montes
1c063afc5f scripts: set a default path to the yq binary
Use the path where `install-yq.sh` installs `yq` as the default path to the
`yq` binary in `lib.sh`.
Install `yq` in the default path if it doesn't exist.

fixes #429

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-12 15:25:24 +00:00
GabyCT
ee01fa82b5
Merge pull request #2521 from grahamwhaley/20200310_shimv2_logs
README: logging: add shimv2 information
2020-03-12 09:02:23 -06:00
Liu Xiaodong
126fa157a3 agent: append and handle vhost-user-blk device
Kata-runtime can append vhost-user-blk device to the
device list of a container. And handle volumes who is
a block device and in VhostUserBlk type.

The vhost-user-blk device will be identified by its
PCI address by Kata-agent inside VM.

Fixes: #2380

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-03-12 03:42:02 -04:00
Liu Xiaodong
cf066b75ac devices: hotplug vhost-user-blk device to qemu
vhost-user-blk device can be hotplugged or hotremoved
by QMP commands.

Fixes: #2380

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-03-12 03:41:59 -04:00
Liu Xiaodong
3696318436 devices: filter vhost-user-blk/scsi device
Reserved number of Linux device number 241 and 242
are used to identify vhost-user-blk and vhost-user-scsi
devices.
for example, after command:
mknod <Vhost-User-Dir>/block/devices/vhost-dev0 b 241 0
this node will be recognized as vhost-user-blk device.

Fixes: #2380

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-03-12 03:41:55 -04:00
Liu Xiaodong
54b24dad4d devices: add vhost-user storage configuration
Two parameters are used to set in toml file:

1. Set "enable_vhost_user_store = true" to indicate
that vhost-user storage device feature is enabled.

2. Set "vhost_user_store_path = <Vhost-User-Dir>".
vhost-user socket files will be under
"<Vhost-User-Dir>/block/sockets/"; and device node
for vhost-user device will be under
"<Vhost-User-Dir>/block/devices/"
The default value of "vhost_user_store_path" is
"/var/run/kata-containers/vhost-user/".

Fixes: #2380

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-03-11 21:18:29 -04:00
Julio Montes
511dc4a0e4
Merge pull request #2510 from awprice/issue-2467
vc: add agent.container_pipe_size annotation
2020-03-11 11:20:16 -06:00
Julio Montes
2fc36daef4
Merge pull request #613 from eadamsintel/qat_update
subsystem: Update QAT instructions to support 5.4 kernel
2020-03-11 09:00:24 -06:00
Jose Carlos Venegas Munoz
aa40eeffe6
Merge pull request #2525 from jcvenegas/fix-ext2-warn
clh: set rootfstype
2020-03-11 08:57:46 -06:00
Jose Carlos Venegas Munoz
4ce44ab067 clh: set rootfstype
set rootfstype=ext4 to make kernel not do print errros like:

```
Mount option "data=ordered" incompatible with ext2
```

Depends-on: github.com/kata-containers/tests#2377

Fixes: #2524

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-11 12:49:13 +00:00
Alex Price
4c28717335 vc: add agent.container_pipe_size annotation
This adds the `agent.container_pipe_size` annotation which allows
configuration of the size of the pipes for stdout/stderr for containers
inside the guest.

fixes #2467

Signed-off-by: Alex Price <aprice@atlassian.com>
2020-03-11 21:04:26 +11:00
Graham Whaley
397ce26948
Merge pull request #412 from Pennyzct/build_rust_image_on_aarch64
AArch64: Build rust image on aarch64
2020-03-11 09:37:02 +00:00
Fupan Li
5717da9262
Merge pull request #2523 from grahamwhaley/20200310_log_warn
logging: reduce default log level to Warn from Info
2020-03-11 09:23:44 +08:00
Adams, Eric
fa837917e9 subsystem: Update QAT instructions to support 5.4 kernel
The QAT instructions was broken after moving to a newer 4.19 kernel. Now
that the new 5.4 kernel is out, these instructions fix that.

Fixes #612

Signed-off-by: eric.adams@intel.com
2020-03-10 15:14:01 -07:00
Julio Montes
400fed8a0f
Merge pull request #418 from crobinso/nsdax-bin
image-builder: Add NSDAX_BIN for passing in compiled nsdax tool
2020-03-10 16:08:43 -06:00
Julio Montes
fc6db0b8f2
Merge pull request #420 from crobinso/init-no-overwrite
rootfs: Don't overwrite /sbin/init if it already exists
2020-03-10 16:07:38 -06:00
Graham Whaley
ff3b3cd957 howto: fluentd: add details for shimv2
shimv2/containerd logs are placed and formatted differently than for
kata CRI-O. Add some details to the Fluentd parsing document to aid
in parsing those.

Fixes: #610

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-10 19:20:36 +00:00
Graham Whaley
eee4d7012d katutils: logging: default log level to Warn
Set the katautils default log level to 'Warn', rather than 'Info',
as 'Info' is rather noisy.

Fixes: #2522

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-10 18:28:18 +00:00
Graham Whaley
913d1530fb cli: logging: Default to Warn level
Set the default log level explicitly to 'Warn', rather than taking
the logrus default (which is normally 'Info').

Fixes: #2522

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-10 18:28:18 +00:00
Graham Whaley
2cd0c88574 README: logging: add shimv2 information
The shimv2 runtime logs slightly differently - let's clarify
that in the existing OCI/CRI-O only runtime section.

Fixes: #2520

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-10 16:01:47 +00:00
Julio Montes
a5436627f5
Merge pull request #2517 from darfux/remove_ctr_share_dir_when_stop
vc: Remove container share dir when stopping
2020-03-10 08:10:44 -06:00
Penny Zheng
67343a178c rust-agent: Separate the build up of rust-agent and go-agent
Separate the build up of rust-agent and go-agent, hence you only
select one as kata-agent.
I've added the generation of rust-agent systemd service files into
rust-agent Makefile.
Therefore, we could use same `make` commands to build go-agent and
rust-agent.

Fixes: #411

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-10 21:20:53 +08:00
Penny Zheng
a390a360db rootfs: remove RUST_SRC_PATH
If user wants to use customized rust-agent, they could use
AGENT_SOURCE_BIN to pass the static binary.
The rust-agent is always statically linked with musl.

Fixes: #411

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-10 21:20:48 +08:00
Penny Zheng
41aaa36e6f ubuntu/debian: create aarch64-specific Dockerfile.in
The musl package in ubuntu/debian could not provide everything we need
on aarch64.
e.g. we need `aarch64-linux-musl-gcc` as linker, and it's not provided
in package.

Fixes: #411

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-10 21:20:43 +08:00
Penny Zheng
9cba8c4c27 musl: install musl on aarch64
The original musl-installing method is only for x86_64 and i386(see
musl config.mak template file).
musl.cc provides small and reliable pre-built musl toolchains
for many architectures.
Static so they run on supported platforms without dependencies.

Fixes: #411

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-10 21:20:38 +08:00
Jia He
3670074392 scripts: Disable a few options to reduce qemu binary size on generic architectures
This disables a few configure options on generic arches to reduce qemu
binary size.

Fixes #926
Signed-off-by: Jia He <justin.he@arm.com>
2020-03-10 09:23:24 +08:00