Commit Graph

6963 Commits

Author SHA1 Message Date
Ruidong Cao
df9a4015a5 Network: remove Physical field in VethEndpoint
This a bool field. It is useless because veth endpoint is never a
physical endpoint.

Fixes #1343

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2019-03-09 03:29:27 +08:00
Sebastien Boeuf
80cdf895c5
Merge pull request #1166 from teawater/vm_cache
VMCache: the new function that creates VMs as caches before using it
2019-03-08 07:52:11 -08:00
Julio Montes
d1a9aa7aea kernel: pmem device should map pages
enable ZONE_DEVICE config to support map pages, pmem_should_map_pages()
function fails if this config is not enabled.

fixes #378

Signed-off-by: Julio Montes <julio.montes@intel.com
2019-03-08 09:26:32 -06:00
Hui Zhu
76d9db3e0b vendor: Add github.com/gogo/protobuf
VMCache code use github.com/gogo/protobuf.

Fixes: #52

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-08 20:59:00 +08:00
James O. D. Hunt
ff67e32d30
Merge pull request #395 from grahamwhaley/20190307_CODEOWNERS
ci: add a CODEOWNERS file to cover .md files
2019-03-08 08:36:38 +00:00
Ganesh Maharaj Mahalingam
45fe8700b8 runtime: Add unit tests
Add unit tests for the rootfs patch

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-03-07 23:50:24 -08:00
Hui Zhu
0f8b2ad007 VMCache: Update factory to run as a VMCache server
When VMCache is enabled, factory init will run as a VMcache server.

Fixes: #52

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-08 10:06:38 +08:00
Hui Zhu
90704c8bb6 VMCache: the core and the client
VMCache is a new function that creates VMs as caches before using it.
It helps speed up new container creation.
The function consists of a server and some clients communicating
through Unix socket.  The protocol is gRPC in protocols/cache/cache.proto.
The VMCache server will create some VMs and cache them by factory cache.
It will convert the VM to gRPC format and transport it when gets
requestion from clients.
Factory grpccache is the VMCache client.  It will request gRPC format
VM and convert it back to a VM.  If VMCache function is enabled,
kata-runtime will request VM from factory grpccache when it creates
a new sandbox.

VMCache has two options.
vm_cache_number specifies the number of caches of VMCache:
unspecified or == 0   --> VMCache is disabled
> 0                   --> will be set to the specified number
vm_cache_endpoint specifies the address of the Unix socket.

This commit just includes the core and the client of VMCache.

Currently, VM cache still cannot work with VM templating and vsock.
And just support qemu.

Fixes: #52

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-08 10:05:59 +08:00
Eric Ernst
3cecb36902 kata-deploy: containerd-v2: specify configuration file for runtime
Eventually containerd will allow us to provide an argument for a given
runtime handler, but in the meantime, let's use bash to provide
indirection to specify the appropriate configuration file.

Only QEMU is handled until we have a block based snapshotter available.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-07 15:56:49 -08:00
Eric Ernst
f04fac8fae kata-deploy: add support for v2 shim
Add support for the v2-shim integration with containerd. This registers
a runtimeClass named 'kata', utilizing the containerd-shim-kata-v2
binary.

This change adds volume mounts (hopefully temporarily) for
/usr/local/bin, as containerd requires the shim binary be within the
existing path.

Fixes: #323

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-07 13:05:54 -08:00
Graham Whaley
9ef7c75191 ci: add CODEOWNERS to cover .md files
Add a CODEOWNERS file to get github auto review requests
for any .md file changes.

Fixes: #383

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-03-07 11:14:42 +00:00
Graham Whaley
0f45a33684 ci: add a CODEOWNERS file to cover .md files
Add a CODEOWNERS file so we get auto-review requests from github
for any .md file changes.

Fixes: #394

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-03-07 11:09:47 +00:00
Penny Zheng
d8bcddb3d1 qemu-arm64: add unit test for func appendImage on aarch64
Since we overrided the func appendImage for aarch64, we should also
provide related unit test.

Fixes: #843

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-03-07 18:38:40 +08:00
Penny Zheng
986e4dc7b8 qemu-arm64: Support nvdimm on arm64
Original guest image was reprensented as block device in qemu-aarch64,
and it will bring up write lock error when running multiple containers.
Thanks to the new expanded IPA_SIZE feature in kernel 4.20 and
Eric Auger's related patch set in qemu(which are still under upstream
review), we could fully support nvdimm on arm64.

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

Fixes: #843

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-03-07 18:08:11 +08:00
Julio Montes
351d9b7a62
Merge pull request #373 from GabyCT/topic/addextraflags
kernel: Add missing config option
2019-03-06 12:52:26 -06:00
Julio Montes
169fa9531a
Merge pull request #381 from chavafg/topic/rm-kernel-test-script
kernel: remove build-kernel_test.sh
2019-03-06 10:45:40 -06:00
Salvador Fuentes
425c9e89c6
Merge pull request #345 from jcvenegas/kernel-changes-docs
docs: kernel: Describe how to do kernel changes.
2019-03-06 10:39:11 -06:00
Alice Frosi
8ba27e14a1 s390x: remove pmu from test
Remove pmu option because it is not used and the test TestQemuS390xCPUModel
fails because the option is present

Fixes: #1329

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-03-06 17:02:15 +01:00
Alice Frosi
6242af34e4 s390x: fix TestQemuS390xMemoryTopology
The memory parameters of the test are wrong

Fixes: #1329

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-03-06 17:02:15 +01:00
Salvador Fuentes
1fbeaec69e kernel: remove build-kernel_test.sh
`build-kernel_test.sh` builds the kernel when there are changes
of it in a PR and then runs the whole CI tests. Now we are running
all CI tests on all changes[1] (not only when there is a kernel change).
This is making the CI to run all tests twice when there is a change
in the kernel, so we need to remove the script.

[1] https://github.com/kata-containers/packaging/pull/348

Fixes: #380.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-03-06 08:51:17 -06:00
Graham Whaley
ec6a1cc823
Merge pull request #1313 from jcvenegas/fix-unit-test
unit test: Fix local test
2019-03-06 10:18:51 +00:00
Alice Frosi
613edd5195 s390x: fix golint complain
Changed capital letter of VirtioSerialCCW to avoid golint complain

Fixes : #1327

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-03-06 10:38:17 +01:00
Frank Cao
c986a08ad9
Merge pull request #1243 from grahamwhaley/20190214_uscan_urls
Add upstream version url regexp's to allow upto date checks
2019-03-06 17:08:19 +08:00
Gabriela Cervantes
f93b9878ee kernel: Add missing config option
This will add missing config option (DRM_FBDEV_LEAK_PHYS_SMEM) that are
being asked while running the installation script for kata kernel. Also,
this jumps to the current kernel version that is being used at the runtime.

Fixes #372

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-03-06 02:32:07 -06:00
Ganesh Maharaj Mahalingam
27a92f94c8 runtime: Fix rootfs mount assumptions
This patch fixes the issue where various version of snapshotters,
overlay, block based graphdriver, containerd-shim-v2 overlay, block
based snapshotters mount & create rootfs differently and kata should be
able to handle them all.

The current version of the code always assumes that a folder named
'rootfs' exists within the mount device and that is the path the
container should start at. This patch checks the existing mount point
and if it is the same as the rootFs passed to the container, we no
longer add a suffix to the container's rootfs path.

Fixes: #1325

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
Co-Authored-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-03-05 13:41:37 -08:00
Jose Carlos Venegas Munoz
c964a26476 virtcontainers: makefile fix .ci path
If enter to vircontainers directory and do make check-go-test, the makefile
does not found the kata .ci directory use relative path to makefile.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-03-05 14:12:46 -06:00
Julio Montes
55ac2559f5
Merge pull request #368 from devimc/topic/snap-1.5.1
snap: release 1.5.1
2019-03-05 13:52:09 -06:00
Jose Carlos Venegas Munoz
fcee080a2d unit-test: Fix local test
Simplify empty string proxy type handling and cast invalid proxy type to
ProxyType.

Fixes: #1312

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-03-05 13:51:15 -06:00
Julio Montes
7a4ee11cd1 snap: release 1.5.1
bump release version and delete hotfix patches

fixes #367

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-05 11:12:17 -06:00
Jose Carlos Venegas Munoz
9530002c47 docs: kernel: Describe how to do kernel changes.
Add documentation on how the kernel is tested and how changes could be
introduced.

Fixes: #344

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-03-05 10:15:45 -06:00
Sebastien Boeuf
e2c17661b0
Merge pull request #1322 from lifupan/fixconsole
virtcontainer: watch the qemu's console when proxy's debug enabled
2019-03-05 06:50:57 -08:00
Jose Carlos Venegas Munoz
c84bbf4a94 pkgs: disable CONFIG_RETPOLINE for RHEL
The gcc provided has not support for it.

Fixes: #369

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-03-05 08:35:35 -06:00
Graham Whaley
866da10f27
Merge pull request #1304 from Pennyzct/unit-test-2019/3/1
unit-test: fix undefined struct field SupportVSocks on arm64
2019-03-05 11:02:43 +00:00
Graham Whaley
8aedafad60
Merge pull request #1321 from teawater/makea64
Makefile: Fix aarch64 fail in No GO command or GOPATH not set mode
2019-03-05 10:12:49 +00:00
fupan
c4957ddd8d virtcontainer: watch the qemu's console when proxy's debug enabled
kata builtin proxy has always watched the qemu's console
whether proxy's debug is set or not, this is not aligned
with kata cli. This patch will change it and watch the
qemu's console only when proxy's debug is set in kata config.

Fixes: #1318

Signed-off-by: fupan <lifupan@gmail.com>
2019-03-05 17:09:26 +08:00
Eric Ernst
5dda0b7eea
Merge pull request #1317 from jodh-intel/fix-runtime-tracing
tracing: Fix tracing
2019-03-04 21:11:39 -08:00
l00397676
1e30673adc test: add tests for sandbox creation rollback and cleanup
Adding unit tests for rollback ops when sandbox creation failling.

Fixes: #1257

Signed-off-by: l00397676 <lujingxiao@huawei.com>
2019-03-05 11:00:35 +08:00
Xu Wang
886d859fbe
Merge pull request #1316 from lifupan/fixconfig
config: check the builtIn first when updating shim/proxy/agent
2019-03-05 09:52:39 +08:00
Hui Zhu
bdb34e7617 Makefile: Fix aarch64 fail in No GO command or GOPATH not set mode
Got aarch64 fail in No GO command or GOPATH not set mode:
Makefile:38: arch/aarch64-options.mk: No such file or directory
Makefile:237: *** "ERROR: No hypervisors known for architecture aarch64 (looked for: firecracker qemu)".  Stop.

The cause is the machine hardware name of aarch64 is aarch64 but
runtime's arch make file's name is arm64-options.mk.

This commit convert aarch64 to arm64 to fix the issue.

Fixes: #1320

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-05 09:48:03 +08:00
Eric Ernst
a2fe01131d
Merge pull request #374 from jodh-intel/pin-docker-to-version-18.06
docs: Pin docker to version 18.06
2019-03-04 10:43:20 -08:00
Sebastien Boeuf
56a5accad0
Merge pull request #1307 from shaojiaxue/master
qemu: fix devID value error
2019-03-04 07:40:14 -08:00
Jose Carlos Venegas Munoz
837451b7ea versions: update versions file to 1.5.1
Update versions file

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-03-04 08:43:20 -06:00
Jose Carlos Venegas Munoz
54c4a017f0 lib: pkgs: Dont query host version file.
We do releases based on kata branches lets get a fresh
versions file as the one in the host may be not updated.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-03-04 08:41:27 -06:00
Graham Whaley
f8acf38d7f
Merge pull request #361 from tuan-hoang1/s390x-4.19.24
kernel: update to 4.19.24 on s390x
2019-03-04 13:26:16 +00:00
Tuan Hoang
7839a5c276 kernel: CPU hotplug on s390x
Add CONFIG_CFS_BANDWIDTH so CPU hotplug feature works on s390x. Note
that CPU hot-unplug does not work yet due to limitations in qemu s390x.

Fixes #360

Signed-off-by: Tuan Hoang <tmhoang@linux.vnet.ibm.com>
2019-03-04 13:41:56 +01:00
Tuan Hoang
c1f8242e82 kernel: update to 4.19.24 on s390x, remove USB support
Remove CONFIG_USB_SUPPORT because s390x doesn't do USB.

Fixes #360

Signed-off-by: Tuan Hoang <tmhoang@linux.vnet.ibm.com>
2019-03-04 13:34:48 +01:00
James O. D. Hunt
c759cf5f37 tracing: Fix tracing
The store refactor (#1066) inadvertently broke runtime tracing as it
created new contexts containing trace spans.

Reworking the store changes to re-use the existing context resolves the
problem since runtime tracing assumes a single context.

Fixes #1277.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-04 11:02:31 +00:00
fupan
31232b4416 config: check the builtIn first when updating shim/proxy/agent
Check the "builtIn" first when updating the shim/proxy/agent,
thus can avoid checking the shim/proxy's binary files path which
is needless for "builtIn" type.

Fixes: #1314

Signed-off-by: fupan <lifupan@gmail.com>
2019-03-04 16:25:08 +08:00
fli
2af09d1d58
Merge pull request #1286 from teawater/nogomode
Makefile: Change "GOPATH not set" to "No GO command"
2019-03-04 09:37:56 +08:00
xueshaojia 00464843
03dd780ddd qemu: fix devID value error
reason: When excutes ExecuteNetCCWDeviceAdd, the DevID is always "virtio-".
If add-iface multy times, qemu may report "dumplicated id:virtio-".

Fixes: #1305

Signed-off-by: xueshaojia <xueshaojia@huawei.com>
2019-03-04 09:01:38 +08:00