Commit Graph

5222 Commits

Author SHA1 Message Date
Yang Bo
3c1252ea79 vsock: support log_vport and debug_console_vport
Fixes: #61, #64

Signed-off-by: Yang Bo <bo@hyper.sh>
2020-02-04 20:32:07 +08:00
Penny Zheng
96a49a894d AArch64: arm ci failed on stale Gopkg.lock.
Arm CI failed on the following error:

Gopkg.lock is out of sync:
github.com/opencontainers/runc/libcontainer/system:
imported or required, but missing from Gopkg.lock's input-imports.

Fixes: #2434

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-02-04 16:33:38 +08:00
Penny Zheng
9bf4b859a1 AArch64: fix golint error on ARM CI.
Recently, ARM CI frequently failed on the following golint error:

Error: pkg/rootless/rootless.go:57:2: comment on exported var
`IsRootless` should be of the form `IsRootless ...` (golint)

Fixes: #2434

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-02-04 12:07:12 +08:00
Tim Zhang
c373f846f5 agent: separate logging into a single crate
Since the codes in logging.rs is weakly related to the project,
separating it from the project will reduce coupling and make it reusable.

Fixes: #131

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-02-03 20:40:26 +08:00
Julio Montes
a91cb13be8
Merge pull request #2425 from haircommander/conmon-bump
versions: bump conmon version to v2.0.5
2020-01-30 11:01:56 -06:00
Peter Hunt
2560e65e75 versions: bump conmon version to v2.0.5
in hopes the old failures were fixed, and to investigate them if not

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-01-30 10:31:42 -05:00
Salvador Fuentes
01beb2fda9
Merge pull request #2423 from andreabolognani/virtcontainers-fix-error-message
virtcontainers: Fix error message in mockHypervisor
2020-01-29 13:02:53 -06:00
Archana Shinde
db679fb869
Merge pull request #2418 from devimc/topic/virtcontainers/improveRootless
rootless: use libcontainer API to detect rootless
2020-01-29 09:31:37 -08:00
Andrea Bolognani
693ad23846 virtcontainers: Fix error message in mockHypervisor
The error raised by toGrpc() mentions Firecracker instead of
mockHypervisor, which is incorrect; the fromGrpc() functions
right above it gets this right.

Fixes: #2424

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2020-01-29 18:19:35 +01:00
Julio Montes
61d826e1b7
Merge pull request #2420 from amshinde/ipv6-support
Add Ipv6 support
2020-01-29 08:15:55 -06:00
Archana Shinde
c5d79eb2c1 ipv6: Add support for ipv6 for netmon as well.
Netmon should now handle ipv6 addresses and routes as well.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-01-28 16:31:31 -08:00
Archana Shinde
b169476be9 ipv6: Add support for ipv6
Do not ignore ipv6 addresses and routes. These are now processed
along with ipv4 addresses/routes. Add unit tests to verify ipv6.

Fixes #147

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-01-28 14:42:16 -08:00
Julio Montes
4a77b0f8ec rootless: use libcontainer API to detect rootless
libcontainer already has an API to detect if the runtime is running rootless.
Use libcontainer API instead of reinventing the wheel.

fixes #2415

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-28 21:59:51 +00:00
Graham Whaley
b602e62a0e docs: README: Minor grammatical updates
Minor updates on some wording and clarificaitons.

Fixes: #2144

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-01-28 11:04:07 +00:00
Archana Shinde
8cf66ce86b
Merge pull request #923 from devimc/topic/kernel/fixMaxCpus
kernel: use the maximum number of CPUs supported by KVM
2020-01-27 14:37:19 -08:00
GabyCT
7087d7ddc7
Merge pull request #917 from jcvenegas/fix-915
release: use absolute path for kubeconfig
2020-01-27 15:03:10 -06:00
Julio Montes
ba68012480 kernel: use the maximum number of CPUs supported by KVM
Since we don't know how many CPUs can have the host, we should
use the maximum number of CPUs supported by KVM (240).

255 is the maximum number of CPUs supported in the kernel, but the
maximmum number of CPUs recommended by KVM is 240, if more than 240
CPUs are used, next error will be returned by QEMU

```
Number of hotpluggable cpus requested (255) exceeds the
recommended cpus supported by KVM (240)
```

fixes #922
fixes kata-containers/runtime#2413

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-27 20:31:30 +00:00
Jose Carlos Venegas Munoz
f1f9414a59
Merge pull request #2411 from jcvenegas/fix-2397
vendor: update agent client
2020-01-27 12:48:26 -06:00
Salvador Fuentes
03573d4528
Merge pull request #921 from amshinde/config-ipv6-multiple-tables
network: Enable ipv6 config CONFIG_IPV6_MULTIPLE_TABLES
2020-01-27 09:42:08 -06:00
Jose Carlos Venegas Munoz
c26ce18672 vendor: update agent client
Update agent client to improve CI stability.

Changes:

660e61f Revert: client.go: HybridVSockDialer: Change Read EOT to recv peek
6cfb75d Revert: client.go: HybridVSockDialer: Check return size n of unix.Recvfrom
54eb918 Revert: client.go: HybridVSockDialer: Close dup fd after receive packet
2f49115 agent: Fix mem-hotplug on x86 when ARCH_MEMORY_PROBE is set

Fixes: #2397

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-01-27 15:29:52 +00:00
Julio Montes
09dfd79322
Merge pull request #2407 from teawater/virtio-mem2
qemu: Add virtio-mem support
2020-01-27 08:55:03 -06:00
Archana Shinde
e0a57b6a08 network: Enable ipv6 config CONFIG_IPV6_MULTIPLE_TABLES
Although CONFIG_IPV6 is enabled, this additional config is
needed so that multiple route tables are used for ipv6.
Without this, the kernel adds routes for "fe80::/64"
with proto kernel in the main table instead of the
local routing table.
This makes the behaviour similar to regular containers.

Fixes #920

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-01-24 16:14:22 -08:00
Julio Montes
003d0d637a
Merge pull request #589 from devimc/topic/design/updateHostCgroups
design: update host-cgroups documentation according to the new changes
2020-01-24 11:56:59 -06:00
Julio Montes
1fa12cf5a2 design: update host-cgroups documentation according to the new changes
update host-cgroups documentation according to the new changes in the runtime

fixes #588

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-24 15:53:18 +00:00
GabyCT
e416a0ec61
Merge pull request #2409 from devimc/topic/virtcontainers/cgroupsV2
virtcontainers: constrain docker container when sandbox_cgroup_only=true
2020-01-24 08:54:20 -06:00
Hui Zhu
01a12b003b qemu: Add virtio-mem support
This commit adds qemu virtio-mem support.
Then qemu can use virtio-mem support memory resize.

To enable this function, need the Linux and the qemu that support
virtio-mem.
Use command "echo 1 > /proc/sys/vm/overcommit_memory" to enable memory
overcommitment of the Linux kernel.  Because qemu virtio-mem device need
to allocate a lot of memory.
Set "enable_virtio_mem" of kata configuration to true.

Fixes: #2406

Signed-off-by: Hui Zhu <teawater@antfin.com>
2020-01-24 17:19:31 +08:00
Julio Montes
c3cf98aca6 virtcontainers: constrain docker container when sandbox_cgroup_only=true
The sandbox cgroup will be constrained if there is no container
type annotation, otherwise kata will rely on container engine's cgroup
configuration

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

fixes #2408

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-23 21:25:22 +00:00
GabyCT
a51efa9ada
Merge pull request #587 from dong-liuliu/xliu2/spdk-vhost-user
use-cases: Add initial SPDK vhost-user instructions
2020-01-23 13:35:36 -06:00
Graham Whaley
ec13b28567
Merge pull request #2404 from c3d/minor-fixes
Fix typo in 'sandbox'
2020-01-23 09:37:04 +00:00
Julio Montes
54482f18df virtcontainers: remove json cgroups struct tag
json struct tags are not longer needed in sandbox's structures

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-22 22:40:35 +00:00
Hui Zhu
b337428947 vendor: Update github.com/intel/govmm
Update github.com/intel/govmm.

shortlog:
    6667f4e qmp_test: Add TestExecMemdevAdd and TestExecQomSet
    201fd0a qmp: Add ExecMemdevAdd and ExecQomSet API
    e04be2c qmp: add ExecutePCIVhostUserDevAdd API
    13aeba0 qmp: support command 'chardev-remove'
    6d6b2d8 s390x: add s390x travis support

Fixes: #2406

Signed-off-by: Hui Zhu <teawater@antfin.com>
2020-01-22 13:50:54 +08:00
Liu Xiaodong
7f5873159a use-cases: Add initial SPDK vhost-user instructions
These instructions cover how to install and setup SPDK
vhost-user target, construct a vhost-user-blk device based
memory, configure the vhost-user-blk device to be available
for kata container, and run kata container with SPDK
vhost-user-blk device via docker.

Fixes: #586

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-01-21 22:34:38 -05:00
Archana Shinde
4d47c3fa8d
Merge pull request #585 from jodh-intel/add-debian-10
docs: Add Debian 10 to distro table
2020-01-21 16:56:22 -08:00
Christophe de Dinechin
316b5f2b2c virtcontainers: Fix typo in logger message
There is a typo "sandox" instead of "sandbox" in a logger warning

Fixes: #2405

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-01-21 17:04:33 +01:00
Julio Montes
7526f4957d
Merge pull request #398 from devimc/topic/imagebuilder/configureDockerRuntime
image-builder: make docker runtime configurable
2020-01-20 16:19:37 -06:00
Julio Montes
c407421a26 image-builder: make docker runtime configurable
Add DOCKER_RUNTIME variable to change container runtime depending on the
CI/environment.

fixes #397

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-20 20:39:04 +00:00
Julio Montes
73a63baab5
Merge pull request #2308 from tedyu/mount-detach-device
vc: Detach device when unable to store sandbox device
2020-01-20 14:14:11 -06:00
Ted Yu
1f957e1b87 vc: Detach device when unable to store sandbox device
In Container#mountSharedDirMounts, if sandbox.storeSandboxDevices() returns error, we should detach the device.

Fixes #2301

Signed-off-by: Ted Yu yuzhihong@gmail.com
2020-01-20 09:39:19 -08:00
Julio Montes
df802cc359
Merge pull request #2399 from Pennyzct/cleanup_dir_temp
unit-test: cleaning up stale files under /tmp
2020-01-20 09:38:55 -06:00
Julio Montes
ae6d43470a
Merge pull request #583 from grahamwhaley/20200115_toc_doc
docs: reqs: add link/recommendation to check-markdown
2020-01-20 08:43:10 -06:00
James O. D. Hunt
b5e741ba8b
Merge pull request #125 from lifupan/fix_agent_crash
agent: fix the issue of crash agent without spec
2020-01-20 11:29:16 +00:00
James O. D. Hunt
174f9abee8
Merge pull request #127 from lifupan/fix_cwd
fix the issue of missing restore process's cwd
2020-01-20 11:28:11 +00:00
James O. D. Hunt
e45be66e72 docs: Add Debian 10 to distro table
Now that [1] has landed, update the list of supported distros to include
Debian 10.

[1] - https://github.com/kata-containers/packaging/issues/647

Fixes: #584.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-01-20 09:34:13 +00:00
fupan.lfp
2be8661ffa agent: fix the issue of missing restore process's cwd
It should restore to it's previous cwd after it
create container in which it would change it's
cwd to container's bundle path.

Fixes: #126

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-01-20 11:00:48 +08:00
fupan.lfp
6c7453db78 agent: fix the issue of crash agent without spec
To check is the oci spec passed in, other wise,
it would crash the agent unwrap it directly.

Fixes: #124

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-01-18 18:26:01 +08:00
Julio Montes
0e4c497c68
Merge pull request #395 from fidencio/wip/cleanup_nsdax
image_builder: Remove nsdax binary after its usage
2020-01-17 10:33:28 -06:00
Fabiano Fidêncio
98ac62dec9 image_builder: Remove nsdax binary after its usage
Leaving nsdax behind may create some isses for the distro packages
of kata-osbuilder, as every package would have to take care of purging
the file on each distro.

Knowing that, we better remove the file as part of the script, mainly
because the file is already regenerated everytime in any case.

Fixes: #394

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-01-17 13:30:11 +01:00
Penny Zheng
7186c01d6e unit-test: delete what ioutil.TempFile creates
ioutil.TempFile creates a new temporary file in the directory dir.
It is the caller's responsibility to remove the file
when no longer needed.

Fixes: #2398

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-01-17 15:29:50 +08:00
Penny Zheng
0244d95edd unit-test: delete what ioutil.TempDir() creates
Normally, ioutil.TempDir will create a new temporary
dir under /tmp.
And we should do cleaning up after ioutil.TempDir().

Fixes: #2398

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-01-17 13:50:51 +08:00
Penny Zheng
aa62781aa7 unit-test: reconstuct TestMain
os.Exit will skip all deferred instructions.
So we should reconstruct TestMain to leave all setup-related
code in setup(), and all cleanup-related code in shutdown().

Fixes: #2398

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-01-17 13:50:42 +08:00