Commit Graph

5350 Commits

Author SHA1 Message Date
Ralf-Philipp Weinmann
771b1b1869 docs: fix Debian install documentation due to OBS repo rename
As the Debian OBS repo was renamed was renamed on 20181219 the corresponding documentation
needs to be fixed. See also #306, more specifically
https://github.com/kata-containers/documentation/pull/306#discussion_r242983373

A test install using the documentation on a fresh Debian Stretch (9.5) was done
on 20190119.

Fixes #344

Signed-off-by: Ralf-Philipp Weinmann <ralf@comsecuris.com>
2019-01-19 07:23:35 +01:00
John L. Jolly
e7d2141648 Docs: Remove invalid option from suse guides
The OpenSUSE and SLES install guide for Docker used the --containerd
option. When this option is used on OpenSUSE Leap 15 or SLES 15, the
following error occurs when starting Docker:

    Failed to connect to containerd: failed to dial
        "/run/containerd/containerd.sock": context deadline exceeded

Removing the --containerd option from the configuration file allows the
Docker daemon to start successfully and a Kata container to be created.

Fixes: #350

Signed-off-by: John L. Jolly <jjolly@suse.com>
2019-01-18 12:35:47 +01:00
Graham Whaley
150a44fa6c
Merge pull request #1137 from nitkon/patch-1
virtcontainers: ppc64le qemu does not have nvdimm capabilities yet
2019-01-18 10:46:32 +00:00
Sebastien Boeuf
744354db56
Merge pull request #1134 from lifupan/marshalany
shimv2: use the UnmarshalAny() to unmarshal Protobuf.Any
2019-01-18 01:33:52 -08:00
Sebastien Boeuf
45f72219f8
Merge pull request #1151 from sboeuf/fix_v2_shutdown
runtime-v2: Make sure Shutdown() only shuts the server down
2019-01-18 01:32:43 -08:00
Jianyong Wu
d2a42cb6d5 kernel: config: bump config
Fixes: #309

Signed-off-by: Jianyong Wu  <jianyong.wu@arm.com>
2019-01-18 02:55:44 -05:00
Jianyong Wu
e654dbd836 kernel: Add memory hotplug(add) support for arm64
As memory hotplug for arm64 by acpi is not ready on qemu, we choose
"probe" instead. You can refer to [1] to get more infomation about
"probe". The process of memory hotplug by "probe" in kata lies below:
firstly, add memory in qemu qmp; secondly, echo the start phyical address
of that memory to /sys/devices/system/memory/probe, which will be done
through kata-agent; thirdly, excute online op, then this newly added
memory is capable to be used.

All functions in this patch will be called after "echo" op. It can be
divided into two parts:
1. create page table for that memory;
2. add that memory to memblock.

In this patch, NUMA must be turned off for not all arm64 machine supports
NUMA.
As the newly added memory should be placed from 2T to 6T which is decided
in qemu and phyical address and virtual address will be one-one mapping
when create pgd for that memory, we must config ARM64_VA_BITS as 48.
Also some configs should be turned on, especially "ARCH_MEMORY_PROBE".

We have tested this patch integrated with another patch which performed
that echo op. It works well when using "-m" in command line when start a
kata-container on aarch64 machine.

This patch derived from Maciej Bielski. You can refer to [2] to get full
infomation about it.

[1] https://www.kernel.org/doc/Documentation/memory-hotplug.txt
[2] https://lkml.org/lkml/2017/11/23/183

Fixes: #309

Signed-off-by: Jianyong Wu  <jianyong.wu@arm.com>
Signed-off-by: Jia He <justin.he@arm.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-01-18 02:52:18 -05:00
Sebastien Boeuf
5329a71b3d runtime-v2: Make sure Shutdown() only shuts the server down
Because the runtime v2 runs as a RPC server, the caller will at some
point use the Shutdown() API to shut down the server. Because this
will cause the server to exit, the caller cannot expect any valid
answer when calling this. That's why we cannot afford stopping and
deleting the sandbox from this function.

Instead, we move sandbox.Stop() and sandbox.Delete() to a more
appropriate API, the Delete() one.

Fixes #1150

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-01-17 22:15:29 -08:00
Eric Ernst
d7b02c502e
Merge pull request #1109 from jodh-intel/create-fc-config
Add build support for the firecracker hypervisor
2019-01-17 21:46:47 -08:00
Eric Ernst
50650e9342
Merge pull request #1146 from sameo/topic/typo
virtcontainers: Fix unit test typo
2019-01-17 21:41:42 -08:00
Peng Tao
ea2086b45f
Merge pull request #1133 from lifupan/multiwait
shimv2: multi wait support for wait service
2019-01-18 12:12:39 +08:00
Frank Cao
6c3277e013
Merge pull request #1126 from jcvenegas/allow-update-on-ready
update: allow do update on ready.
2019-01-18 11:03:12 +08:00
Jose Carlos Venegas Munoz
f802dd8796
Merge pull request #303 from mcastelino/topic/firecracker
Firecracker: Add support for firecracker packaging
2019-01-17 15:18:39 -05:00
Manohar Castelino
6a44bdb48b Firecracker: Add support for firecracker packaging
Start packaging the supported version of firecracker.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-01-17 09:37:31 -08:00
Samuel Ortiz
a07b4cd57f virtcontainers: Fix unit test typo
s/Emtpy/Empty/g

Fixes: #1145

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-17 15:55:56 +01:00
Alice Frosi
02261f9b40 s390x: change pci bridge type
Change type name for PCIBridge

Fixes: #1141

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-01-17 15:52:20 +01:00
Alice Frosi
f542233cbd s390x: root parameter is missing
Fixes: #1140

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-01-17 15:41:12 +01:00
James O. D. Hunt
1e89f7ed68
Merge pull request #225 from Pennyzct/memory-hotplug
memory_hotplug: MEM_BOUNDARY_MB should be arch-dependent
2019-01-17 11:18:29 +00:00
nitkon
18c7aa44a8
virtcontainers: ppc64le qemu does not have nvdimm capabilities yet
Remove `nvdimm` from qemu command line
as the upstream qemu on ppc64le does not have
nvdimm capabilities yet.

Fixes: #1136

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-01-17 14:29:28 +05:30
fupan
5ee838d412 shimv2: use the UnmarshalAny() to unmarshal Protobuf.Any
It'll be much clear to unmarshal Protobuf.Any using
UnmarshalAny().

Fixes: #1130

Signed-off-by: fupan <lifupan@gmail.com>
2019-01-17 10:14:37 +08:00
Jose Carlos Venegas Munoz
7228bab79b container: update: Allow updates once container is created
Before, we would only allow for a container-update command
to proceed if the container was in the running state. So
long as the container is created, this should be allowed.

This was found using the `static` policy for Kubernetes CPU
manager[1]. Where the `update` command is called after the
`create` runtime command (when the container state is `ready`).

[1] https://github.com/kubernetes/community/blob/95a4a1/contributors/design-proposals/node/cpu-manager.md#example-scenarios-and-interactions

Fixes: #1083

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-01-16 17:15:00 -05:00
Archana Shinde
9b9ff2b7e6
Merge pull request #1019 from shaojiaxue/master
cli: fix parameter order error in cli/ps.go
2019-01-16 11:21:51 -08:00
Sebastien Boeuf
e03caf6234
Merge pull request #1122 from sameo/topic/asset-types
virtcontainers: Add Asset, Capabilities and Bridge to the types package
2019-01-16 09:03:45 -08:00
Samuel Ortiz
2e1ddbc725 virtcontainers: Add Bridge to the types package
Bridge is representing a PCI/E bridge, so we're moving the bridge*.go
to types/pci*.go.

Fixes: #1119

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-16 15:45:08 +01:00
fupan
5ba30fd628 shimv2: multi wait support for wait service
Support multi wait on one container/exec process.

Fixes: #1131

Signed-off-by: fupan <lifupan@gmail.com>
2019-01-16 12:41:59 +08:00
Penny Zheng
e4d5c1b751 memory_hotplug: MEM_BOUNDARY_MB should be arch-dependent
As runtime/#624(https://github.com/kata-containers/runtime/pull/624#discussion_r212534586)
discussed before, the size of memory section is arch-dependent.
For arm64, it should be 1G, not 128MB.

Fixes: #224

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-01-16 11:16:26 +08:00
Jose Carlos Venegas Munoz
b3d2688762
Merge pull request #306 from devimc/topic/fixSnap
snap: don't use make snap to build the snap
2019-01-14 16:43:44 -05:00
Samuel Ortiz
b25f43e865 virtcontainers: Add Capabilities to the types package
In order to move the hypervisor implementations into their own package,
we need to put the capabilities type into the types package.

Fixes: #1119

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-14 20:30:06 +01:00
Samuel Ortiz
67e696bf62 virtcontainers: Add Asset to the types package
In order to move the hypervisor implementations into their own package,
we need to put the asset type into the types package and break the
hypervisor->asset->virtcontainers->hypervisor cyclic dependency.

Fixes: #1119

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-14 20:30:06 +01:00
James O. D. Hunt
6c3e0a9c06 build: Add support for building firecracker hypervisor
Support building with `make HYPERVISOR=firecracker`.

Notes:

- Firecracker is currently only supported on x86_64, hence the
  architecture check.

- The template file `cli/config/configuration-fc.toml.in` is based
  on `cli/config/configuration.toml.in`.

Fixes #1105.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-01-14 16:55:01 +00:00
James O. D. Hunt
6fcb76cb37 build: Handle qemu explicitly
Improve the build to:

- Encapsulate the qemu configuration.
- Validate the chosen hypervisor.
- Display hypervisor details for `make help`.

This lays the groundwork to build configurations for multiple
hypervisors.

Notes:

- Variables that are hypervisor specific have now been suffixed with `_QEMU`.

- `make install` now installs `configuration-qemu.toml`.

  To maintain compatibility with existing installations, a symbolic link
  to this file called `configuration.toml` is created.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-01-14 16:54:57 +00:00
Julio Montes
7f7e258d14 snap: don't use make snap to build the snap
In some build systems like launchpad is not possible to run neither
custom commands or hooks, hence build a snap image with `make snap` is
not feasible, to deal with this limitation, the final snapcraft.yaml
is part of the repository and all packages versions are read from versions.yaml
in the runtime repository.

fixes #305

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-01-14 07:58:48 -06:00
James O. D. Hunt
933b16fc61 build: Improve quiet install
Move the quiet prefix from the `INSTALL_EXEC` recipe and use it at the
call sites. This makes the code robust when calling the recipe in a
`$(foreach ...)` loop.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-01-14 10:48:38 +00:00
fli
4fda493384
Merge pull request #1107 from teawater/move_SetKernelParams
katautils: Move SetKernelParams from CreateSandbox to updateRuntimeCo…
2019-01-14 10:18:43 +08:00
Jose Carlos Venegas Munoz
a5a74f6d20 vc: qemu: fix error message on hotplug.
The error message does not provide the max memory that is exceeded.

Fix it for better error information.

Fixes: #1120

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-01-11 13:34:32 -06:00
Jose Carlos Venegas Munoz
d4dd5f1508 qemu: fix gofmt import order.
use gofmt changes the import order.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-01-11 13:33:01 -06:00
Graham Whaley
ab214c1378
Merge pull request #343 from abousselmi/master
Docs: remove ps and network connect limitations
2019-01-11 12:33:33 +00:00
Ayoub Bousselmi
9b9e5d63e0 Docs: network connect is no longer a limitation
Remove the `network connect` limitation from `Limitations.md` as the limitation has been removed.

Fixes #287.

Signed-off-by: Ayoub Bousselmi <abousselmi@users.noreply.github.com>
2019-01-11 12:15:20 +01:00
Ayoub Bousselmi
bb361623f6 Docs: ps is no longer a limitation
Remove the `ps` limitation from `Limitations.md` as the limitation has been removed.

Fixes #342.

Signed-off-by: Ayoub Bousselmi <abousselmi@users.noreply.github.com>
2019-01-11 12:14:57 +01:00
Hui Zhu
42a89d0dcd katautils: Move SetKernelParams from CreateSandbox to updateRuntimeConfig
Function SetKernelParams is just to update the runtimeConfig according to itself.
It just around the configuration.
So this patch moves it to updateRuntimeConfig.

Fixes: #1106

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-01-11 08:25:42 +08:00
Eric Ernst
3a2c0a6506
Merge pull request #1104 from mcastelino/topic/packaging
Versions: Add firecracker version
2019-01-09 15:44:45 -08:00
Manohar Castelino
abcc2d5867 Versions: Add firecracker version
Add firecracker version to versions.yaml. This allows kata
packaging to build and package firecracker.

Fixes: #1103

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-01-09 13:23:29 -08:00
Sebastien Boeuf
5be3458f84
Merge pull request #1010 from sameo/topic/hypervisor-interface
Hypervisor interface simplification
2019-01-09 13:04:55 -08:00
Eric Ernst
a60cd133bd
Merge pull request #300 from jcvenegas/use-local-kernel-version
kernel: build: Use local kernel version.
2019-01-09 11:09:52 -08:00
Jose Carlos Venegas Munoz
95fef541c2 kernel: test: improve error handler
print output from  last command that failed.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-01-09 11:21:13 -06:00
Frank Cao
b7ebc276aa
Merge pull request #1090 from nitkon/kataenv
kata-runtime: Return correct kata-env on ppc64le
2019-01-09 20:34:05 +08:00
Nitesh Konkar
db33d71102 Kata-runtime: Use correct model name for TestGetCPUDetails
Use the correct model name for ppc64le TestGetCPUDetails
model name.

Fixes: #1089

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-01-09 15:19:22 +05:30
Nitesh Konkar
11e24aa42d kata-runtime: Return correct kata-env on ppc64le
The contents of /proc/cpuinfo were
trimmed and hence the "model" field could
not be parsed despite being a field in
/proc/cpuinfo. Fix this issue.

Fixes: #1089

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-01-09 15:18:09 +05:30
Xu Wang
4977445cc5
Merge pull request #327 from teawater/vmware
vsock: Add introduction about VMWare guest
2019-01-09 10:45:57 +08:00
Xu Wang
8a0793234b
Merge pull request #1098 from teawater/remove_containerID
katautils: Remove unused argument containerID of function SetKernelPa…
2019-01-09 10:45:16 +08:00