Commit Graph

5325 Commits

Author SHA1 Message Date
Eric Ernst
baa2ef1bbf kernel: add support for building virtio-fs kernel
Adding option `-e` to support experimental flag. When selected, the
kernel for virtio-fs is utilized instead of standard kernel.org.

This is a bit more hack-ish than I'd prefer, sorry.

Fixes: #700

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-09-06 15:43:49 -07:00
Eric Ernst
2b617ed8c7 kernel: auto-indent build-kernel.sh
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-09-06 15:43:49 -07:00
Julio Montes
42ef119992
Merge pull request #2030 from vijaydhanraj/fix-acrn-macvtap
hypervisor: Fix MacVTap internetworking support in ACRN
2019-09-06 13:50:54 -05:00
Eric Ernst
48540146b6
Merge pull request #351 from katabuilder/1.9.0-alpha1-branch-bump
# Kata Containers 1.9.0-alpha1
2019-09-06 10:55:46 -07:00
Salvador Fuentes
2b785044a2 ci: travis: allow failures on ppc64le
travis ppc64le has been very unstable when running
apt-get commands and are not allowing us to run the
job successfully.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-09-06 09:19:12 -05:00
Gabriela Cervantes
f6be9a822a qemu: Enable qemu with virtiofs
This adds support for virtio-fs on QEMU.

Fixes #699

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-09-06 04:29:37 -05:00
Fupan Li
e21dc8babe
Merge pull request #2022 from WeiZhang555/limit-usage-of-compatOCISpec
CompatOCISpec: limit usage of CompatOCISpec
2019-09-06 09:23:16 +08:00
Eric Ernst
b62814a6f0 sandbox: combine sandbox cgroup functions
Simplify the tests and the code by combining the create and join
functions into a single function.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-09-05 13:49:13 -07:00
Alice Frosi
e3f92fe59b virtcontainer: add error return code
Add error return code to append functions.

Fixes: #2035

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-09-05 15:28:46 +02:00
Alice Frosi
a0e09df1df s390x: add appendVSock with devno
Reimplementation of appendVSock in order to assign the devno to the
vsock device.

Fixes: #2033

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-09-05 12:53:18 +02:00
Alice Frosi
6b2a90a9e5 virtcontainer: rename appendVSockPCI
Rename function appendVSockPCI to appendVSock to be general. The
function could use PCI or CCW devices.
Added return error to appendVSock.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-09-05 12:53:18 +02:00
James O. D. Hunt
44f67f7efc
Merge pull request #539 from vijaydhanraj/kata-acrn-doc
doc: how-to on Kata Containers with ACRN hypervisor
2019-09-05 09:53:37 +01:00
James O. D. Hunt
94c47dcecd
Merge pull request #1965 from jschintag/virtio-blk-ccw
s390x: add virtio-blk-ccw support
2019-09-05 08:46:08 +01:00
Wei Zhang
9507f45a0f CompatOCISpec: limit usage of CompatOCISpec
Fixes: #2023

CompatOCISpec is used to gurantee backward compatbility for old runtime
specs, after we convert CompatOCISpec to standard specs.Spec, we should
use specs.Spec instead of CompatOCISpec, and CompatOCISpec should be
useless from then.

Spread usage of CompatOCISpec can make code structure confusing and making
the runtime spec usage non-standard. Besides, this can be the very first
step of removing CompatOCISpec from config's Annotations field.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-09-05 11:05:55 +08:00
Vijay Dhanraj
d51215878d hypervisor: Fix MacVTap internetworking support in ACRN
With MacVTap internetworking, Kata fails to launch containers
with ACRN hypervisor. This was due to missing MAC address as
part of virtio-net device when launching VM. This patch fixes
this issue by adding the MAC address.

Fixes: #2029

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-09-04 14:28:11 -07:00
Vijay Dhanraj
4f0259424e doc: how-to on Kata Containers with ACRN hypervisor
Start-up guide on setting up kata containers
with ACRN hypervisor.

Fixes: #535

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-09-04 09:27:43 -07:00
Nitesh Konkar
07630b570a virtcontainers: Set sandbox dns in sandbox request
If ociMounts has DNS file /etc/resolv.conf present,
then pass the dns as part of CreateSandboxRequest to
the agent.

Depends-on: github.com/kata-containers/agent#625

Fixes: #1603

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-09-04 16:43:27 +05:30
James O. D. Hunt
52690de805 docs: Emphasise default docker config
Improved the Docker installation instructions by making it clear *which*
of the multiple ways of configuration Docker for Kata is the default,
and that it is not necessary to do anything further if users select the
automatic installation method.

Fixes: #551.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-09-04 10:49:17 +01:00
Eric Ernst
87eca1fff1
Merge pull request #2025 from katabuilder/1.9.0-alpha1-branch-bump
# Kata Containers 1.9.0-alpha1
2019-09-03 15:57:12 -07:00
katacontainersbot
f128195249 release: Kata Containers 1.9.0-alpha1
- kubernetes: update kubernetes to v1.15.3 for AArch64
- vsock: set VHOST_VSOCK_SET_GUEST_CID for ppc64le
- tests: allow running unit tests using podman
- vc: Delete store when new/create container is failed
- virtcontainers: fix kernel modules annotations
- vendor: update govmm
- kata-check: require kvm modules for amd64
- kata-check: reduce default output verbosity
- v2: Prevent killing all container processes when exec is failed
- api: add a CleanupContainer api for VC
- shim v2: add network stat in metric
- qemu: fix error message miss
- Fix the issue of update resources wrong
- monitor: enlarge watch buffer
- add virtiofsd to sandbox cgroup
- virtcontainers: Fix the issue of watching console for firecracker
- versions: update version of qemu to 4.1.0
- qemu interaction improvements
- add watchconsole for no_proxy type
- qemu: do not try to stop qemu multiple times
- do not hotplug network device when stopping sandbox
- agent: add default timeout for grpc requests
- container: do not pause a StateReady container
- sandbox: remove network before stopping vm
- virtcontainers: fix hotplug block/net devices execeed pciBridgeMaxCap…
- vsock: Propogate error for vsock ioctl
- versions: kernel: update to 4.19.65
- network: Ignore routes with proto as "kernel"
- network: Deprecate bridged networking mode.
- network: fix failed to remove network
- virtcontainers: add support for loading kernel modules
- shim-v2: fix shim leak when hypervisor exit unexpectly
- virtiofs: wait for virtiofsd process to release its resources
- pkg/katautils: Do not set `init` in the kernel command line
- virtiofs: fix virtiofs crash when cache=none
- acrn: Add toml to gitignore
- versions: Upgrade to k8s 1.15
- virtcontainers: support SMP die
- qemu: support vfio pass x-pci-vendor-id and x-pci-device-id pass
- Remove nested vendor dir
- Fix UT failures with non-root
- persist: manage "hypervisor.json" with new store
- improve robustness w.r.t. dead hypervisor
- virtcontainers: convert virtcontainers tests to testify/assert
- ci: Allow travis to use go install script

611a860 kubernetes: update kubernetes for AArch64
ba3d3da vendor: update govmm
c8e5659 virtcontainers: fix kernel modules annotations
a5f1744 vc: Delete store when new/create container is failed
8cf0f06 vsock: set VHOST_VSOCK_SET_GUEST_CID based based on arch
ff8d23d tests: allow running unit tests using podman
c91556a api: add a CleanupContainer api for VC
4cf0703 v2: Prevent killing all container processes when exec is failed
5bfca6e test: add arch required kernel modules
c54f00a kata-check: reduce default output verbosity
24fcd1b test: add a generic function for CLI kata-check command
52e68f5 virtcontainers: cleanup the container config once failed
5b749a5 virtcontainers: remove the redundant sandbox config store
50d4188 qemu: fix error message miss
0926c8d virtcontainers: Fix the issue of watching console for firecracker
0075bf8 hypervisor: allow to return a slice of pids
88e281c monitor: enlarge watch buffer
db50978 kata-check: require kvm/vhost modules for amd64
4deeb05 versions: update version of qemu to 4.1.0
4a28b52 test: add test for network metric
dc38ba7 test: fix cgroup mock test
6534357 shim-v2: add network stat in metric
21698aa vendor: update cgroup
e7457e6 qemu: add logfile when debug is on
aebc496 qemu: fix memory prealloc option handling
6c77d76 qemu: check guest status with qmp query-status
5b50b34 shimv2: cancel monitor before stopping sandbox
49184ee vendor: update govmm
d90eba8 network: always cold unplug network devices
d26ff71 Revert: "sandbox: remove network before stopping vm"
debc7d9 agent: add default timeout for grpc requests
9d4050e container: do not pause a StateReady container
b58ab66 qemu: do not try to stop qemu multiple times
794e08e sandbox: remove network before stopping vm
31ddb4d virtcontainers: add watchconsole for no_proxy type
3fc17e9 vsock: Propogate error for vsock ioctl
565f14f acrn: Change the default network model for ACRN to macvtap
2c99b95 network: Deprecate bridged networking mode.
e467293 virtcontainers: fix hotplug pci devices execeed max capacity bug
604e1ab versions: kernel: update to 4.19.65
df7cf77 network: Ignore routes with proto as "kernel"
355b9c0 virtcontainers: add support for loading kernel modules
979f064 vendor: update kata agent
0832294 pkg/katautils: Do not set `init` in the kernel command line
2058751 shim-v2: fix shim leak when hypervisor exit unexpectly
a9168a3 virtiofs: wait for virtiofsd process to release its resources
263fb64 acrn: Add toml to gitignore
6e1e6a2 virtiofs: fix virtiofs crash when cache=none
50c3e56 network: fix failed to remove network
0d0a84e versions: Upgrade to k8s 1.15
7668aeb virtcontainers: support SMP die
104c04d vendor: update govmm
e41a6b9 vendor: Update vendor directories
95e8a7a dep: Remove nested vendor directories
f3d0978 persist: improve readability
3bfbbd6 persist: merge "network.json"
99cf3f8 persist: merge "agent.json"
7d5e48f persist: manage "hypervisor.json" with new store
d5d7d82 vc: move container mount cleanup to container.go
e02f6dc shimv2: monitor sandbox liveness
262484d monitor: watch hypervisor
67c401c agent: use hypervisor pid as backup proxy pid for non-kata proxy cases
835b6e9 sandbox: do not fail SIGKILL
bc4460e sandbox: support force stop
4130913 agent: mark agent dead when failing to connect
c472a01 container: allow to stop a paused container
f886c0b vc: drop container SetPid API
f2e6a31 ci: Allow travis to use go install script
3063391 ut: skip TestBindUnmountContainerRootfsENOENTNotError for non-root
c4583f4 ut: skip TestStartNetworkMonitor for non-root
f2423e7 virtcontainers: convert virtcontainers tests to testify/assert
50e263d qemu: support vfio pass x-pci-vendor-id and x-pci-device-id pass
2cf4189 vendor: update github.com/intel/govmm

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-09-03 17:34:25 +00:00
katacontainersbot
f9cfa172ab release: Kata Containers 1.9.0-alpha1
- image_builder: create /etc/resolv.conf
- Add kmod package
- dracut: improve host distro support
- Allow to override build date with SOURCE_DATE_EPOCH
- image-builder: check /sbin/init when AGENT_INIT=yes
- chrony-service: re-patch PR#265
- image-builder: get mount directory size with Mb format
- osbuilder: add dracut build method
- fedora-rootfs: using fedora 28 on aarch64

862b077 image_builder: create /etc/resolv.conf
ce20d72 dracut: improve host distro support
495a92d rootfs-builder: add kmod package
87af599 rootfs-builder/clearlinux: reduce image size when AGENT_INIT=yes
dacd2d3 scripts/lib: Allow to override build date
9afe931 chrony-service: re-patch PR#265
b1b8ce4 image-builder: check /sbin/init when AGENT_INIT=yes
934422f tests: fix background job failure detection
317bfba travis: use Ubuntu bionic distro version
a5a3343 ci: use .ci/setup.sh from tests repo
1e5746a tests: add dracut initrd and image tests
6d5aef5 osbuilder: Get mount directory size with Mb format
2f55017 osbuilder: add dracut build method
9bfc083 fedora-rootfs: using fedora 28 on aarch64
8ebaac0 rootfs: move code from rootfs.sh to lib.sh
39370c2 rootfs-builder: support provisioning existing rootfs

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-09-03 17:34:10 +00:00
GabyCT
d0cf1cd73f
Merge pull request #549 from kata-containers/nitkon-patch-1
architecture.md: Update initrd placeholder
2019-09-03 10:20:09 -05:00
GabyCT
c017e2519d
Merge pull request #541 from marcov/howto-move
how-to: move k8s guide into a dedicate how-to md
2019-09-03 10:19:00 -05:00
Julio Montes
9e16400897
Merge pull request #2021 from Pennyzct/kubernetes_on_aarch64
kubernetes: update kubernetes to v1.15.3 for AArch64
2019-09-03 08:54:30 -05:00
Penny Zheng
611a86035b kubernetes: update kubernetes for AArch64
The latest stable kubernetes v1.15.3 has finally included the significant
commit 820a717(https://github.com/kubernetes/kubernetes/commit/
820a717bce3ef92f9280a4870d449c1e903255f2), which fixed the crash of `kubeadm
init` on AArch64 since kubernetes v1.14.0, find detailed info here
(https://github.com/kata-containers/tests/issues/1726).

Fixes: #2020

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-09-03 16:04:27 +08:00
Salvador Fuentes
4176a7c947
Merge pull request #1989 from nitkon/vsock
vsock: set VHOST_VSOCK_SET_GUEST_CID for ppc64le
2019-09-02 12:40:18 -05:00
nitkon
8e48f66b37
release.md: Fix a typo
Fix a minor typo

Fixes:  #694

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-09-02 22:53:36 +05:30
Julio Montes
284927d334
Merge pull request #2011 from marcov/podman-test
tests: allow running unit tests using podman
2019-09-02 12:13:58 -05:00
Julio Montes
d44b9f3356
Merge pull request #2014 from darfux/delete_store_when_new_or_create_cntr_fail
vc: Delete store when new/create container is failed
2019-09-02 12:13:43 -05:00
Julio Montes
52cff50e1c
Merge pull request #2017 from devimc/topic/virtcontainers/loadKernelModules
virtcontainers: fix kernel modules annotations
2019-09-02 12:12:50 -05:00
nitkon
6ce8b159c5
architecture.md: Update initrd placeholder
Update initrd placeholder. 

Fixes: #548

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-09-02 22:03:51 +05:30
Julio Montes
fe8506740b
Merge pull request #2019 from alicefr/update-govmm-skip-numa
vendor: update govmm
2019-09-02 09:24:48 -05:00
Jan Schintag
b075b5c24e s390x: add virtio-blk-ccw
Add virtio-blk-ccw support

Fixes: #1153

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Reviewed-by: Jan Schintag <jan.schintag@de.ibm.com>
2019-09-02 14:32:03 +02:00
Alice Frosi
d627585dc1 virtcontainers: add devno
The devno number is use to identify the device on IBM Z arch.

Fixes: #1153

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Reviewed-by: Jan Schintag <jan.schintag@de.ibm.com>
2019-09-02 14:32:03 +02:00
Alice Frosi
7eec67044f virtcontainers: create generic function
Create generic function to be reused to the reimplemented methods by
various architectures

Fixes: #1153

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Reviewed-by: Jan Schintag <jan.schintag@de.ibm.com>
2019-09-02 14:32:03 +02:00
Alice Frosi
e99739f9bd ccw: add ccw type as bridge
On IBM Z, CCW bus type can be additionally used.

Fixes: #1153

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Reviewed-by: Jan Schintag <jan.schintag@de.ibm.com>
2019-09-02 14:32:03 +02:00
Alice Frosi
23e607314e virtcontainers: Move bridge var in qemu type
In this way it is possible to set bridge variable for each arch when
instantiating the hypervisor.

Fixes: #1153

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Co-authored-by: Jan Schintag <jan.schintag@de.ibm.com>
2019-09-02 14:32:03 +02:00
Alice Frosi
9188774c93 bridges: abstraction of bridge type
The abstraction of the bridge type to add additional types.

Fixes: #1153

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Co-authored-by: Jan Schintag <jan.schintag@de.ibm.com>
2019-09-02 14:32:02 +02:00
James O. D. Hunt
95072b7d64
Merge pull request #538 from awprice/privileged-documentation
docs: add documentation for privileged and host devices
2019-09-02 11:42:04 +01:00
Alice Frosi
ba3d3dad7e vendor: update govmm
s389x doesn't support dimm and we need to skip it.

Fixes: #2003

detail commit change:

9463486 s390x: dimm not supported

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-09-02 12:36:17 +02:00
Julio Montes
c8e5659c07 virtcontainers: fix kernel modules annotations
Casting in golang doesn't return a pointer to the structure, instead a new
structure is instantiated. This patch is to update the old structure with
the new one in order to apply the changes.

fixes #2016

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-30 17:21:15 +00:00
Li Yuxuan
a5f1744132 vc: Delete store when new/create container is failed
The container store should be deleted when new/create is failed if the
store is newly created.

Fixes: #2013
Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-08-30 18:05:59 +08:00
Nitesh Konkar
8cf0f0602f vsock: set VHOST_VSOCK_SET_GUEST_CID based based on arch
set VHOST_VSOCK_SET_GUEST_CID depending on
the host architecture.

Fixes: #1988

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-08-30 14:36:15 +05:30
Jose Carlos Venegas Munoz
94c36df640
Merge pull request #684 from jcvenegas/depends-on
ci: azure: honor depends-on
2019-08-29 16:24:38 -05:00
Jose Carlos Venegas Munoz
9fc7246e8a sandbox: delete cgroup for SandboxOnly option
Use all subsystems for SandboxOnly option to make sure
all cgroups are deleted.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-08-29 14:08:04 -05:00
Jose Carlos Venegas Munoz
3fc6f4bc55 sandbox: add containers, do not get cgroup path
Add containers does not need to check the cgroup path
this is done in a different function

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-08-29 14:08:04 -05:00
Jose Carlos Venegas Munoz
074418f56b sandbox: Join cgroup sandbox on create.
When a new sandbox is created, join to its cgroup path
this will create all proxy, shim, etc in the sandbox cgroup.

Fixes: #1879

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-08-29 14:08:04 -05:00
Jose Carlos Venegas Munoz
2fcb8bb4d8 container: SandboxCgroupOnly: no host cgroups.
No call cgroup operations for containers in host
if SandboxCgroupOnly is enabled.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-08-29 14:08:04 -05:00
Jose Carlos Venegas Munoz
b65063248f config: add option SandboxCgroupOnly
add option to eneable only pod cgroup (SandboxCgroupOnly)

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

Fixes: #1879
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-08-29 14:08:04 -05:00
Jose Carlos Venegas Munoz
5a17d671a4 cgroups: container: check cgroup path before use it
The container CgroupsPath is optional acording to OCI.

If for some reason the runtime decide to not define one.
just skip cgroup operations.

This is going to be useful for upcoming, sandbox cgroup only
cgroup managment feature.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-08-29 14:08:04 -05:00