Commit Graph

6963 Commits

Author SHA1 Message Date
Sebastien Boeuf
9f8d4e1291
Merge pull request #1311 from egernst/1.6.0-rc1-branch-bump
# Kata Containers 1.6.0-rc1
2019-03-01 13:15:22 -08:00
Eric Ernst
105dc2bd35 release: Kata Containers 1.6.0-rc1
- doc: Fix invalid URLs
- virtcontainers: fix vCPU calculation errors
- Network: add ipvlan unmarshal
- store: Add SetLogger API
- versions: Bump to kernel 4.19.24
- cgroups: fix failed to remove sandbox cgroup
- devices: fix attach count for vhost-user-blk
- qemu: Cleanup Vm paths irrespective of Sandbox stop pass/fail
- virtcontainers: reimplement sandbox cgroup
- delete: force: Do not fail on non exiting container
- vendor: add missing comma to Gopkg.lock
- Unit test: fix bugs on a few unit tests on aarch64
- versions: update k8s, cri-o and containerd
- versions: Update qemu-lite hash
- virtcontainers: Improve debug messages when deleting files
- versions: use clear linux latest rootfs.
- shimv2: Send async task events to containerd/cri
- Makefile: Set ARCH in GOPATH not set mode
- Virtcontainers store
- runtime: Do not error if only initrd/rootfs image installed
- pullapprove: remove it
- Reduce virtcontainers unit test noise
- snap: add snapcraft store banner
- kata-env: kata-env error out when there is no VERSION_ID.
- ppc64le: Fix hotplug issue
- Network interface removal and decoupling
- Makefile: Provide default hypervisor CMD settings
- ci: Add a CODEOWNERS file for github ack checks
- shimv2: use the runtime config file passed from containerd/cri
- cli: set config options before showing config paths
- makefile: honor DESDIR on install
- factory: do not destroy vm factory when checking status
- runtime: Fix TestCCCheckCLIFunction on P9 system

dc26508 virtcontainers: fix vCPU calculation errors
f540a80 store: Add SetLogger API
4357e85 doc: Fix invalid URLs
36141d2 Network: add ipvlan unmarshal
454775f cgroups: fix failed to remove sandbox cgroup
768658f versions: Update kernel version to 4.19.24
46e2f88 devices: fix attach count for vhost-user-blk
6daefdb qemu: Cleanup Vm paths irrespective of Sandbox stop pass/fail
58d2785 virtcontainers: don't try to talk with the proxy when it's not running
62c393c virtcontainers: change container's state to stop asap
5201860 virtcontainers: reimplement sandbox cgroup
9758cdb virtcontainers: move cpu cgroup implementation
c78d6b0 delete: force: Do not fail on non exiting container
a136999 vendor: Add missing comma to Gopkg.lock and dep ensure
409a8a5 versions: update k8s, cri-o and containerd
23c554e unit-test: refine func TestGetCPUDetails
1b967a4 unit-test: add nolint comment to avoid unused warning
3ec56ea runtime: add appendBridges for arm64
e93fb0b unit-test: test func for RunningOnVMM should be arch-dependent
0679f6f unit-test: refine qemu_arm64_test.go
44e2b9a unit-test: struct TestDataa should be included in arch-indenpedent .go file
a1c8590 virtcontainers: add method to get hypervisor PID
c17dd11 versions: Update qemu-lite hash
a614273 virtcontainers: Improve debug when create/delete files
84b7165 versions: use clear linux latest rootfs.
81c7a96 Makefile: Set ARCH in GOPATH not set mode
96e524d shimv2: Send task events to containerd/cri
bb99e41 virtcontainers: Fix Store related vm factory leak
7b0376f virtcontainers: Fix container.go cyclomatic complexity
f8e7e30 virtcontainers: Remove the resource storage original implementation
fad23ea virtcontainers: Conversion to Stores
962e1e6 pullapprove: remove it
2ecffda virtcontainers: store: Add a ItemLock API
6e9256f virtcontainers: store: Add a Raw API
c25c608 virtcontainers: store: Add a VC specific Store
ef11bf5 virtcontainers: store: Add a Delete API
f2ab58d virtcontainers: store: Implement the filesystem backend
d22cdf2 virtcontainers: store: Add an internal backend interface
6b87ecf virtcontainers: store: Keep track of newly created Stores
efd50ec virtcontainers: Add a Store manager
4be76e9 virtcontainers: Initial Store implementation
2affa1f virtcontainers: Reduce hyperstart agent test noise
a3eff87 virtcontainers: Make proxy startup sequence less noisy
f0312f6 virtcontainers: Reduce filesystem test noise
e402601 virtcontainers: Reduce sandbox test noise
799ac6e virtcontainers: Reduce qemu test noise
560902c virtcontainers: Reduce kata_agent test noise
2093fe6 virtcontainers: Reduce cc_proxy mock test noise
79ed088 virtcontainers: Reduce hyperstart mock test noise
be0726c runtime: Do not error if only initrd/rootfs image installed
7222f53 snap: add snapcraft store banner
4f51687 kata-env: kata-env error out when there is no VERSION_ID.
a48e614 ci: Add a CODEOWNERS file for github ack checks
b1c6667 vendor: Update govmm vendoring
b0986a5 ppc64le: Fix vCPU hotplug issue
68043b5 cli: set config options before showing config paths
f1a12ce shimv2: use the runtime config file passed from containerd/cri
18dcd2c virtcontainers: Decouple the network API from the sandbox one
b39cb1d virtcontainers: Remove the network interface
a02c39e Makefile: Set arch regardless of GOPATH state
d78a62d factory: do not destroy vm factory when checking status
718488b makefile: honor DESDIR on install
c93aa53 runtime: Check SMT=on/off only for P8 or lesser

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-01 10:45:10 -08:00
Hui Zhu
a1ddf53df4 Makefile: Change "GOPATH not set" to "No GO command or GOPATH not set"
The cause that make "sudo make install" fail is not "GOPATH not set",
but no go command in path.
But the commit still keep the "GOPATH not set" because
execute "unset GOPATH; make" will fail because "go build" cannot work
without GOPATH.

Fixes: #1285

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-01 22:47:37 +08:00
Julio Montes
d37061bf46
Merge pull request #1301 from GabyCT/topic/updateurl
doc: Fix invalid URLs
2019-03-01 08:32:01 -06:00
James O. D. Hunt
5524fc39e5 docs: Clarified docker install note
Improved wording in docker installation Note based on review feedback.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-01 11:24:58 +00:00
Penny Zheng
35672b5896 unit-test: fix undefined struct field SupportVSocks on arm64
Since arch-specific func getExpectedHostDetails holds undefined struct
field SupportVSocks on arm64, unit test TestEnvGetEnvInfoSetsCPUType,
TestEnvGetHostInfo and so on failed.
I'm trying to use generic func genericgetExpectedHostDetails on arm64
to avoid similar issues.

Fixes: #1287

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-03-01 15:13:15 +08:00
Jose Carlos Venegas Munoz
6f2597ed11
Merge pull request #1294 from egernst/vCPU-calculations-fix
virtcontainers: fix vCPU calculation errors
2019-02-28 15:53:20 -06:00
Archana Shinde
9b624d5b9b
Merge pull request #1255 from caoruidong/ipvlan-ep
Network: add ipvlan unmarshal
2019-02-28 12:18:31 -08:00
GabyCT
b702f5028d
Merge pull request #387 from devimc/topic/cpuCgroups
constraints: add cpu cgroups documentation
2019-02-28 11:48:32 -06:00
Eric Ernst
dc2650889c virtcontainers: fix vCPU calculation errors
We were grabbing a running total of quota and period for each container
and then calculating the number of resulting vCPUs. Summing period
doesn't make sense.  To simplify, let's just calculate mCPU per
container, keep a running total of mCPUs requested, and then translate
to sandbox vCPUs after.

Fixes: #1292

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-02-28 08:13:04 -08:00
Julio Montes
dbfd96583a
Merge pull request #1298 from jodh-intel/store-pkg-add-SetLogger
store: Add SetLogger API
2019-02-28 08:52:50 -06:00
Graham Whaley
da9f541deb
Merge pull request #227 from jodh-intel/remove-arch-calls
arch: Remove calls to arch command
2019-02-28 11:30:08 +00:00
James O. D. Hunt
f540a80354 store: Add SetLogger API
Add a `store.SetLogger()` API to allow the store package to log with the
standard set of fields (as expected by the log parser [1].

Fixes #1297.

---

[1] - https://github.com/kata-containers/tests/tree/master/cmd/log-parser#logfile-requirements

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-02-28 10:56:26 +00:00
Gabriela Cervantes
4357e851bf doc: Fix invalid URLs
Now that we have been moved the CI to ubuntu 18.04, we need to update the
README.

Fixes #1300

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-02-28 01:41:18 -06:00
Julio Montes
1e1a735796 constraints: add cpu cgroups documentation
Explain cpu cgroups are implemented in kata containers

fixes #386

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-27 11:57:17 -06:00
Graham Whaley
975157d75b versions.yaml: add uscan annotations
Adds uscan key/values for all items with a Version field that are pulled
from a repo with version info (such as github) so we can perform
automated upstream version update checks.

Fixes: #1250

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-26 16:41:09 +00:00
Jose Carlos Venegas Munoz
873ac754d4
Merge pull request #348 from jcvenegas/run-all-ci
ci: Run all CI test.
2019-02-25 22:21:16 -06:00
Jose Carlos Venegas Munoz
dca8748fa0
Merge pull request #363 from egernst/issue-362
update kata-deploy readme's ToC
2019-02-25 19:19:56 -06:00
Eric Ernst
2f70232cae kata-deploy: update README's ToC
The kata-deploy README's table of contents was out of date

Fixes: #362

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-02-25 15:26:07 -08:00
Julio Montes
60e058942d
Merge pull request #342 from tuan-hoang1/s390x-snap
snap: add support for s390x
2019-02-25 15:06:02 -06:00
Julio Montes
4448646cee
Merge pull request #359 from nitkon/master
kernel: Add 4.19.10 config for powerpc
2019-02-25 12:33:00 -06:00
Tuan Hoang
035ba0808b snap: add support for s390x
This allows running packaging CI scripts on s390x to create snap image.

Fixes #341

Signed-off-by: Tuan Hoang <tmhoang@linux.vnet.ibm.com>
2019-02-25 18:40:43 +01:00
Jose Carlos Venegas Munoz
618aeba540 ci: Run all CI test.
run all CI test to increase testing coverage on kernel config changes.

Fixes: #346

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-02-25 08:56:51 -06:00
Nitesh Konkar
1c5ba65912 kernel: Add 4.19.10 config for powerpc
We want to make sure Kata runs on latest stable kernels so that it
benefits from the latest features.

Fixes: #358

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-02-25 19:46:00 +05:30
Graham Whaley
e8a8e0db79
Merge pull request #1111 from sboeuf/bump_kernel
versions: Bump to kernel 4.19.24
2019-02-22 17:32:35 +00:00
Ruidong Cao
36141d27fc Network: add ipvlan unmarshal
We have 7 types of endpoints, but forget ipvlan in unmarshal funciton.
So add it and refactor for cyclomatic complexity reason.

Fixes #1254

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2019-02-23 01:25:26 +08:00
Jose Carlos Venegas Munoz
a8e458aae2
Merge pull request #356 from devimc/topic/fixSnap
snap: use sudo to configure and start docker
2019-02-22 11:02:01 -06:00
Julio Montes
31ec69ecd2 snap: add user into docker group
add user into docker group wo allow it run containers

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-22 10:23:32 -06:00
Julio Montes
f31829d016 snap: unsmask docker
in some systems docker service is masked, to build the
rootfs image we need to unmask it

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-22 10:22:08 -06:00
Julio Montes
41f4ebc1cb snap: use sudo to configure and start docker
configure and start docker using sudo

fixes #355

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-22 09:46:00 -06:00
Julio Montes
d8d78bb383
Merge pull request #351 from devimc/topic/removeSnapBuild
snap: remove snap-build scripts
2019-02-22 07:16:06 -06:00
Julio Montes
16bd983387
Merge pull request #1264 from Ace-Tang/master
cgroups: fix failed to remove sandbox cgroup
2019-02-21 13:46:06 -06:00
James O. D. Hunt
b96ca2237f
Merge pull request #1260 from stefanha/fix-vhost-user-blk-detach
devices: fix attach count for vhost-user-blk
2019-02-21 16:57:11 +00:00
Julio Montes
8a055c44f8 snap: remove snap-build scripts
snap-build scripts were used to cross-build snap images in local environments.
Currently we are using launchpad to build and release the snaps, hence those
old scripts are no more needed.

fixes #350

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-21 10:51:50 -06:00
Graham Whaley
62d347a426
Merge pull request #338 from Pennyzct/v4.19
config: add kernel config v4.19.23 for arm64
2019-02-21 16:12:31 +00:00
Julio Montes
3fa6a83d4d
Merge pull request #384 from liubin/master
docs: fix broken links in architecture.md
2019-02-21 08:22:27 -06:00
Ace-Tang
454775fb97 cgroups: fix failed to remove sandbox cgroup
sandbox cgroup use V1NoConstraints, this only create memory subsystem,
but when delete, load parent cgroup always use `cgroups.V1`, so other
subsystem path can not be find, sandbox cgroup can not be deleted.

Fixes: #1263

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-02-21 17:34:34 +08:00
bin liu
0a643e9a56 docs: fix broken links in architecture.md
Two links to `how-to` file is broken.

Fixes: #383

Signed-off-by: bin liu <liubin0329@gmail.com>
2019-02-21 15:15:01 +08:00
Peng Tao
1d79338a1a
Merge pull request #1247 from nitkon/leakyPods
qemu: Cleanup Vm paths irrespective of Sandbox stop pass/fail
2019-02-21 11:56:57 +08:00
Penny Zheng
af2a3ff76e config: add kernel config v4.19.23 for arm64
we add the rough kernel config v4.19.23 for arm64, here we let
'make oldconfig'(setting default) to do the transformation from
v4.14.X to v4.19.X.

Fixes: #337

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-02-21 09:59:15 +08:00
Sebastien Boeuf
768658f61b versions: Update kernel version to 4.19.24
We need to bump the kernel version from 4.14.67 to 4.19.24 in order
to follow the recent kernel config bump.

Fixes #618
Fixes #1029

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-02-20 14:44:41 -08:00
GabyCT
60f7c4f401
Merge pull request #1189 from devimc/topic/fixCpuCgroup
virtcontainers: reimplement sandbox cgroup
2019-02-20 10:18:56 -06:00
Stefan Hajnoczi
46e2f885af devices: fix attach count for vhost-user-blk
Commit affd6e3216 ("devices: add reference
count for devices.") introduced an attach count for devices.  The
vhost-user-blk device increments the counter instead of decrementing it
when detaching.

Fixes: #1259
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-02-20 14:58:45 +00:00
Nitesh Konkar
6daefdb177 qemu: Cleanup Vm paths irrespective of Sandbox stop pass/fail
Sometimes qemu/qmp commands error out and VM files
get left behind on the host filesystem. Clen them up
irrespective of `stopSandbox` succeeds or fails.

Fixes: #1246

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-02-20 16:02:48 +05:30
Julio Montes
58d278560e virtcontainers: don't try to talk with the proxy when it's not running
To avoid long timeouts, the runtime shouldn't try to talk with the proxy
when it's not running.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-19 13:13:45 -06:00
Julio Montes
62c393c119 virtcontainers: change container's state to stop asap
container is killed by force, container's state MUST change its state to stop
immediately to avoid leaving it in a bad state.

fixes #1088

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-19 13:13:44 -06:00
Julio Montes
5201860bb0 virtcontainers: reimplement sandbox cgroup
All containers run in different cgroups even the sandbox, with this new
implementation the sandbox cpu cgroup wil be equal to the sum of all its
containers and the hypervisor process will be placed there impacting to the
containers running in the sandbox (VM). The default number of vcpus is
used when the sandbox has no constraints. For example, if default_vcpus
is 2, then quota will be 200000 and period 100000.

**c-ray test**
http://www.futuretech.blinkenlights.nl/c-ray.html

```
+=============================================+
|         | 6 threads 6cpus | 1 thread 1 cpu  |
+=============================================+
| current |   40 seconds    |   122 seconds   |
+==============================================
|   new   |   37 seconds    |   124 seconds   |
+==============================================
```

current = current cgroups implementation
new = new cgroups implementation

**workload**

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: c-ray
  annotations:
    io.kubernetes.cri.untrusted-workload: "true"
spec:
  restartPolicy: Never
  containers:
  - name: c-ray-1
    image: docker.io/devimc/c-ray:latest
    imagePullPolicy: IfNotPresent
    args: ["-t", "6", "-s", "1600x1200", "-r", "8", "-i",
          "/c-ray-1.1/sphfract", "-o", "/tmp/output.ppm"]
    resources:
      limits:
        cpu: 6
  - name: c-ray-2
    image: docker.io/devimc/c-ray:latest
    imagePullPolicy: IfNotPresent
    args: ["-t", "1", "-s", "1600x1200", "-r", "8", "-i",
          "/c-ray-1.1/sphfract", "-o", "/tmp/output.ppm"]
    resources:
      limits:
        cpu: 1
```

fixes #1153

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-19 13:13:44 -06:00
Julio Montes
9758cdba7c virtcontainers: move cpu cgroup implementation
cpu cgroups are container's specific hence all containers even the sandbox
should be able o create, delete and update their cgroups. The cgroup crated
matches with the cgroup path passed by the containers manager.

fixes #1117
fixes #1118
fixes #1021

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-19 13:13:44 -06:00
Sebastien Boeuf
9294979854
Merge pull request #334 from ganeshmaharaj/crio-conf-fix
kata-deploy: Check crio conf before update
2019-02-19 10:04:45 -08:00
Peng Tao
22cee2d0cd
Merge pull request #1220 from jcvenegas/delete-force-not-fail-non-container
delete: force: Do not fail on non exiting container
2019-02-19 12:23:51 +08:00