Commit Graph

4802 Commits

Author SHA1 Message Date
Yang Bo
089f3b4651
Merge pull request #72 from ericho/master
agent: Move test macros to a separate module to be commonly used.
2019-11-08 15:02:56 +08:00
Eric Ernst
c12c533d14 kata-deploy: don't remove pre-existing containerd
Append to file if container/config.toml already exists.

Fixes: #307

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-07 20:29:11 -08:00
GabyCT
3e3e923aa2
Merge pull request #2167 from chavafg/topic/k8s-1.16
versions: Update kubernetes and cri-o to 1.16
2019-11-07 14:48:21 -06:00
Salvador Fuentes
69ab09273d versions: Add cri-tools and conmon to the versions.yaml
cri-tools version was managed in the tests repository, but as
we define here cri-o, containerd and kubernetes versions, it
make sense to have the cri-tools version defined in this repo.

conmon has now to be installed/built separately. So add it
to the list.

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

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-11-07 10:38:58 -06:00
Jose Carlos Venegas Munoz
05a8d4ba95 CI: Fix bump test
Bump test fails because Kata  version at this moment is alfa and
only bumps from alpha to rc0 are allowed. Just use rc0 as use-case
for all, there is not any other constrain at the moment.

Fixes: #795

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-11-07 15:19:52 +00:00
Archana Shinde
853a99cfd2 release: Fix bug in evaluation kata_version.
With the previous syntax, literal value was being assigned to
kata_version.

Fixes: #793

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-11-06 09:31:49 -08:00
Alex Price
e06a230c30 config: add hotplug timeout option
This adds an option to the agent to control the hotplug timeout of block devices.
Retains the previous behaviour of defaulting to 3 seconds if not specified.
Can be increased when block device hot plugging is taking longer than expected.

fixes #62

Signed-off-by: Alex Price <aprice@atlassian.com>
2019-11-06 21:12:27 +11:00
Yves Chan
5b31282558 vc/qemu: add mutex to qmp monitor channel in qmpSetup()
Solve possible race condition in qmpSetup() and qmpShutdown()

Fixes: #2139

Signed-off-by: Yves Chan <shanks.cyp@gmail.com>
2019-11-06 11:38:51 +08:00
Yang Bo
777cee5436
Merge pull request #71 from jodh-intel/allow-gnu-target-build
build: Allow building with gnu target
2019-11-06 10:27:25 +08:00
Salvador Fuentes
0e70b38d06 versions: Update kubernetes and cri-o to 1.16
Update k8s supported version from 1.15.3 to 1.16.2
and cri-o from 1.15.0 to 1.16.0

Fixes: #2166.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-11-05 13:57:02 -06:00
Erich Cordoba
b14f5a1f89 agent: Move test macros to a separate module to be commonly used.
The `skip_*` macros will be useful across the different tests so having
them in a separate module can help with code duplication. This change
creates a new module and exports the macros at crate level.

Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-11-05 10:01:43 -06:00
James O. D. Hunt
b499732f75
Merge pull request #791 from egernst/master-dont-use-fork
kata-deploy: action: reference kata-containers instead of fork
2019-11-05 08:24:09 +00:00
Yang Bo
d33c2f84a8 netlink: Fix invalid route crashes agent
Invalid routes in update_routes request crash agent, fix it

Fixes: #73

Signed-off-by: Yang Bo <bo@hyper.sh>
2019-11-05 10:45:35 +08:00
Eric Ernst
4d129fd9be kata-deploy: action: reference kata-containers instead of fork
Should have been fixed before merge. Reference upstream instead of fork
of Kata.

Fixes #789

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-04 09:15:09 -08:00
Archana Shinde
ec95961620 kernel: Enable configuration for fips mode.
This will allow us to run a VM in fips mode.
The intention is to check if the host is running in fips mode
and then start a container in fips mode as well.

Fixes #787

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-11-01 15:19:36 -07:00
Julio Montes
4c9321088e
Merge pull request #774 from devimc/topic/snap/fixLaunchpad
snap: make launchpad happy again
2019-11-01 10:07:32 -06:00
James O. D. Hunt
f55667df38 build: Allow building with gnu target
Fixes to allow the rust agent to be built using a gnu target.
Specifically, remove assumptions about musl-specific types.

Fixes: #70.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-11-01 14:05:34 +00:00
Salvador Fuentes
2082a9f2a2
Merge pull request #2163 from yyyeerbo/wip
versions: move cmake and musl version into versions.yaml
2019-11-01 07:25:36 -06:00
Salvador Fuentes
764c26063e
Merge pull request #2159 from egernst/1.10.0-alpha0-branch-bump
# Kata Containers 1.10.0-alpha0
2019-11-01 07:21:57 -06:00
Yang Bo
d045169476
Merge pull request #68 from yyyeerbo/wip
rust-agent: Set BUILDTYPE to debug.
2019-11-01 19:16:42 +08:00
Yang Bo
783cb13f8d
Merge pull request #66 from ericho/master
agent: Remove `get_key_value` to enable building in stable rust.
2019-11-01 18:59:31 +08:00
Fupan Li
ae211e5bba
Merge pull request #65 from jodh-intel/create-config-module
main: Split config code into separate module
2019-11-01 18:10:35 +08:00
James O. D. Hunt
0de5c42276
Merge pull request #2149 from vijaydhanraj/acrn_remove_num_cpu_option
HV: Remove number of guest CPU configuration in ACRN
2019-11-01 09:29:58 +00:00
Yang Bo
a1e359d331 versions: move cmake and musl version into versions.yaml
Fixes: #2162

Signed-off-by: Yang Bo <bo@hyper.sh>
2019-11-01 17:27:48 +08:00
James O. D. Hunt
2f43fefe74
Merge pull request #779 from egernst/1.10.0-alpha0-branch-bump
# Kata Containers 1.10.0-alpha0
2019-11-01 09:18:56 +00:00
Yang Bo
9df1d0e002 rust-agent: Set BUILDTYPE to debug.
Since build with --release produces corrupted binary in ci, we removed
--release. However, the make install target cannot find the binary,
set BUILDTYPE to debug

Fixes: #67

Signed-off-by: Yang Bo <bo@hyper.sh>
2019-11-01 17:17:38 +08:00
Peng Tao
254b85aec1
Merge pull request #2092 from lifupan/fixmissingwatchconsole
virtcontainers: fix the issue of missing watchConsole
2019-11-01 09:47:11 +08:00
Eric Ernst
5f6e642bb7
Merge pull request #377 from egernst/1.10.0-alpha0-branch-bump
# Kata Containers 1.10.0-alpha0
2019-10-31 15:41:13 -07:00
Julio Montes
27c7773693 snap: reimplement image part
in order to make launchpad happy again, next changes are required:
* Install podman and cni plugings
* Use podman to build the rootfs or initrd image
* Depending on the architecture, build rootfs or initrd image

fixes #678

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-31 20:55:28 +00:00
Eric Ernst
0a35f504ab release: Kata Containers 1.10.0-alpha0
- sandbox/cgroups: don't constrain if using SandboxCgroupsOnly
- cli: add kata-overhead subcommand
- versions: support specify version in versions.yaml for rust agent.
- virtcontainers/sandbox: calculate container's CPU from sandbox.contai…
- ci: Fix versions_checker.sh
- ci: Fix versions_checker.sh
- virtcontainers: unmount host mounts if container can't be created
- virtcontainers/store: make VCStoreUUIDPath rootless
- virtcontainers/annotations: use right domain name for kata annotations
- v2: Change the event and error behavior of pause/resume
- Update cni plugin version
- Load state early so that hypervisor can store the correct state

e4c816b versions: support specify version in versions.yaml for rust agent.
691a6a7 sandbox/cgroups: don't constrain if using SandboxCgroupsOnly
7fe0100 cli: add kata-overhead command
1bbc1d5 virtcontainers: add StatsSandbox to vc API
569bd78 virtcontainers: change pass by value to pass by reference
5b226d0 ci: Fix versions_checker.sh
f8b84d7 ci: Fix versions_checker.sh
24d7aff virtcontainers: change pass by value to pass by reference
abec17f virtcontainers/store: make VCStoreUUIDPath rootless
eca7bd2 virtcontainers: unmount host mounts if container can't be created
91bd095 virtcontainers/annotations: use right domain name for kata annotations
c1060a3 v2: Change the event and error behavior of pause/resume
f6a10bc state: Refactor code to move all the state load code
fa4acad state: Load the state from storage early on
929c4e7 network: Change NewNS() call
c0995c6 vendor: Vendor the latest CNI plugins
86d8346 version: Update the version for cni plugins

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-31 12:58:45 -07:00
Eric Ernst
cf16562429 release: Kata Containers 1.10.0-alpha0
- release: Fix typos and organization issues
- kata-deploy: fix qemu-virtiofs entry on crio configuration
- Add actions release automation
- tags: Tag all repos with the same kata VERSION
- kata-deploy: Add qemu-virtiofs to containerd configuration
- release: Fixing message information
- kata-deploy: Add qemu-virtiofs wrapper
- doc: Fixes for release.md
- deploy: Skip installing nemu

84e004e kata-deploy: fix qemu-virtiofs entry on crio configuration
d56dec0 release: Fix typos and organization issues
9a7d692 kata-deploy: Add a simple GitHub Action
4eb376b artifact-list: provide script to get items to build
4f89e97 kata-deploy: look for kata artifacts locally
dc8fe05 release: Allow functions to take release versions
6c8df7f release: Call kata-deploy-binaries.sh main only if it not sourced
5307b03 release: Define a default value for destdir
7a932cf release: Create tarballs after every stage
420eb6e qemu-virtiofs: Fix tar naming for qemu with virtiofs support
f2ef841 release: don't checkout packaging from packaging
643ddf9 release: Add option to generate versions based on tag
b8dcb1c tags: Tag all repos with the same kata VERSION
eea8cea kata-deploy: Fix indentation issues.
8234f9a kata-deploy: Add qemu-virtiofs to containerd configuration
aafd329 release: Fixing message information
dab8087 kata-deploy: Add qemu-virtiofs wrapper
7c26509 doc: Fixes for release.md
8eb5cf3 deploy: Skip installing nemu

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-31 12:58:30 -07:00
Eric Ernst
f2e4edc068 release: Kata Containers 1.10.0-alpha0
Version bump no changes

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-31 12:58:23 -07:00
Eric Ernst
764ba9f83d
Merge pull request #2153 from egernst/cgroup-fixups
sandbox/cgroups: don't constrain if using SandboxCgroupsOnly
2019-10-31 12:11:33 -07:00
Erich Cordoba
5c96a920bd agent: Remove get_key_value to enable building in stable rust.
The get_key_value method is currently only avaiable in nightly rust.
As only this feature is required it worth to refactor and enable building
in the stable channel.

The method was removed by first getting the value from the CGROUPS hashmap,
then key is get by iterating over all the keys. The checks for an empty key and
key == "devices" were moved out of the hashmap block.

The README.md was updated as well to detail the instructions for stable rust.

Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-10-31 12:25:34 -06:00
James O. D. Hunt
2787c545ac main: Split config code into separate module
Create a config module and add more tests. Also enable setting the log
level from the kernel command-line.

Fixes: #59, #63.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-10-31 15:07:49 +00:00
Julio Montes
43a5d147f1 snap: use adopt-info to set grade and version
adopt-info is a snapcraft feature that allows us to specify the snap grade and
version at runtime. Depending on the environment the master or the latest
stable branch can be used to build the Kata Containers snap, for the kata
CI and launchpad snap-master branch, the master branch are used, otherwise
the latest stable branch.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-31 14:48:49 +00:00
Eric Ernst
a19f07b017
Merge pull request #57 from yyyeerbo/wip
rust-agent: Land rust agent into kata-containers
2019-10-31 07:44:09 -07:00
Eric Ernst
1b05482680
Merge pull request #2097 from jcvenegas/overhead
cli: add kata-overhead subcommand
2019-10-31 07:39:36 -07:00
Salvador Fuentes
ad70bc3499
Merge pull request #2155 from yyyeerbo/wip
versions: support specify version in versions.yaml for rust agent.
2019-10-31 07:52:49 -06:00
Yang Bo
e4c816bebd versions: support specify version in versions.yaml for rust agent.
Fixes: #2154

Signed-off-by: Yang Bo <bo@hyper.sh>
2019-10-31 14:51:50 +08:00
Yang Bo
f8ced638d2 rust-agent: Land rust agent into kata-containers
Fixes: #56

Signed-off-by: Yang Bo <bo@hyper.sh>
2019-10-31 10:46:45 +08:00
Eric Ernst
691a6a7ac4 sandbox/cgroups: don't constrain if using SandboxCgroupsOnly
When SandboxCgroupsOnly is set, we are expected to just inherit our parent's
cgroup settings and to move all Kata threads within that sandbox cgroup. The
initial implementation still adjusted the size of this cgroup. This commit
fixes this.

This commit makes a couple of functional changes, small refactors, and
adds clarifying comments for some functions.

Fixes: #2090

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-30 19:16:30 -07:00
Jose Carlos Venegas Munoz
7fe0100444 cli: add kata-overhead command
Introduce kata-overhead command to kata-runtime CLI, to help
with calculating sandbox overhead.

Fixes: #2096

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-30 19:08:58 -07:00
Jose Carlos Venegas Munoz
1bbc1d58bd virtcontainers: add StatsSandbox to vc API
StatsSandbox is used to gather metrics for the sandbox (host cgroup) as
well as from the individual containers (from the guest cgroups). This is
intended to be used for easily calculating Kata sandbox overheads.

Fixes: #2096

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-30 19:07:23 -07:00
Wang Liang
569bd780f1 virtcontainers: change pass by value to pass by reference
container.config does not point to sandbox.config.Containers.ContainerConfig
which caused the ContainerConfig not sync.

Fixes: #2129

Signed-off-by: Wang Liang <wangliangzz@inspur.com>
2019-10-30 19:01:57 -07:00
Archana Shinde
62f64bb009 version: Update containerd version to 1.3.0
These include features like privileged containers without host devices
and support for per runtime annotations.

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

Fixes #2099

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-30 17:02:21 -07:00
James O. D. Hunt
6f95e3e1f3
Merge pull request #770 from chavafg/topic/release-notes
release: Fix typos and organization issues
2019-10-30 11:10:31 +00:00
Vijay Dhanraj
9d50cc1ff9 HV: Remove number of guest CPU configuration in ACRN
ACRN doesn't support configuring number of guest vcpu  option ('-c') anymore.
Number of guest vcpus will be defined in the hypervisor scenario
configuration file instead.

Removed the -c option from the acrn-dm parameters when launching VMs and
also trimmed configuration.toml file accordingly.

fixes #2136
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-10-29 23:27:15 -07:00
GabyCT
79173ce76b
Merge pull request #772 from chavafg/topic/fix-crio-qemu-cfg
kata-deploy: fix qemu-virtiofs entry on crio configuration
2019-10-29 16:40:47 -06:00
Salvador Fuentes
84e004e426 kata-deploy: fix qemu-virtiofs entry on crio configuration
Use correct key for the kata-qemu-virtiofs runtime class definition
in the crio configuration file.

Fixes: #771.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-29 10:44:23 -06:00