Commit Graph

1442 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Jose Carlos Venegas Munoz
8f6c7c4c7f
Merge pull request #1101 from chavafg/topic/revert-kernel
kernel: Revert "versions: Bump to kernel 4.19.10"
2019-01-08 19:17:54 -06:00
Salvador Fuentes
2c1b15def9 kernel: Revert "versions: Bump to kernel 4.19.10"
This reverts commit 802bfa26c9.
Seems that we have some performance issues when
using this new kernel. Reverting to have a clean CI and
have a proper investigation about the degradation.

Fixes: #1100.

Signed-off-by: Salvador Fuentes salvador.fuentes@intel.com
2019-01-08 16:13:21 -06:00
Julio Montes
b029e442b2 virtcontainers: set private propagation in rootfs
When overlay is used as storage driver, kata runtime creates a new bind mount
point to the merged directory, that way this directory can be shared with the
VM through 9p. By default the mount propagation is shared, that means mount
events are propagated, but umount events not, to deal with this problem and to
avoid left mount points in the host once container finishes, the mount
propagation of bind mounts should be set to private.

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

fixes #794

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-01-08 13:07:08 -06:00
Eric Ernst
ca528285cf
Merge pull request #1030 from sboeuf/bump_4_19_9
versions: Bump to kernel 4.19.10
2019-01-08 11:01:32 -08:00
Samuel Ortiz
a02fd5982c virtcontainers: Remove code duplication in the test setup
And add some additional log output for displaying the directories and
files created when kicking the virtcontainers tests.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-08 19:38:33 +01:00
Samuel Ortiz
cf22f402d8 virtcontainers: Remove the hypervisor waitSandbox method
We always call waitSandbox after we start the VM (startSandbox), so
let's simplify the hypervisor interface and integrate waiting for the VM
into startSandbox.
This makes startSandbox a blocking call, but that is practically the
case today.

Fixes: #1009

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-08 19:38:33 +01:00
Samuel Ortiz
763bf18daa virtcontainers: Remove the hypervisor init method
We always combine the hypervisor init and createSandbox, because what
we're trying to do is simply that: Set the hypervisor and have it create
a sandbox.

Instead of keeping a method with vague semantics, remove init and
integrate the actual hypervisor setup phase into the createSandbox one.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-08 19:37:20 +01:00
Sebastien Boeuf
142d3b45e1
Merge pull request #1096 from sameo/topic/types
Initial types package creation
2019-01-08 09:51:31 -08:00
Hui Zhu
fb149ce34e katautils: Remove unused argument containerID of function SetKernelParams
Remove unused argument containerID of function SetKernelParams.

Fixes: #1097

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-01-08 22:22:28 +08:00
Samuel Ortiz
b05dbe3886 runtime: Convert to the new internal types package
We can now remove all the sandbox shared types and convert the rest of
the code to using the new internal types package.

This commit includes virtcontainers, cli and containerd-shim changes in
one atomic change in order to not break bisect'ibility.

Fixes: #1095

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-08 14:43:33 +01:00
Samuel Ortiz
701afe9e60 virtcontainers: First types package
The types package holds all shared virtcontainers types.
With the separation of the virtcontainers code into separate packages,
we need a types one to not create circular dependencies.

This package holds sandbox related types and structures for now. It will
grow as virtcontainers code is moved into their own internal packages.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-08 14:24:42 +01:00
Samuel Ortiz
3ab7d077d1 virtcontainers: Alias for pkg/types
Since we're going to have both external and internal types packages, we
alias the external one as vcTypes. And the internal one will be usable
through the types namespace.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-08 14:24:06 +01:00
James O. D. Hunt
36c267a1d2
Merge pull request #1085 from bergwolf/containerd
cli: allow to kill a stopped container and sandbox
2019-01-08 08:44:10 +00:00
James O. D. Hunt
38c9cd2b85
Merge pull request #689 from nitkon/seccomp
virtcontainers: Pass seccomp profile inside VM
2019-01-08 08:42:07 +00:00
Nitesh Konkar
c2c9c844e2 virtcontainers: Conditionally pass seccomp profile
Pass Seccomp profile to the agent only if
the configuration.toml allows it to be passed
and the agent/image is seccomp capable.

Fixes: #688

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-01-08 10:22:23 +05:30
Eric Ernst
87570b78eb
Merge pull request #1012 from sameo/topic/sandbox-simplification
First createSandboxFromConfig simplification
2019-01-07 19:30:49 -08:00
Peng Tao
bf2813fee8 cli: allow to kill a stopped container and sandbox
cri containerd calls kill on stopped sandbox and if we
fail the call, it can cause `cri stopp` command to fail
too.

Fixes: #1084

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2019-01-08 11:19:25 +08:00
Samuel Ortiz
09168ccda7 virtcontainers: Call stopVM() from sandbox.Stop()
Now that stopVM() also calls agent.stopSandbox(), we can have the
sandbox Stop() call using stopVM() directly and avoid code duplication.

Fixes: #1011

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-07 09:56:58 -08:00
Samuel Ortiz
acf833cb4a virtcontainers: Call agent startSandbox from startVM
We always ask the agent to start the sandbox when we start the VM, so we
should simply call agent.startSandbox from startVM instead of open
coding those.
This slightly simplifies the complex createSandboxFromConfig routine.

Fixes: #1011

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-01-07 09:56:04 -08:00
Samuel Ortiz
ebf8547c38 virtcontainers: Remove useless startSandbox wrapper
startSandbox() wraps a single operation (sandbox.Start()), so we can
remove it and make the code easier to read/follow.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-01-07 09:48:22 -08:00
Peng Tao
a8e158c9e3
Merge pull request #1092 from lifupan/config
shimv2: get the kata configure file from env KATA_CONF_FILE
2019-01-07 22:35:52 +08:00
fupan
0b28ab9e57 shimv2: get the kata configure file from env KATA_CONF_FILE
If the env KATA_CONF_FILE was set, shimv2 will use it as the
kata configure file, otherwise, it will try to find it from
/etc and /usr/share directory.

Fixes: #1091

Signed-off-by: fupan <lifupan@gmail.com>
2019-01-05 17:50:47 +08:00
Sebastien Boeuf
8161b4c1c1
Merge pull request #1077 from mcastelino/topic/firecracker-api-fix
firecracker: Network API update
2019-01-02 02:29:45 -08:00
Manohar Castelino
5c6d94d756 firecracker: Revendor firecracker go sdk to 0.12.0
Revendor firecracker go sdk for Firecracker 0.12.0 API changes

git shortlog

9614612 (HEAD -> master, origin/master, origin/HEAD) Merge pull request
653c342 Adding drives builder
3c1f5c3 Merge pr #41
c4151ff Migrate firectl to its own repository
433f262 Merge pull request #23 from xibz/fifo_logging_file
121ef9a add handler lists to handle initialization
0fd9825 Adding support for capturing fifo logs to file.
6b08ec7 Merge branch 'fc-0.12.0'
25878e7 Update for Firecracker 0.12.0 API changes
ea93f77 Regenerate API client from swagger spec
00d8eee Update swagger.yaml for firecracker 0.12.0

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2018-12-27 19:47:17 -08:00
Manohar Castelino
ec5cf18bd1 firecracker: Network API update
The Network API no longer supports the state field. Using the
state field causes the API call to fail.

Note: The firecracker binary needs to be updated to match the API
as the older versions will expect the state field.

Fixes: #1078

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2018-12-27 09:34:13 -08:00