Commit Graph

6963 Commits

Author SHA1 Message Date
Gabi Beyer
7f14430421 doc: update architecture.md link
update architecture.md link, since it has moved to within the
design/ directory.

Fixes: #418

Signed-off-by: Gabi Beyer <Gabrielle.n.beyer@intel.com>
2019-04-02 09:34:00 -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
GabyCT
edd7d9ccd3
Merge pull request #272 from devimc/topic/fsFeatures
image-builder: share the mkfs configuration file
2019-04-01 13:03:23 -06:00
Julio Montes
22d1bc50db
Merge pull request #269 from stefanha/rootfs-DOCKER_RUNTIME-env-var
rootfs-builder: add rootfs.sh DOCKER_RUNTIME env var
2019-04-01 10:38:50 -06:00
Julio Montes
e8bb3bcf23
Merge pull request #267 from stefanha/rootfs.sh-selinux-relabel
rootfs-builder: SELinux relabel container volumes
2019-04-01 10:38:42 -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
Julio Montes
88b85231ca image-builder: share the mkfs configuration file
Share with the container the mkfs configuration file to use only the
filesystem features supported in the host.

fixes #270

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-04-01 09:18:28 -06:00
GabyCT
b09a469097
Merge pull request #418 from egernst/docs-cleanup
Docs cleanup
2019-03-29 16:13:24 -06:00
Eric Ernst
152330a4fd docs: Use relative paths for URLs which are part of this repo
Let's make our static testers happy.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-29 14:17:54 -07:00
Eric Ernst
51f12efae9 arch: fix dead link
api.proto moved, resulting in a broken link. The original link wasn't
very useful in the first place, so simply remove.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-29 14:03:59 -07:00
Eric Ernst
daef1791ff arch: move architecture.md to the design directory
Fixes: #417

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-29 11:04:34 -07:00
Eric Ernst
c0d63796a2 constraints: add as part of design documents
Let's keep all design documents in the same logical location. Updating
the file to be called 'cpu-constraints', though we may want to expand to
resource constraints going forward.

Fixes: #417

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-29 10:16:49 -07:00
Eric Ernst
353b2ecf9f vsocks: move to design directory
Let's keep all design documents in the design directory

Fixes: #417

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-29 10:11:04 -07:00
Eric Ernst
8e3db7f3df zun: move to use-cases, utilize images dir
Fixes: #417

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-29 10:10:10 -07:00
GabyCT
a17d2bbb40
Merge pull request #271 from devimc/topic/fixWrongFS
image-builder: add fs type
2019-03-29 10:10:55 -06:00
Jose Carlos Venegas Munoz
bb0a5635eb
Merge pull request #411 from kata-containers/snap-next
snap: release 1.6.0
2019-03-29 08:41:22 -06:00
Julio Montes
77fb8085f4 image-builder: check format_loop return code
check format_loop return code and die if it fails

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-29 07:47:22 -06:00
Graham Whaley
af74d18014 kata-deploy: crio.conf: Add some whitespace and comments
When writing our runtime configs to crio.conf, let's add some
whitespace and comments to make it clearer, and fit in with the
rest of the crio.conf file.

Fixes: #412

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-03-29 11:50:09 +00:00
Julio Montes
8debe95b61 image-builder: add fs type
Add filesystem type to format the loop device.

fixes #270

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-28 15:10:16 -06:00
Julio Montes
3464f8e6a3 snap: release 1.6.0
bump snap version to 1.6.0

fixes #410

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-28 14:52:06 -06:00
Stefan Hajnoczi
c72c95496e rootfs-builder: add rootfs.sh DOCKER_RUNTIME env var
On some systems the "runc" runtime isn't available or has a different
name.  Allow the user to override the Docker runtime.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: #268
2019-03-28 15:48:15 +00:00
Stefan Hajnoczi
c1d9510cb3 rootfs-builder: SELinux relabel container volumes
rootfs.sh fails on machines with SELinux in enforcing mode if the
volumes aren't labelled.

This patch labels volumes so the container is able to access them.

In order to do this rootfs directory creation must be moved before the
Docker container is started.  Previously docker-run(1) would create the
rootfs directory in the USE_DOCKER case.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: #266
2019-03-28 15:39:35 +00:00
Sebastien Boeuf
20b087e3d2
Merge pull request #264 from devimc/topic/supportDAXandFC
image-builder: re-implement image builder script
2019-03-28 06:56:02 -07: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
Ace-Tang
1b6affe498 config: fix panic in type assertion
when use shim v2 interface to run container, no need to use kata-proxy
and kata-shim, remove kata-proxy and kata-shim in config file will cause
panic since type assertion. add check to avoid panic

Fixes: #1440

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-03-28 19:28:51 +08:00
Graham Whaley
ff1698d915 kata-deploy: remove Trusted annotations from examples
We no longer use the TrustedSandbox style annotations now we
have moved to the RuntimeClass method of choosing a runtime.
Drop the remaining Trusted items from the examples.

Fixes: #403

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-03-28 11:17:43 +00:00
Xie Yongji
2d422a845b agent: pass correct mount type to agent for ephemeral volumes
The "ephemeral" is just used to indicate ephemeral volumes in
runtime. We should not pass it to agent. Instead, "bind" should be
the correct mount type to be passed.

Fixes: #1438

Signed-off-by: Xie Yongji <xieyongji@baidu.com>
2019-03-28 18:40:59 +08:00
Penny Zheng
2e5194e279 linter: remove deadcode linter check for generic item
After we switched golang linter to golangci-lint, we has extra 'deadcode'
linter check, and we need to remove this linter check for all
generic items.

Fixes: #1432

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-03-28 14:05:38 +08:00
zhangwei_cs
c89eb81dec
Merge pull request #1425 from bergwolf/proxy-path
config: validate proxy path
2019-03-27 11:31:39 +08:00
Julio Montes
d8cdd88ace image-builder: re-implement image builder script
Re-implement image builder script to generate an image with a double MBR +
a DAX metadata. The DAX metadata is read by the NVDIMM driver to know the
beginning of the data in the pmem device.
This new image format is required to enable DAX in the kernels and hypervisors
that support NVDIMM, without breaking the compatibility with the kernels and
hypervisors that don't support it.

Following diagram shows how the resulting image will look like

```
	.-----------.----------.---------------.-----------.
	| 0 - 512 B | 4 - 8 Kb |  2M - 2M+512B |    3M     |
	|-----------+----------+---------------+-----------+
	|   MBR #1  |   DAX    |    MBR #2     |  Rootfs   |
	'-----------'----------'---------------'-----------+
	      |          |      ^      |        ^
	      |          '-data-'      '--------'
	      |                                 |
	      '--------rootfs-partition---------'
```

MBR: Master boot record.
DAX: Metadata required by the NVDIMM driver to enable DAX in the guest [1][2]
(struct nd_pfn_sb).
Rootfs: partition that contains the root filesystem (/usr, /bin, etc).

Kernels and hypervisors that support DAX/NVDIMM read the MBR #2,
otherwise MBR #1 is read.

[1] - https://github.com/kata-containers/osbuilder/blob/master/image-builder/\
nsdax.gpl.c
[2] - https://github.com/torvalds/linux/blob/master/drivers/nvdimm/pfn.h

fixes #263

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-26 09:02:45 -06:00
Julio Montes
f32ae14883 tests: remove DAX env variable
DAX envar is no more required to generate images with support for DAX

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-26 09:02:45 -06:00
Julio Montes
f355c026c0 tests: enable DEBUG
run tests with debug enabled to detect errors easier

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-26 09:02:45 -06:00