Commit Graph

1911 Commits

Author SHA1 Message Date
Peng Tao
9ac68310f7 cli: fix kata-check test
We don't really require nested nor unrestricted_guest to run. And there
is no point validating host cpu properties in UT.

Fixes: #1508

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-09 19:00:38 -07:00
Peng Tao
a63013de5c vc: remove spawner
Dead code that is never used.

Fixes: #1510

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-09 19:00:18 -07:00
Peng Tao
c414599635 types: remove pid from sandbox state
No longer needed.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-09 18:59:56 -07:00
Peng Tao
03ee25d4ef agent: treat container as shared pidns whenever it has pidns path
Current approach cannot work for shimv2 as there is no kata-shim thus
sandbox.state.pid is always -1. Let's just simplify things by always
making a container share pidns if it has a pidns path.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-09 18:59:56 -07:00
Peng Tao
616f26cfe5 types: split sandbox and container state
Since they do not really share many of the fields.

Fixes: #1434

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-09 18:59:56 -07:00
GabyCT
4265509e9c
Merge pull request #1499 from devimc/topic/virtcontainers/onlySupportedNs
virtcontainers: Use only supported namespaces
2019-04-09 13:26:10 -05:00
Julio Montes
11a9005aca
Merge pull request #1479 from chavafg/topic/update-crio-url
cri-o: Update repository URLs
2019-04-09 10:03:38 -05:00
lifupan
8041fc9314 katautils: fix the issue of missing proxy debug config
When used builtin proxy, it's better to config the proxy
debug based on debug setting of runtime in kata configuration.

Fixes:#1495

Signed-off-by: lifupan <lifupan@gmail.com>
2019-04-09 09:17:28 -04:00
Julio Montes
bb347acc56 vendor: update govmm
Bring QMP fixes and vhost-user support

Shortlog:
694a7b1 qemu/qmp: re-implement mainLoop
5712b11 qemu/qmp: fix readLoop() reuse scanner.Bytes() underlying array problem
3c84b1d govmm: add VhostUserFS vhost-user device type

fixes #1497

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-04-09 07:38:16 -05:00
Julio Montes
0b430dc71f virtcontainers: Use only supported namespaces
Depending of the linux versions some namespaces are supported or not.
To avoid failures running containers and unit tests in old linux kernels,
only the supported namespaces should be used.

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

fixes #228

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-04-09 07:36:50 -05:00
Salvador Fuentes
23c00ffa03
Merge pull request #1500 from chavafg/topic/travis-xenial
travis: use xenial
2019-04-09 07:35:09 -05:00
Salvador Fuentes
e31b040085 cri-o: Update repository URL
cri-o was moved to a new organization. The new URL
of the project is https://github.com/cri-o/cri-o
Update URL references.

Fixes: #1478.

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

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-04-09 07:32:52 -05:00
Salvador Fuentes
ea1df84727 travis: use xenial
We have hit an issue using trusty in travis and go 1.11.7
the issue is fixed using xenial.

Fixes: #1492.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-04-08 13:58:17 -05:00
Julio Montes
34e2064b39
Merge pull request #1152 from Pennyzct/memory_hotplug
runtime: support memory hotplug via probe interface on aarch64
2019-04-08 08:43:03 -05:00
Julio Montes
c884f65a26
Merge pull request #1449 from alicefr/thread_id
s390x: not set socketID and threadID
2019-04-08 08:01:40 -05:00
Fupan Li
303f126e5b
Merge pull request #1441 from Ace-Tang/fix-panic
config: fix panic in type assertion
2019-04-08 17:01:17 +08:00
Graham Whaley
26ca2a3429
Merge pull request #1414 from teawater/yq_version
Fix yq issues
2019-04-08 09:47:03 +01:00
Eric Ernst
fef124921c
Merge pull request #1469 from egernst/1.7.0-alpha0-branch-bump
# Kata Containers 1.7.0-alpha0
2019-04-05 14:04:02 -07:00
Eric Ernst
f59e367706 release: Kata Containers 1.7.0-alpha0
- doc: update architecture.md link
- VMCache: check if vm_cache_endpoint file exists before VMCache server…
- vsock: Pass info about vsock being used or not to the agent.
- qemu: fix qemu leak when failed to start container
- hypervisor: return cpu->threadID mapping
- tests: do cleanUp() always in the end
- cgroups: remove duplicate fields from state
- shimv2: optionally plug rootfs block storage instead of mounting it
- linter: remove deadcode linter check for generic item
- virtcontainers: firecracker: disable ACPI
- config: validate proxy path
- lint: Change go linter from gometalinter to golangci-lint
- Factory: Fix fake return value issue on creating template
- config: Add config flag "experimental"
- Add more build targets
- Update collect script for dax nvdimm images
- Allow data collection to be hidden
- config: Make VMCache can work with vsock
- ci: check curl before use it
- virtcontainers: improve security and mount the rootfs as read-only fs
- refactor: improve readability of `bumpAttachCount`

57b103a vsock: Pass info about vsock being used or not to the agent.
fb64a3e doc: update architecture.md link
b6f382e VMCache: check if vm_cache_endpoint file exists before VMCache server runs
dd6d1e4 fc: return vcpu thread info properly
6fda03e hypervisor: make getThreadIDs return vcpu to threadid mapping
ad697cc vendor: add prometheus/procfs dependency
0e2be42 vendor: fix containerd/cgroups dependency
52c66d2 shimv2: plugin the block backed rootfs directly instead of mount it
628ea46 virtcontainers: change container's rootfs from string to mount alike struct
c0aedeb virtcontainers: firecracker: disable ACPI
096fa04 qemu: fix qemu leak when failed to start container
2e5194e linter: remove deadcode linter check for generic item
dca7a6f config: validate proxy path
dd6e8eb tests: do cleanUp() always in the end
ad7d9b7 cgroups: remove duplicate fields from state
f442876 lint: Update go linter from gometalinter to golangci-lint.
5d761ce scripts: Handle images with a DAX/NVDIMM header
bdf6b2d scripts: Handle missing partitions in collect script
ad228e3 build: Add missing targets to show-usage
e6a7091 build: Allow runtime to be built+installed without shim
206ffc6 build: Don't build the runtime when building shim binary
639e827 config: Make VMCache can work with vsock
aec0d26 ci: check curl before use it
9b73900 katautils: mask systemd-random-seed
6498466 virtcontainers: improve security and mount the rootfs as read-only fs
26a9b72 refactor: improve readability of `bumpAttachCount`
5a271f0 scripts: Allow data collection script output to be hidden
4f34a54 scripts: Refactor collect script
eadf977 Factory: Fix fake return value issue on creating template
da80c70 config: enhance Feature structure
111774c config: add docs for experimental
050f03b config: Add config flag "experimental"

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-04-05 09:24:55 -07:00
Eric Ernst
d362102c6a
Merge pull request #1484 from jcvenegas/master-travis-fix
ci: travis
2019-04-05 08:52:39 -07:00
Jose Carlos Venegas Munoz
f61cbed15a ci: travis
Use TRAVIS branch to checkout test repository

Fixes: #1481

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-04-04 13:19:48 -06:00
Penny Zheng
b50292a215 arm64: dep ensure to keep track of the revisons in kata agent
We need to change the constraints of kata agent into the memory-hotplug
related commit, to keep track of the revisons in kata agent.

Fixes: #1149

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-04-04 17:03:20 +08:00
Penny Zheng
3bfcdf755a agent: add interface memHotplugByProbe
we need to notify guest kernel about memory hot-added event via probe interface.
hot-added memory deivce should be sliced into the size of memory section.

Fixes: #1149

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-04-04 17:03:20 +08:00
Penny Zheng
47670fcf73 memoryDevice: reconstruct memoryDevice
If kata-runtime supports memory hotplug via probe interface, we need to reconstruct
memoryDevice to store relevant status, which are addr and probe. addr specifies the
physical address of the memory device, and probe determines it is hotplugged via
acpi-driven or probe interface.

Fixes: #1149

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-04-04 17:03:20 +08:00
Penny Zheng
30a6a7de39 agent: acquire memory hotplug probe info via GetGuestDetails
In order to support memory hotplug via probe interface in kata-runtime,
firstly, we need to verify whether guest kernel is capable of that.

Fixes: #1149

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-04-04 17:03:19 +08:00
Eric Ernst
722aa3f2d3
Merge pull request #1456 from gabibeyer/updatedocs
doc: update architecture.md link
2019-04-02 20:48:16 -07:00
Peng Tao
755cbcde3c
Merge pull request #1410 from teawater/vmcache_endpoint
VMCache: check if vm_cache_endpoint file exists before VMCache server…
2019-04-03 11:21:42 +08:00
Eric Ernst
5a41e5f240
Merge pull request #1458 from amshinde/pass-vsock-as-kernel-option
vsock: Pass info about vsock being used or not to the agent.
2019-04-02 16:18:41 -07:00
Archana Shinde
57b103a81b vsock: Pass info about vsock being used or not to the agent.
Instead of the agent trying to determine if a serial
or vsock channel is used, pass this information explicitly
as a kernel command line option.

Fixes #1457

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-04-02 09:48:10 -07:00
Gabi Beyer
fb64a3ec8b doc: update architecture.md link
update architecture.md link, since it has moved to within the
design/ directory.

Fixes: #1462

Signed-off-by: Gabi Beyer <Gabrielle.n.beyer@intel.com>
2019-04-02 09:29:24 -07:00
Fupan Li
c9a3b933f8
Merge pull request #1427 from Ace-Tang/fix-qemu-leak
qemu: fix qemu leak when failed to start container
2019-04-02 23:32:11 +08:00
Wei Li
cece49764c
Merge pull request #1436 from bergwolf/vcpu
hypervisor: return cpu->threadID mapping
2019-04-02 20:51:33 +08:00
Hui Zhu
b6f382ef6f VMCache: check if vm_cache_endpoint file exists before VMCache server runs
There is an issue that more than one VMCache server can run with same
vm_cache_endpoint file together.
The cause is factory try to remove vm_cache_endpoint file before VMCache
server runs.
Change it to check if vm_cache_endpoint file exists before VMCache server
runs to handle the issue.

Fixes: #1385

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-04-02 20:33:01 +08:00
Hui Zhu
4993dfffe6 ci: Add a failed execution check for curl
There is no checks for curl get 404 or something else.
Add a check for it.

Fixes: #1411

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-04-02 20:03:43 +08:00
Hui Zhu
7fa03902b4 ci: set $yq_version to 2.3.0
According what I said in https://github.com/kata-containers/tests/issues/1349,
use the last verion is not a good choice.
This commit set it to 2.3.0.

Fixes: #1411

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-04-02 20:03:43 +08:00
Alice Frosi
19458ec473 s390x: fix golangci-lint
Fix lint complains in the s390x files

Fixes: #1453

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-04-02 13:44:12 +02:00
Peng Tao
432eda0f83
Merge pull request #1423 from WeiZhang555/fix-failing-test
tests: do cleanUp() always in the end
2019-04-02 16:21:15 +08:00
Peng Tao
d76eddf41e
Merge pull request #1416 from WeiZhang555/dont-save-cgroups-to-state-file
cgroups: remove duplicate fields from state
2019-04-02 16:09:33 +08:00
Peng Tao
dd6d1e435b fc: return vcpu thread info properly
So that we can apply cgroup constraints to them.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-02 15:51:27 +08:00
Peng Tao
6fda03ec92 hypervisor: make getThreadIDs return vcpu to threadid mapping
We need such mapping information to put vcpus in container cpuset properly.

Fixes: #1435

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-02 15:51:27 +08:00
Peng Tao
ad697cc763 vendor: add prometheus/procfs dependency
So that we can read procfs easily.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-02 15:51:27 +08:00
Peng Tao
0e2be42514 vendor: fix containerd/cgroups dependency
Gopkg.lock says it's "dbea6f2bd41658b84b00417ceefa416b979cbf10"
but it is actually "5017d4e9a9cf2d4381db99eacd9baf84b95bfb14".

We need to make sure Gopkg.lock does not lie otherwise `dep ensure`
would really fetch the locked revision and it causes build failure
due to API changes.

Introduced by: 76d9db3e0b (vendor: Add github.com/gogo/protobuf).

While at it, constraint containerd/cgroups to a working revision.

Fixes: #1447

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-04-02 15:51:27 +08:00
Peng Tao
25d21060e3
Merge pull request #1412 from lifupan/shimv2mount
shimv2: optionally plug rootfs block storage instead of mounting it
2019-04-02 15:30:40 +08:00
Hui Zhu
12437c2ded
Merge pull request #1433 from Pennyzct/nolint/deadcode
linter: remove deadcode linter check for generic item
2019-04-02 14:22:38 +08:00
lifupan
52c66d20dc shimv2: plugin the block backed rootfs directly instead of mount it
When the container's rootfs is block storage backed such as devmapper,
shimv2 will not mount it on the host, instead it insert it into hypervisor
as a block device directly.

If kata's config set "disable_block_device_use" as true, it will mount
the rootfs onto host as before.

Fixes:#1158

Signed-off-by: lifupan <lifupan@gmail.com>
2019-04-02 10:56:03 +08:00
lifupan
628ea46c58 virtcontainers: change container's rootfs from string to mount alike struct
container's rootfs is a string type, which cannot represent a
block storage backed rootfs which hasn't been mounted.
Change it to a mount alike struct as below:
    RootFs struct {
            // Source specify the BlockDevice path
            Source string
            // Target specify where the rootfs is mounted if it has been mounted
            Target string
            // Type specifies the type of filesystem to mount.
            Type string
            // Options specifies zero or more fstab style mount options.
            Options []string
            // Mounted specifies whether the rootfs has be mounted or not
            Mounted bool
     }

If the container's rootfs has been mounted as before, then this struct can be
initialized as: RootFs{Target: <rootfs>, Mounted: true} to be compatible with
previous case.

Fixes:#1158

Signed-off-by: lifupan <lifupan@gmail.com>
2019-04-02 10:54:05 +08:00
Peng Tao
7d0de42d98
Merge pull request #1455 from devimc/topic/fcNoACPI
virtcontainers: firecracker: disable ACPI
2019-04-02 10:17:32 +08:00
Julio Montes
c0aedeb7ee virtcontainers: firecracker: disable ACPI
Disable ACPI to fix ACPI BIOS error in the guest kernel

fixes #1454

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-04-01 14:23:49 -06:00
Alice Frosi
49be8ee21c s390x: not set socketID and threadID
For cpu hotplug, the options socketID and threadID are not used.

Fixes: #1448

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-04-01 17:29:24 +02:00
Ace-Tang
096fa046f8 qemu: fix qemu leak when failed to start container
do cleanup inside startVM() if start vm get error

Fixes: #1426

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-03-28 19:38:56 +08:00