Commit Graph

1760 Commits

Author SHA1 Message Date
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
94c47dcecd
Merge pull request #1965 from jschintag/virtio-blk-ccw
s390x: add virtio-blk-ccw support
2019-09-05 08:46:08 +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
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
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
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
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
James O. D. Hunt
a1e0a4c3f5
Merge pull request #1986 from marcov/kvm-required
kata-check: require kvm modules for amd64
2019-08-29 16:31:27 +01:00
Marco Vedovati
ff8d23d75f tests: allow running unit tests using podman
Refactor unit test so that podman can be used to run tests when docker
is not available.

Fixes: #2006

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-29 17:06:50 +02:00
Jose Carlos Venegas Munoz
af574851be
Merge pull request #1987 from marcov/kata-check-quiet
kata-check: reduce default output verbosity
2019-08-27 17:03:51 -05:00
Eric Ernst
e7c785ed19
Merge pull request #2002 from darfux/prevent_killing_cntr_with_failed_exec
v2: Prevent killing all container processes when exec is failed
2019-08-25 13:59:54 +08:00
Peng Tao
3fb872911e
Merge pull request #1833 from lifupan/fix_cleanuprace
api: add a CleanupContainer api for VC
2019-08-24 14:34:10 +08:00
lifupan
c91556aa41 api: add a CleanupContainer api for VC
When shimv2 was killed by accident, containerd would try to
launch a new shimv2 binarry to cleanup the container. In order
to avoid race condition, the cleanup should be done serialized
in a sandbox. Thus adding a new api to do this by locking the
sandbox.

Fixes:#1832

Signed-off-by: lifupan <lifupan@gmail.com>
2019-08-24 08:16:02 +08:00
Li Yuxuan
4cf0703c58 v2: Prevent killing all container processes when exec is failed
If an exec is failed(such as executable file not found in $PATH), the
`execs.id` will be empty. This leads to all the container processes
being killed when calling `Kill` on such exec id.

Fixes: #2001
Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-08-24 00:25:55 +08:00
Peng Tao
eb0a3d23d9
Merge pull request #1977 from Ace-Tang/network-metric
shim v2: add network stat in metric
2019-08-23 19:57:28 +08:00
Peng Tao
1b2ec4e39e
Merge pull request #1992 from Ace-Tang/fix-error
qemu: fix error message miss
2019-08-23 19:53:19 +08:00
Marco Vedovati
5bfca6e38e test: add arch required kernel modules
Add a test for the checkKernelModules returned error count value.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-23 11:48:18 +02:00
Peng Tao
346d96ce4e
Merge pull request #1998 from lifupan/fix_wrongresources
Fix the issue of update resources wrong
2019-08-23 10:11:49 +08:00
Marco Vedovati
c54f00a7ca kata-check: reduce default output verbosity
Update kata-check to print by default only relevant information about
the ability to run / create Kata Containers, and omit the list of checks
performed. Checks can still be printed using the --verbose flag.

Fixes: #1944

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-22 20:18:26 +02:00
Marco Vedovati
24fcd1b37d test: add a generic function for CLI kata-check command
Add a generic function to run CLI kata-check tests, shared by all the
args.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-22 20:18:26 +02:00
lifupan
52e68f5fce virtcontainers: cleanup the container config once failed
When create container failed, it should delete the container
config from sandbox, otherwise, the following new creating container
would get a wrong resources caculating which would contain the previous
failed container resources such as memory and cpu.

Fixes: #1997

Signed-off-by: lifupan <lifupan@gmail.com>
2019-08-22 17:43:04 +08:00
Fupan Li
9a6e299827
Merge pull request #1984 from Ace-Tang/fix-monitor-hang
monitor: enlarge watch buffer
2019-08-22 14:20:06 +08:00
lifupan
5b749a56d8 virtcontainers: remove the redundant sandbox config store
The following storeSandbox() will store the sandbox config
data, thus there is no need to store it specifically before
run storeSandbox().

Signed-off-by: lifupan <lifupan@gmail.com>
2019-08-22 12:48:14 +08:00
Hui Zhu
0db6974ace
Merge pull request #1973 from bergwolf/hypervisor-pid
add virtiofsd to sandbox cgroup
2019-08-22 10:58:50 +08:00
Salvador Fuentes
a5b127b1c4
Merge pull request #1990 from lifupan/fix_consolewatching
virtcontainers: Fix the issue of watching console for firecracker
2019-08-21 14:11:07 -05:00
Ace-Tang
50d4188524 qemu: fix error message miss
strErr is qemu log message, should add err in error message, or if fail
before launch qemu, can not get corrent message.

Fixes: #1991

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-08-21 21:11:08 +08:00
lifupan
0926c8d9b4 virtcontainers: Fix the issue of watching console for firecracker
Since firecracker hasn't support console watching by now, so skip
watching console if the consoleURL is empty.

Fixes: #1970

Signed-off-by: lifupan <lifupan@gmail.com>
2019-08-21 20:19:42 +08:00
Peng Tao
0075bf85ba hypervisor: allow to return a slice of pids
so that for qemu, we can save and export virtiofsd pid,
and put it to the same cgroup as the qemu process.

Fixes: #1972
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-21 11:37:01 +08:00
Ace-Tang
88e281cb14 monitor: enlarge watch buffer
enlarge watch buffer, or no one consume monitor watcher if shim.Wait and shim.watchSandbox
simultaneously receive signal

goroutine 60 [semacquire, 641 minutes]:
sync.runtime_SemacquireMutex(0xc00037a144, 0x42cd00)
/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc00037a140)
/usr/local/go/src/sync/mutex.go:134 +0x109
github.com/kata-containers/runtime/virtcontainers.(*monitor).stop(0xc00037a140)
/go/src/github.com/kata-containers/runtime/virtcontainers/monitor.go:95 +0x5f
github.com/kata-containers/runtime/virtcontainers.(*Sandbox).Delete(0xc0003c8160, 0x78effdc01, 0x0)
/go/src/github.com/kata-containers/runtime/virtcontainers/sandbox.go:773 +0x4fb
github.com/kata-containers/runtime/containerd-shim-v2.wait(0xc000478b80, 0xc000338240, 0x0, 0x0, 0x107d540, 0xc0000100f0, 0x107d520)
/go/src/github.com/kata-containers/runtime/containerd-shim-v2/wait.go:60 +0x3e5
created by github.com/kata-containers/runtime/containerd-shim-v2.startContainer
/go/src/github.com/kata-containers/runtime/containerd-shim-v2/start.go:74 +0x3e5

goroutine 53 [chan send, 641 minutes]:
github.com/kata-containers/runtime/virtcontainers.(*monitor).notify(0xc00037a140, 0x107cfe0, 0xc0001ec160)
/go/src/github.com/kata-containers/runtime/virtcontainers/monitor.go:87 +0xed
github.com/kata-containers/runtime/virtcontainers.(*monitor).watchAgent(0xc00037a140)
/go/src/github.com/kata-containers/runtime/virtcontainers/monitor.go:125 +0xab
github.com/kata-containers/runtime/virtcontainers.(*monitor).newWatcher.func1(0xc00037a140)
/go/src/github.com/kata-containers/runtime/virtcontainers/monitor.go:59 +0x72
created by github.com/kata-containers/runtime/virtcontainers.(*monitor).newWatcher
/go/src/github.com/kata-containers/runtime/virtcontainers/monitor.go:49 +0x125

Fixes: #1981

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-08-21 11:35:48 +08:00
Marco Vedovati
db5097835a kata-check: require kvm/vhost modules for amd64
KVM/vhost modules are required when using QEMU or firecracker.

Fixes: #1985

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-20 17:58:11 +02:00
Salvador Fuentes
1935bf193c
Merge pull request #1979 from devimc/topic/versions/bumpQemu
versions: update version of qemu to 4.1.0
2019-08-20 09:25:54 -05:00
Julio Montes
4deeb058db versions: update version of qemu to 4.1.0
Update qemu version to bring the latest fixes and improvements:
* migration: allow private destination ram with x-ignore-shared
* hw/i386: Fix linker error when ISAPC is disabled
* hw/i386: turn off vmport if CONFIG_VMPORT is disabled

Depends-on: github.com/kata-containers/packaging#680

fixes #1978

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-19 15:39:47 +00:00
Ace-Tang
4a28b52553 test: add test for network metric
add test for metric interface

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-08-19 19:42:54 +08:00
Ace-Tang
dc38ba77bd test: fix cgroup mock test
fix cgroup mock test because of containerd/cgroup vendor update

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-08-19 18:15:06 +08:00
Ace-Tang
6534357925 shim-v2: add network stat in metric
improve metric message, add network stat, base on agent PR: #538 and
containerd/cgroup PR #81

Fixes: #1976

Signed-off-by: ZeroMagic <anthonyliu@zju.edu.cn>
Signed-off-by: Ace-Tang <aceapril@126.com>
2019-08-19 18:15:06 +08:00
Ace-Tang
21698aadc1 vendor: update cgroup
detail commit change

$ git log --no-merges --abbrev-commit --pretty=oneline "5017d4e9a9cf2d4381db99eacd9baf84b95bfb14..c4b9ac5c7601384c965b9646fc515884e091ebb9" | sed 's/^/    /g'
    f627015 avoid adding io_serviced and io_service_bytes duplicately
    13a3ac4  fixed an issue with invalid soft memory limits
    215221e Add makefile for go and protos
    0ecd2b6 cgroups: fix MoveTo function fail problem
    38dc3ac Correct forked Travis builds
    a9a304a Add Go 1.12 to Travis
    51dcf5f Fix cgroup hugetlb size prefix for kB
    1741ae0 add network stats
    453efe3 Return ErrCgroupDeleted when no subsystems
    4a9f0f7 Add SkipOpts for handling how subsystems are registered
    4dacf2b Check for non-active/supported cgroups
    2fd912c Add tests for pids
    afd5981 Gofmt cgroup_test
    f48bd85 Fixs return error message
    64bade4 Take value instead of pointer value
    b49c471 Correct ineffassign warning
    6b552a8 Fix net_prio typo
    a31a0ff Add functionality for retrieving all tasks of a cgroup
    7d825b2 Add test for cgroups load when missing hierarchy in one subsystem
    f6cbfb4 Change Load function in order to be more lenient on subsystems' checking
    ab9ec0e Add go-systemd dep for CI testing
    9a09e58 Fix gofmt of systemd.go
    e13f6cc Add GoReportCard badge to README
    d124595 Add Go 1.11 to Travis
    d961ab9 Correct typo
    e4cf832 Add project references and use common project travis
    9de57ff Add godoc badge to README.md

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-08-19 16:31:15 +08:00