Commit Graph

6199 Commits

Author SHA1 Message Date
Julio Montes
a95b359861 kernel/configs: enable CONFIG_X86_MPPARSE
Firecracker needs CONFIG_X86_MPPARSE to support `vcpu_count`, otherwise the
amount of cpus wil always be 1.

fixes #901

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-14 16:55:36 +00:00
Peng Tao
c3629d37c4
Merge pull request #2239 from WeiZhang555/persist-storage
Land experimental "newstore" as formal feature
2020-01-14 13:12:05 +08:00
Julio Montes
3660bb426f
Merge pull request #2387 from devimc/topic/qemu/bump-4.1.1
versions: update qemu to 4.1.1
2020-01-13 10:15:20 -06:00
Julio Montes
0af481979b versions: update qemu to 4.1.1
Fixes CVE-2019-12068

fixes #2388

shortlog:
99c5874a9b Update version for 4.1.1 release
e092a17d38 mirror: Keep mirror_top_bs drained after dropping permissions
088f1e8fd9 block/create: Do not abort if a block driver is not available
145b562990 vhost: Fix memory region section comparison
42b6571357 memory: Provide an equality function for MemoryRegionSections
c0aca9352d memory: Align MemoryRegionSections fields
54c130493c tests: make filemonitor test more robust to event ordering
3d018ff3bd block: posix: Always allocate the first block
f0d3fa265d file-posix: Handle undetectable alignment
7db05c8a73 block/file-posix: Let post-EOF fallocate serialize
d9b88f7e0d block: Add bdrv_co_get_self_request()
590cff8230 block: Make wait/mark serialising requests public
2e2ad02f2c block/io: refactor padding
b3b76fc643 util/iov: improve qemu_iovec_is_zero
cff024fe85 util/iov: introduce qemu_iovec_init_extended
40df4a1bf7 qcow2-bitmap: Fix uint64_t left-shift overflow
b156178553 iotests: Add peek_file* functions
15f5e8c367 iotests: Add test for 4G+ compressed qcow2 write
405deba14f qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK
01be50603b virtio-blk: Cancel the pending BH when the dataplane is reset
051c9b3cbc scsi: lsi: exit infinite loop while executing script
           (CVE-2019-12068)
b387531323 target/xtensa: regenerate and re-import test_mmuhifi_c3 core
cdc6896659 target/arm: Allow reading flags from FPSCR for M-profile
c0b35d87de hbitmap: handle set/reset with zero length
fcd7cba6ac util/hbitmap: strict hbitmap_reset
aea18ef938 COLO-compare: Fix incorrect `if` logic
4887acf574 virtio-net: prevent offloads reset on migration
8010d3fce0 virtio: new post_load hook
6705b9344f ui: Fix hanging up Cocoa display on macOS 10.15 (Catalina)
c0e2fbf124 mirror: Do not dereference invalid pointers
b077ac637d iotests: Test large write request to qcow2 file
9e51c5306c qcow2: Limit total allocation range to INT_MAX
aae0faa5d3 hw/core/loader: Fix possible crash in rom_copy()
7b404cae7f vhost-user: save features if the char dev is closed
d868d30db6 iotests: Test internal snapshots with -blockdev
7a8aa6c734 block/snapshot: Restrict set of snapshot nodes
331c08d300 s390: PCI: fix IOMMU region init
fc5afb1a92 roms/Makefile.edk2: don't pull in submodules when building from
           tarball
c5c9b1362d make-release: pull in edk2 submodules so we can build it from
           tarballs
220816989c hw/arm/boot.c: Set NSACR.{CP11,CP10} for NS kernel boots
783e7eb52c block/backup: fix backup_cow_with_offload for last cluster
e01ed1a1ae block/backup: fix max_transfer handling for copy_range
416a692e51 qcow2: Fix corruption bug in qcow2_detect_metadata_preallocation()
e9bb3d942e coroutine: Add qemu_co_mutex_assert_locked()
84f22c7285 block/qcow2: Fix corruption introduced by commit 8ac0f15f335
86b0f4022b blockjob: update nodes head while removing all bdrv
2d86df1f78 curl: Handle success in multi_check_completion
18e1b71937 curl: Report only ready sockets
0888ddac8e curl: Pass CURLSocket to curl_multi_do()
4be97ef966 curl: Check completion in curl_multi_do()
78ea94e389 curl: Keep *socket until the end of curl_sock_cb()
3648493495 curl: Keep pointer to the CURLState in CURLSocket
0694c489cd block/nfs: tear down aio before nfs_close
c9ffb12754 qcow2: Fix the calculation of the maximum L2 cache size
28a9a3558a libvhost-user: fix SLAVE_SEND_FD handling
9027d3fba6 target/arm: Don't abort on M-profile exception return in linux-user
           mode
38fb634853 target/arm: Free TCG temps in trans_VMOV_64_sp()
ad95e0573e iotests: Test blockdev-create for vpc
593beeaf81 iotests: Restrict nbd Python tests to nbd
eee776fbc0 iotests: Restrict file Python tests to file
819ba23575 iotests: Add supported protocols to execute_test()
4d9bdd3149 iotests: add testing shim for script-style python tests
97c478c355 vpc: Return 0 from vpc_co_create() on success
725dfa851f x86: do not advertise die-id in query-hotpluggbale-cpus if
           '-smp dies' is not set
57fdf4a13f pr-manager: Fix invalid g_free() crash bug
3361d03ff0 iotests: Test reverse sub-cluster qcow2 writes
6f1a94035b block/file-posix: Reduce xfsctl() use
c12adfd8f6 xen-bus: check whether the frontend is active during device reset...
b6cedc911e xen-bus: Fix backend state transition on device reset
7ebcd375ad pc: Don't make die-id mandatory unless necessary
4bfd496be3 target/alpha: fix tlb_fill trap_arg2 value for instruction fetch
499a5d6bb4 s390x/tcg: Fix VERIM with 32/64 bit elements
73a5bf4729 Revert "ide/ahci: Check for -ECANCELED in aio callbacks"
fbde196c30 dma-helpers: ensure AIO callback is invoked after cancellation

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-10 17:27:24 +00:00
Julio Montes
d34d66099f
Merge pull request #2363 from Pennyzct/config_file_on_jailer
FC: jailer failed when importing new flag "--config-file"
2020-01-10 08:44:12 -06:00
Salvador Fuentes
8f5cb26eba
Merge pull request #581 from vijaydhanraj/update_kata_acrn
doc: update how-to on Kata Containers with ACRN hypervisor
2020-01-09 14:59:12 -06:00
Julio Montes
cb559c1449
Merge pull request #896 from GabyCT/topic/test19
obs: Add ubuntu 19.04 testing
2020-01-09 14:59:11 -06:00
Salvador Fuentes
fc969c4993
Merge pull request #895 from jcvenegas/894-fix
release: tag and branch kata-containers repository
2020-01-09 14:57:51 -06:00
Vijay Dhanraj
a187c3806a doc: update how-to on Kata Containers with ACRN hypervisor
Update start-up guide on setting up kata containers with ACRN hypervisor.
The udpated guide is tested using KBL-NUC and addresses 2 parts,
	1. Fixes broken links.
	2. Adds a pre-requisite to enable MACVTAP for networking
	   in the Service OS.

Fixes: #580
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2020-01-09 11:10:40 -08:00
Alice Frosi
3594855094 s390x: fix refactoring
On s390x we need to set the devno that's why we need a custom
appendBlkDevice function.

Fixes: #2384

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2020-01-09 16:29:20 +01:00
Fupan Li
8fbc673e68
Merge pull request #119 from quanweiZhou/add-test-case
add oci compatibility test case
2020-01-09 14:54:11 +08:00
Wei Zhang
290339da6b compatibility: keep oldstore for compatibility
Keep old store restore functions for keeping backward compatibility, if
old store files are found from disk, restore them with old store first.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2020-01-09 13:33:23 +08:00
Yang Bo
c4f15f1280
Merge pull request #91 from ericho/master
agent: Add unit tests for sandbox.rs
2020-01-09 12:51:41 +08:00
quanweiZhou
d2225334d9 agent: add oci compatibility test case
add oci compatibility test case for src/agent/oci/src/lib.rs
follow by Open Container Initiative Runtime Specification

Fixes: #118

Signed-off-by: quanweiZhou <quanweiZhou@linux.alibaba.com>
2020-01-09 11:14:24 +08:00
Penny Zheng
7dfc4e0219 linker: no such file linking error on AArch64
When using default cc linker, we will have segfault.
Debugging with `rust-gdb`, the specific error is as follows:
src/string/memcpy.c: No such file or directory.
Only changing linker with `aarch64-linux-musl-gcc`, the
`rust-agent` could be totally statically linked and run successfully.

Fixes: #107

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-01-09 11:08:23 +08:00
Penny Zheng
44b2caa2e5 AArch64: missing symbols on target aarch64-unknown-linux-musl
The __addtf3, __subtf3 and __multf3 symbols are used by aarch64-musl,
but are not provided by rust compiler-builtins.
For now, the only temporary but functional workaround accepted by rust
communities is to get them from libgcc.

Fixes: #107

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-01-09 11:06:04 +08:00
Penny Zheng
9621a7f3f5 ABI: only support arm 64-bit platform
We only support running Kata Containers on AArch64.

Fixes: #107

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-01-09 09:59:20 +08:00
Eric Ernst
f338363a3e
Merge pull request #844 from egernst/kata-deploy-workflow
add workflow for testing kata-deploy
2020-01-08 14:18:38 -08:00
Eric Ernst
b023d8d634 kata-deploy: use clh instead of cloud-hypervisor
Let's use clh consistently.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2020-01-08 11:17:14 -08:00
Eric Ernst
59a34bb1d5 static-build: drop NEMU, add CLH
We still were adding NEMU binaries - remove, and make sure we create a
kata-clh file for kata-deploy binaries.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2020-01-08 11:17:14 -08:00
Eric Ernst
6c9db9b853 kata-deploy-action: test CLH
Make sure we test CLH

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2020-01-08 11:17:14 -08:00
Eric Ernst
f184afc4b8 testing: add workflows for testing kata-deploy
1. AKS based action updated to be run from either packaging or remote
repository. We will only clone kata-deploy for yaml/scripts/tests if we
are running the action outside of the packaging repo. If in packaging,
the bits are already included. Misc. cleanup as well.

2. Workflow introduced which leverages the updated AKS action. This will
allow testing of packaging changes to kata-deploy.

The workflow itself uses the following github action: xt0rted/slash-command-action

The workflow will create a kata-deploy container image based off of the latest
release, utilizing the latest released Kata artifacts off of master. It
will then use the AKS kata-deploy GitHub action.

Users with admin access on the repo can trigger this test by:
/test kata-deploy

Fixes: #845

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2020-01-08 11:17:14 -08:00
Gabriela Cervantes
c14ded39c7 obs: Add ubuntu 19.04 testing
Now that we have obs packages for ubuntu 19.04, we should add it in the
testing script.

Fixes #884

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-01-08 10:47:27 -06:00
Julio Montes
e8e4d75a91
Merge pull request #878 from devimc/topic/qemu/4.2.0
fixes for qemu 4.2.0
2020-01-08 08:14:49 -06:00
Wei Zhang
4a298cb9b7 persist: address comments
Address some comments.

Signed-off-by: Wei Zhang <weizhang555@gmail.com>
2020-01-08 10:03:56 +08:00
Wei Zhang
d33b154dd7 persist: add interface for global read/write
Add two interfaces for fs storage driver for supporting global writing
and reading, which is used by ACRN.

Signed-off-by: Wei Zhang <weizhang555@gmail.com>
2020-01-08 10:03:56 +08:00
Jose Carlos Venegas Munoz
3b6a837664
Merge pull request #115 from jcvenegas/fix-114
version: Add VERSION file
2020-01-07 14:42:55 -06:00
Jose Carlos Venegas Munoz
8d60612052 version: Add VERSION file
Needed by some CI scripts, like release or to verify stable
branches state.

Fixes: #114

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-01-07 19:25:33 +00:00
Jose Carlos Venegas Munoz
3ce2d362a3 release: tag and branch kata-containers repository
Now CI depends on this repository, needed to make work stable
branches starting stable-1.10

Fixes: #894

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-01-07 15:51:03 +00:00
James O. D. Hunt
e0df9739bf
Merge pull request #110 from GabyCT/topic/addmake
ci: Add minimal makefile to use central go test script
2020-01-06 09:19:59 +00:00
Hui Zhu
bf50d1811c
Merge pull request #112 from yyyeerbo/wip
netlink: pull out netlink as library crate.
2020-01-06 13:44:06 +08:00
Yang Bo
a5192a16e8 netlink: pull out netlink as library crate.
Fixes: #111

Signed-off-by: Yang Bo <yb203166@antfin.com>
2020-01-04 06:45:52 -08:00
Gabriela Cervantes
3881c06578 ci: Add minimal makefile to use central go test script
This adds a basic Makefile where we can use a central go test script
in order to run the tests for the CI.

Fixes #109

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-01-03 10:04:09 -06:00
Wei Zhang
ed4a1954e4 persist: remove unused struct
Remove unused struct from persist structures.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:42:15 +08:00
Wei Zhang
8e88859ee4 persist: remove all usage of VCStore
Remove VCStore usage from all modules

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:42:15 +08:00
Wei Zhang
01b4a64be2 persist: remove VCStore from sandbox/apis
Remove VCStore usage from sandbox.

Signed-off-by: Wei Zhang <weizhang555@gmail.com>
2019-12-30 18:41:02 +08:00
Wei Zhang
b63e517f6d persist: replace sandbox lock with newstore.Lock
Replace rLockSandbox and rwLockSandbox with new store lock functions.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:41:02 +08:00
Wei Zhang
508101bc0f persist: fix vmtemplate storage leak
Fix VM template storage leak by adding delete operations, we need to
delete sandbox storage dirs when stop VM.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:41:02 +08:00
Wei Zhang
29b55ab88b persist: remove VCStore from container
Remove VCStore from container struct.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:41:02 +08:00
Wei Zhang
633748aa76 persist: remove VCStore from hypervisor
Remove usage of VCStore from hypervisors.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-12-30 18:39:39 +08:00
Wei Zhang
687f2dbe84 persist: move "newstore" out of experimental
Fixes #803

Move "newstore" features out of experimental feature list, from this
commit "newstore" will be default enabled.

Signed-off-by: Wei Zhang <weizhang555@gmail.com>
2019-12-30 18:39:39 +08:00
Fupan Li
3ea3d3201b
Merge pull request #2371 from bergwolf/ut
ut: fix make test failures
2019-12-27 08:40:18 +08:00
Peng Tao
3ed472dc8d store: UT tmp path should be random
Otherwise we might end up using the previously created store instead.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:38:59 -08:00
Peng Tao
5617120649 nsenter: skip ut on non-root
nsenter needs root privilege to run.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:38:54 -08:00
Peng Tao
e5b04a5bf2 ut: fs test should set RunStoragePath
Otherwise it failes with permission errors.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Peng Tao
9bf0d67fdd ut: direct factory needs to set VCStorePrefix
Otherwise it fails with permission errors.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Peng Tao
4c35d0911a vc: set store RunVMStoragePath for ut
Otherwise we fail ut on failures like:

=== RUN   TestCloudHypervisorCleanupVM
--- FAIL: TestCloudHypervisorCleanupVM (0.00s)
    clh_test.go:191: cloudHypervisor.cleanupVM() expected error != open /run/vc/vm: permission denied
    clh_test.go:200: Unexpected error = stat /run/vc/vm/cleanVMID: permission denied
=== RUN   TestClhCreateSandbox
--- PASS: TestClhCreateSandbox (0.00s)
=== RUN   TestClooudHypervisorStartSandbox
time="2019-12-25T00:48:47-08:00" level=error msg="trace called before context set" source=virtcontainers subsystem=cloudHypervisor type=bug
--- FAIL: TestClooudHypervisorStartSandbox (0.00s)
        Error Trace:    clh_test.go:266
        Error:          Received unexpected error:
                        mkdir /run/vc/vm: permission denied

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Peng Tao
3deb24e5de cli: flush coverage report in defer function
Do not flush it atexit(), where the test report file might be already
closed and it causes go test failure like:

PASS
testing: can't write /tmp/go-build146132196/b001/testlog.txt: close /tmp/go-build146132196/b001/testlog.txt: file already closed
FAIL    github.com/kata-containers/runtime/cli  4.256s

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Peng Tao
f56d70ccd6 vc: UT should set VCStorePrefix
Otherwise we fail to run it with non-root user with errors like:
`mkdir /var/lib/vc/uuid: permission denied`

Fixes: #2370
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-26 00:32:37 -08:00
Penny
b9120b2bb1
Merge pull request #2373 from bergwolf/image
qemu: add disable_image_nvdimm option
2019-12-26 10:17:52 +08:00