Commit Graph

6963 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
c78d6b057e delete: force: Do not fail on non exiting container
When a container does not exist, runc does not fail.  Lets mimic this
behavior, sometimes kuberentes will try to force delete containers that
could not be created and gets confused if delete --force fails.

Fixes: #1219

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-02-18 11:39:25 -06:00
Ganesh Maharaj Mahalingam
059b48bfa2 kata-deploy: Check crio conf before update
kata-deploy inserts 'manage_network_ns_lifecycle' into crio.conf without any
prior checks and if there is a previous entry in the file, this becomes a
duplicate causing crio service restart issues. This patch addresses that
particular scenario.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-02-18 09:33:16 -08:00
Li Wei
731ff7b13f
Merge pull request #1242 from teawater/golock
vendor: add missing comma to Gopkg.lock
2019-02-18 20:57:47 +08:00
James O. D. Hunt
ceae7b48e0 docs: Pin docker to version 18.06
Docker 18.09 removed devicemapper support but did not provide an
alternative. This can cause problems for users so update the install
docs to install Docker at version 18.06 (the last version that supports
devicemapper).

This is a temporary solution until either docker provide an alternative
or we find a way to work around the Docker feature being removed.

Note the extra logic required for Fedora since 18.06 is not available
for that release.

Fixes #373.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-02-18 08:55:41 +00:00
James O. D. Hunt
4c71475122
Merge pull request #372 from marcov/zun-kata-install
zun: update kata install instructions
2019-02-18 08:48:19 +00:00
James O. D. Hunt
f38c67da0c arch: Remove calls to arch command
The `arch(1)` command is not available on some systems so use the
`uname(1)` command for the equivalent functionality.

Fixes #150.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-02-18 08:36:22 +00:00
Hui Zhu
a136999258 vendor: Add missing comma to Gopkg.lock and dep ensure
$ dep ensure
error while parsing /home/teawater/gopath/src/github.com/kata-containers/runtime/Gopkg.lock: Unable to parse the lock as TOML: (697, 6): missing comma

Add missing comma to Gopkg.lock and dep ensure to handle the issue.

Fixes: #1241

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-02-16 22:55:39 +08:00
Graham Whaley
816ea42840
Merge pull request #1202 from Pennyzct/unit-test
Unit test: fix bugs on a few unit tests on aarch64
2019-02-15 10:26:03 +00:00
Graham Whaley
7f2b2da7f7
Merge pull request #1239 from chavafg/topic/update-k8s
versions: update k8s, cri-o and containerd
2019-02-15 09:56:03 +00:00
Salvador Fuentes
409a8a5fbb versions: update k8s, cri-o and containerd
Update:
- k8s to version 1.13.3
- cri-o to version 1.13.0
- containerd to version 1.2.4, which
  according to its release notes, uses
  cri plugin version da0c016c830b2ea97fd1d737c49a568a816bf964

Fixes: #1238.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-02-14 16:09:12 -06:00
Julio Montes
2b382fdfec
Merge pull request #209 from jcvenegas/release-process-md
docs: Document release process - tools.
2019-02-14 09:28:41 -06:00
Julio Montes
268ddc595f
Merge pull request #1237 from chavafg/topic/update-qemu-lite-hash
versions: Update qemu-lite hash
2019-02-14 08:17:06 -06:00
Penny Zheng
23c554ee96 unit-test: refine func TestGetCPUDetails
refine struct testData in func TestGetCPUDetails to remove redundant
/unused struct field expectedVendor and expectedModel

Fixes: #1200

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-02-14 15:14:27 +08:00
Penny Zheng
1b967a4a6a unit-test: add nolint comment to avoid unused warning
since all generic* could bring unused linter warnings, which lead to
CI crash, we add nolint comment to avoid them.

Fixes: #1200

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-02-14 14:56:42 +08:00
Penny Zheng
3ec56eaf9f runtime: add appendBridges for arm64
since generic func genericAppendBridges and genericBridges
is also applied for machine type QemuVirt, we use it as implementation
for appendBridges and bridges on aarch64.
since const defaultPCBridgeBus is used in generic func
genericAppendBridges for pc machine, we should define it once
in generic file, instead of redefining it in different
arch-specific files.

Fixes: #1200

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-02-14 14:56:42 +08:00
Penny Zheng
e93fb0b3a0 unit-test: test func for RunningOnVMM should be arch-dependent
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: #1200

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-02-14 14:56:30 +08:00
Penny Zheng
0679f6fa59 unit-test: refine qemu_arm64_test.go
refine a set of test functions under qemu_arm64_test.go. e.g. test
func for memoryTopology shouldn't be the same one on amd64, since
for now, we don't support nvdimm on arm64.

Fixes: #1200

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-02-14 11:34:05 +08:00
Penny Zheng
44e2b9aa0a unit-test: struct TestDataa should be included in arch-indenpedent .go file
argument struct TestDataa in generic func genericTestGetCPUDetails is repeatedly
defined in almost all arch-dependent .go file, cli/kata-check_amd64_test.go,
cli/kata-check_ppc64le_test.go, etcm, except arm64. let's only declare it once in
cli/kata-check_test.go. change its name to testCPUDetail for better understanding.

Fixes: #1200

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-02-14 11:34:05 +08:00
Julio Montes
a1c85902f6 virtcontainers: add method to get hypervisor PID
hypervisor PID can be used to move the whole process and its
threads into a new cgroup.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-13 18:01:14 -06:00
Salvador Fuentes
c17dd11e01 versions: Update qemu-lite hash
We are using a newer hash for the packaged qemu-lite.
Update our record in versions.yaml to use the same version
in our CI.

Fixes: #1236.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-02-13 16:01:46 -06:00
Jose Carlos Venegas Munoz
d0879d779c docs: Document release process - tools.
Document flow to create a release based in the tools
from this repository.

Fixes: #207

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-02-13 15:52:36 -06:00
Graham Whaley
136b188fd4
Merge pull request #1235 from nitkon/debug
virtcontainers: Improve debug messages when deleting files
2019-02-13 17:53:48 +00:00
Nitesh Konkar
a614273af5 virtcontainers: Improve debug when create/delete files
Adding debug messages which state which files
are being created/deleted could be helpful in
analyzing situations like leaky pod issues.

Fixes: #1234

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-02-13 20:51:33 +05:30
Marco Vedovati
f39a73ea0c zun: update kata install instructions
Update zun guide to point to the kata installation instructions for
Ubuntu.

Fixes: #371

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-02-13 13:09:52 +01:00
Graham Whaley
d07297c197
Merge pull request #1232 from jcvenegas/clear-rootfs-latest
versions: use clear linux latest rootfs.
2019-02-13 09:36:07 +00:00
Jose Carlos Venegas Munoz
50097f93f9
Merge pull request #327 from marcov/ccloudvm-kata-install
ccloudvm: update kata install URL
2019-02-12 12:37:19 -06:00
Jose Carlos Venegas Munoz
84b7165e90 versions: use clear linux latest rootfs.
Update Clear Linux rootfs to latest.

Fixes: #1230

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-02-12 12:21:33 -06:00
Hui Zhu
d7b6b25059
Merge pull request #1205 from lifupan/asyncevents
shimv2: Send async task events to containerd/cri
2019-02-12 17:12:27 +08:00
Peng Tao
1c27ab79d9
Merge pull request #1225 from teawater/fixmakeinstall
Makefile: Set ARCH in GOPATH not set mode
2019-02-12 09:14:54 +08:00
Eric Ernst
6431f1f288
Merge pull request #1066 from sameo/topic/state-storage
Virtcontainers store
2019-02-11 14:42:20 -08:00
Graham Whaley
319a98fdf8
Merge pull request #1175 from nitkon/master
runtime: Do not error if only initrd/rootfs image installed
2019-02-11 17:48:49 +00:00
James O. D. Hunt
828feca036
Merge pull request #332 from grahamwhaley/20190206_remove_pullapprove
pullapprove: remove it
2019-02-11 11:03:38 +00:00
James O. D. Hunt
9875f47e73
Merge pull request #36 from grahamwhaley/20190206_remove_pullapprove
pullapprove: remove it
2019-02-11 11:00:18 +00:00
James O. D. Hunt
a3a3d1a53e
Merge pull request #1216 from grahamwhaley/20190206_remove_pullapprove
pullapprove: remove it
2019-02-11 10:55:07 +00:00
Graham Whaley
5b483f289a
Merge pull request #380 from nitkon/patch-1
docs: Fix a typo in how-to docs
2019-02-11 10:23:02 +00:00
Hui Zhu
81c7a968ed Makefile: Set ARCH in GOPATH not set mode
In GOPATH not set mode got:
make: go: Command not found
Makefile:38: arch/-options.mk: No such file or directory
make: go: Command not found
Makefile:237: *** "ERROR: No hypervisors known for architecture  (looked for: firecracker qemu)".  Stop.

The root cause is GOPATH not set mode is not set ARCH.
Set it to fix the issue.

Fixes: #1224

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-02-11 17:06:16 +08:00
fupan
96e524d2a0 shimv2: Send task events to containerd/cri
The Runtime v2 supports an async event model. In order for the an upstream
caller (such as Docker) to get these events in the correct order a Runtime
v2 shim MUST implement some events.

For much more info, please see:
https://github.com/containerd/containerd/blob/master/runtime/v2/README.md#events

Fixes:#1204

Signed-off-by: fupan <lifupan@gmail.com>
2019-02-11 11:49:10 +08:00
nitkon
bc7d96998d
docs: Fix a typo in how-to docs
Fix Typo

Fixes: #379

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-02-11 01:05:11 +05:30
James O. D. Hunt
d48ccf4816
Merge pull request #333 from jschintag/qemu_configure_s390x
s390x: add support to build qemu
2019-02-07 17:20:59 +00:00
James O. D. Hunt
56f1044e12
Merge pull request #229 from grahamwhaley/20190206_remove_pullapprove
pullapprove: remove it
2019-02-07 17:19:48 +00:00
GabyCT
1f87f86812
Merge pull request #377 from grahamwhaley/20190206_remove_pullapprove
pullapprove: remove config file
2019-02-07 10:26:30 -06:00
jschintag
5a6b92b711 s390x: add support to build qemu
This commit adds the s390x specific build flags to the configure-hypervisor.sh

Fixes: #324

Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
2019-02-07 16:49:57 +01:00
Samuel Ortiz
bb99e4152b virtcontainers: Fix Store related vm factory leak
We are creating Store directories but never removing them.
Calling into a VM factory created vm Stop() will now clean the VM Store
artifacts up.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-07 00:59:33 +01:00
Samuel Ortiz
7b0376f3d3 virtcontainers: Fix container.go cyclomatic complexity
With the Stores conversion, the newContainer() cyclomatic complexity
went over 15. We fix that by extracting the block devices creation
routine out of newContainer.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-07 00:59:33 +01:00
Samuel Ortiz
f8e7e308c3 virtcontainers: Remove the resource storage original implementation
Now that we converted the virtcontainers code to the store package, we
can remove all the resource storage old code.

Fixes: #1099

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-07 00:59:33 +01:00
Samuel Ortiz
fad23ea54e virtcontainers: Conversion to Stores
We convert the whole virtcontainers code to use the store package
instead of the resource_storage one. The resource_storage removal will
happen in a separate change for a more logical split.

This change is fairly big but mostly does not change the code logic.
What really changes is when we create a store for a container or a
sandbox. We now need to explictly do so instead of just assigning a
filesystem{} instance. Other than that, the logic is kept intact.

Fixes: #1099

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-07 00:59:29 +01:00
Graham Whaley
fc2957ca4a pullapprove: remove it
We are moving off pullapprove. Remove its config file.

Fixes: #35

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 17:05:53 +00:00
Graham Whaley
8963b8e3c9 pullapprove: remove it
We are moving off pullapprove. Remove its config file.

Fixes: #228

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 16:14:24 +00:00
Graham Whaley
0d0c525672 pullapprove: remove it
We are moving off pullapprove. remove its config file.

Fixes: #331

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 16:11:23 +00:00
Graham Whaley
d53675125b pullapprove: remove config file
We are moving off pullapprove. Remove its config file.

Fixes: #376

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 15:55:28 +00:00