Commit Graph

5350 Commits

Author SHA1 Message Date
Sebastien Boeuf
b298ec4228 sandbox: Create and export ProcessListContainer() to the API level
In order to support use cases such as containerd-shim-v2 where
we would have a long running process holding the sandbox pointer,
there would be no reason to call into the stateless function
ProcessListContainer(), which would recreate a new sandbox pointer
and the corresponding ones for containers.

Fixes #903

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-12 15:15:44 -08:00
Sebastien Boeuf
3add296f78 sandbox: Create and export KillContainer() to the API level
In order to support use cases such as containerd-shim-v2 where we
would have a long running process holding the sandbox pointer, there
would be no reason to call into the stateless function KillContainer(),
which would recreate a new sandbox pointer and the corresponding ones
for containers.

Fixes #903

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-12 15:15:37 -08:00
Sebastien Boeuf
76537265cb sandbox: Create and export StopContainer() to the API level
In order to support use cases such as containerd-shim-v2 where we
would have a long running process holding the sandbox pointer, there
would be no reason to call into the stateless function StopContainer(),
which would recreate a new sandbox pointer and the corresponding ones
for containers.

Fixes #903

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-12 15:15:31 -08:00
Sebastien Boeuf
109e12aa56 sandbox: Export Stop() to the API level
In order to support use cases such as containerd-shim-v2 where we
would have a long running process holding the sandbox pointer, there
would be no reason to call into the stateless function StopSandbox(),
which would recreate a new sandbox pointer and the corresponding ones
for containers.

Fixes #903

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-12 15:15:24 -08:00
Sebastien Boeuf
6c3e266eb9 sandbox: Export Start() to the API level
In order to support use cases such as containerd-shim-v2 where we
would have a long running process holding the sandbox pointer, there
would be no reason to call into the stateless function StartSandbox(),
which would recreate a new sandbox pointer and the corresponding ones
for containers.

Fixes #903

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-12 15:15:04 -08:00
Eric Ernst
4cddfc63d8
Merge pull request #900 from teawater/yq
golang.mk: Check and install yq before use it
2018-11-12 13:22:50 +01:00
Eric Ernst
4af6a40f39
Merge pull request #156 from nitkon/master
rootfs: Conditionally add libseccomp support in rootfs image
2018-11-12 09:39:34 +01:00
Hui Zhu
f5048b725b golang.mk: Check and install yq before use it
golang.mk call yq to get golang_version_min but some environments do
not install it.
This patch check and install yq before use it to handle the issue.

Fixes #899

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2018-11-10 18:31:49 +08:00
Marco Vedovati
14e5bc02ed
Merge pull request #192 from houstar/master
rootfs.sh: enable curl use http_proxy
2018-11-09 12:09:45 +01:00
Ruidong Cao
2f98b3ee90 network: support hotplug a nic several times
Bind back the nic's MAC in HotDetach. So we don't need to modify
nic's MAC in description to hotplug it again.

Fixes: #894

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-11-09 17:21:03 +08:00
Eric Ernst
ebd86d604e
Merge pull request #870 from lifupan/cli_refactor
cli: refactor the config into a separated package
2018-11-08 14:23:16 -08:00
Nitesh Konkar
7f2371858c rootfs: Conditionally add libseccomp support in rootfs image
If the rootfs is built with SECCOMP=yes environment
variable then include libseccomp package inside the
rootfs image. Else do not include it.

Fixes: #155

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-11-09 00:27:44 +05:30
Nitesh Konkar
a588140bc6 ci: Improve debugging info on travis CI run
Fixes: #174

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-11-09 00:00:21 +05:30
Graham Whaley
a935f8a1f4
Merge pull request #828 from teawater/dev
newContainer: Not attach device if it is a CDROM
2018-11-08 16:58:35 +00:00
Julio Montes
7256ff8453 snap: fix build error in launchpad
Add cpio to build-packages list since it's required to create initrd images

fixes #240

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-11-08 08:23:01 -06:00
Julio Montes
6c7de6c297 snap: fix prefix and dest paths
Use /snap/kata-containers/current as prefix on building but /usr on install.
This changes are needed to include all new kata components like netmon in the
final snap.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-11-08 08:19:45 -06:00
Graham Whaley
722c5962b8
Merge pull request #239 from Weichen81/master
kernel: Enable Real time clock for Arm64
2018-11-08 10:49:34 +00:00
Wei Chen
1f7841c683 kernel: Enable Real time clock for Arm64
Without Real time clock the date could not work properly for Arm64.

fixes: #238
Change-Id: I5834a5e90dc648cc9599c50f259d5ae273052a39
Signed-off-by: Wei Chen <wei.chen@arm.com>
2018-11-08 10:11:14 +00:00
Julio Montes
2a7774df63
Merge pull request #237 from devimc/topic/snap-libfdt
snap: fix build errors
2018-11-08 03:05:52 -06:00
Gabriela Cervantes
5e9819fb24 docs: Remove Ramdisk Limitations
Now that https://github.com/kata-containers/runtime/pull/412 has been merged and
we have running a docker integration test for ramdisk in our CI
https://github.com/kata-containers/tests/pull/446, we can remove the limitation
of ramdisk.

Fixes #170

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2018-11-08 02:16:04 -06:00
fupan
842a00a5b6 cli: refactor the config into a separated package
Refactor the config related codes into a separated
package which can be shared with other cli programs
such as kata's shimv2.

Fixes: #787
Fixes: #714

Signed-off-by: fupan <lifupan@gmail.com>
2018-11-08 09:43:29 +08:00
Julio Montes
95734e5a16 snap: fix build errors
Add libfdt-dev as build dependency because of qemu requires it in ppc and arm.

fixes #97

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-11-07 08:24:20 -06:00
Leno Hou
8599143069 rootfs.sh: enable curl use http_proxy
This patch added -x option to curl: -x uses the http_proxy
settings to download golang binary behind the firewall

Fixes: #193

Signed-off-by: Leno Hou <lenohou@gmail.com>
2018-11-07 13:20:02 +00:00
Hui Zhu
193b324242 newContainer: Not attach device if it is a CDROM
Got "docker: Error response from daemon: OCI runtime create failed:
QMP command failed: unknown." when "docker run --privileged" with kata.
In qemu part, it got:
"Could not open '/dev/sr0': Read-only file system"
or
"No medium found"
The cause is qemu need open block device to get its status.
But /dev/sr0 is a CDROM that cannot be opened.

This patch let newContainer doesn't attach device if it is a CDROM
to handle the issue.

Fixes #829

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2018-11-07 17:28:06 +08:00
Alex Yang
b78fe831ec docs: fix a link in installing-with-kata-manager.md
Fix the link from #install-kata-packages-only to #install-the-kata-packages-only

Fixes #295

Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
2018-11-07 10:13:37 +08:00
Sebastien Boeuf
0123f8f2a9
Merge pull request #191 from marcov/allow-failures
tests: allow rootfs build to fail for specific distros
2018-11-06 08:49:53 -08:00
Marco Vedovati
97f38c7706 tests: allow euleros rootfs build to fail
Update test config for euleros to allow build failures.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-11-06 09:56:52 +01:00
Marco Vedovati
ee7f2e1175 tests: allow build to fail for specific distros
When running test_images.sh, allow specific rootfs builds to
fail without impacting the overall tests results.
The distros allowed to fail are the ones specifying
BUILD_CAN_FAIL in their config.sh.

Fixes: #190

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-11-06 09:56:52 +01:00
Marco Vedovati
57d0a8300b rootfs.sh: trap build errors for specific distros
Add the ability to trap a build error inside rootfs.sh, without
returning an error code.
Gating conditions (all of them are needed):
- GRACEFUL_EXIT shall be passed as env variable to rootfs.sh
- BUILD_CAN_FAIL shall be specified in the distro config.sh

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-11-06 09:56:46 +01:00
zhangwei_cs
d895cd0f2d
Merge pull request #806 from grahamwhaley/20181002_golang_110
build: check golang version meets min req.
2018-11-06 16:11:41 +08:00
liucimin
81226f6943 docs: update the architecture doc
Update the k8s create sandbox and container code in runtime.

Fixes #292

Signed-off-by: Liu Cimin lcmjkson@gmail.com
2018-11-06 09:39:34 +08:00
Archana Shinde
f81db93ef0
Merge pull request #885 from caoruidong/test
network: Use constant string for "none" network model
2018-11-05 14:18:04 -08:00
Sebastien Boeuf
919b009b50
Merge pull request #877 from marcov/buildmode-pie
runtime,netmon: build as Position-Independent-Executable
2018-11-05 11:51:48 -08:00
Ruidong Cao
8ddc0ceefb network: Use constant string for "none" network model
Align with other network models.

Fixes #884.

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-11-06 02:28:49 +08:00
Sebastien Boeuf
abfc61b50d
Merge pull request #867 from sboeuf/iface_type
virtcontainers: Rely on new interface LinkType field
2018-11-05 07:13:16 -08:00
James O. D. Hunt
dc411015ca
Merge pull request #288 from liucimin/add_cni_diagram
docs: Delete the wrong cni flow in README
2018-11-05 14:12:29 +00:00
James O. D. Hunt
40bab8d76f
Merge pull request #233 from xindazhao/gpu-support
kernel: configs: Add Intel GPU support
2018-11-05 12:41:59 +00:00
Eric Ernst
8f0efa5336
Merge pull request #290 from sboeuf/update_kata_nemu
nemu: Retrieve directly the latest OVMF binary
2018-11-02 13:57:27 -07:00
Sebastien Boeuf
51997775bd virtcontainers: Rely on new interface LinkType field
Now that Interface structure includes the useful information about
the type of interface, Kata does not need to do any assumption about
the type of interface that needs to be added.

Fixes #866

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-02 08:46:11 -07:00
Sebastien Boeuf
45b219107c netmon: Rely on new interface field LinkType
In order to provide the right information about the interface that
needs to be added, kata-netmon provisions the new field LinkType of
the Interface structure.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-02 08:46:11 -07:00
Sebastien Boeuf
7bf84d05ad types: Replace agent/pkg/types with virtcontainers/pkg/types
This commit replaces every place where the "types" package from the
Kata agent was used, with the new "types" package from virtcontainers.

In order to do so, it introduces a few translation functions between
the agent and virtcontainers types, since this is needed by the kata
agent implementation.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-02 08:46:11 -07:00
Sebastien Boeuf
39b95cc365 virtcontainers: Create a new package "types"
Instead of relying on the kata agent to define generic structures,
the logic is to define those as virtcontainers "types" package.
This way, all consumers of those structures, such as kata-runtime,
kata-netmon, and kata-containerd-shim, don't have to import some
dependency from the kata-agent.

Fixes #876

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-02 08:46:09 -07:00
Marco Vedovati
658bdb1ecb runtime,netmon: build as Position-Independent-Executable
Build {runtime,netmon} as Position-Independent-Executable (PIE) for improved
security and compliancy with distros packaging guidelines.

Fixes: #875

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-11-02 16:23:17 +01:00
fli
e90dc35e51
Merge pull request #872 from bergwolf/network-new
enable default network endpoints hotplug for vm factory
2018-11-02 16:20:33 +08:00
Sebastien Boeuf
23782b2c13 nemu: Retrieve directly the latest OVMF binary
Instead of specifying a version for OVMF binary, this patch uses
a tiny script to retrieve the proper URL to download from.

Fixes #289

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-01 09:19:24 -07:00
liucimin
4571e11f58 docs: Delete the wrong cni flow in README
Fix the wrong Network CNI section.

Fixes: #287

Signed-off-by: Liu Cimin lcmjkson@gmail.com
2018-11-01 09:55:36 +08:00
Peng Tao
e9aa870255 network: enable network hotplug for vm factory
After we scan the netns, we should hotplug the network interface to
the guest after it is kicked off running.

Fixes: #871

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-11-01 09:33:16 +08:00
Sebastien Boeuf
2cae9c3ef4
Merge pull request #869 from lifupan/fix_path
cli: fix the issue of using wrong path to get version
2018-10-30 15:14:37 -07:00
Graham Whaley
95f4fdb603 build: check golang version meets min req.
Check that the system golang version is new enough to build with
according to the data from the `versions.yaml` file.

Update the verions in the versions.yaml accordingly, and add a note
describing what the 'newest-version' item represents.
Note, we only do a minimum requirement check, and are not checking
against the 'newest-version' info from the yaml.

Fixes: #148

Inspired-by: Wei Zhang <zhangwei555@huawei.com>
Idea-by: James O. D. Hunt <james.o.hunt@intel.com>
Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-10-30 15:45:05 +00:00
Graham Whaley
eaa5c7a442 CI: travis: call yq installer
Install `yq` before running the tests.
The Makefile now uses `yq` to check the golang version against
the versions file.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-10-30 15:44:40 +00:00