Commit Graph

5431 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
851db2708e
Merge pull request #575 from egernst/CLH-docs
arch: add virtualization specific document
2019-12-09 12:37:23 -06:00
katacontainersbot
abaa45068f release: Kata Containers 1.10.0-rc0
- versions: bump firecracker version
- clh: use http client
- rootless: Disable vhost-net for rootless
- compatoci: Add a SetLogger call
- virtiofs: stop sandbox when virtiofsd quits
- vc: Remove device when AddDevice encounters error
- kernel: update to 4.19.83
- Cloud Hypervisor: driver update number 2
- vc: Use map to represent ignoredMounts
- Fc comment
- vc: Check return value from os.MkdirAll in virtiofsdArgs
- vc: Drop Sandbox#Pause and Sandbox#Resume
- vc: Use map built-in accessor to find container in Sandbox#GetContainer
- Makefile: fix suspicious line
- k8s: fix wrong number cpus after killing a container
- vc: Utilize map for newMounts to speed up replaceOCIMountSource
- vc: Sandbox#getAndSetSandboxBlockIndex shouldn't alter BlockIndex in case of error
- virtcontainers: rename GetOCISpec to GetPatchedOCISpec
- tracing: Unbreak tracing test
- fc.go: Set firecracker log level to debug if hypervisor.enable_debug …
- virtcontainers: honour ContainerConfig struct comment and don't save OCI spec
- virtcontainers: improve algorithm to find containers
- Merge #3 of kata-containers/runtime
- FC: extract error info from firecracker built-in log and metrics scheme
- gitignore: include cloud hypervisor configuration toml
- Respect containerd's debug config
- Clh driver: removed hard-coded vsock contextid (cid)
- vc: Persist file handle may leak in FS#ToDisk
- vc: Clean up directories in case MkdirAll fails
- vc: Restore sandbox state when there is error starting containers
- vc: Persist file handle may leak in FS#FromDisk
- sync fork after merge clh driver #1

810c2c9 versions: bump firecracker version
0afeb52 clh: clh http  unit test
42061f6 clh: cleanup VM dir
c688a15 version: CH bump to master
9f15dd2 clh: remove cli builder
f73723a clh: use http client
0babd38 rootless: Disable vhost-net for rootless
6010218 clh: Implement check()
a10da3e vendor: update openapi deps
1836226 clh: generate client code
dcac021 clh: Add Generation tools for API client
abbb536 virtiofs: stop sandbox when virtiofsd quits
9c0872d vc: Remove device when AddDevice encounters error
67f203f compatoci: Add a SetLogger call
bec46bb vc: Use map to represent ignoredMounts
628799a vc: Check return value from os.MkdirAll in virtiofsdArgs
9dd3f13 Makefile: Move the .git-commit: rule block to below the all: rule
7bcce3d Makefile: do not use tabs in if/else blocks
38224e8 vc: Use map built-in accessor to find container in Sandbox#GetContainer
544730b vc: Drop Sandbox#Pause and Sandbox#Resume
d4be097 Makefile: fix suspicious line
e8cc87b clh: basic/unit tests for clh driver
0697124 fc: update comments for startSandbox
3ef8f6c clh: fixes erroneous killing of virtiofsd
6af127f clh: improve driver logging for failed hypervisor
c58e6f9 kernel: update to 4.19.86
b7731e9 virtcontainers: don't consider non-running container resources
43f0513 virtcontainers: update resources after adding container to sandbox
613fd0f virtcontainers: rename GetOCISpec to GetPatchedOCISpec
330cc72 tracing: Unbreak tracing test
191ee63 fc.go: Set fc log level to debug if hypervisor.enable_debug is true
336edf7 virtcontainers: honour ContainerConfig struct comment and not save Spec
7f67b9f virtcontainers: improve algorithm to find containers
0ac4355 gitignore: include cloud hypervisor configuration toml
1abe52a clh: removed hard-coded vsock contextid (cid)
c833ac2 vc: BlockIndex should not be altered in case of error
b8b6733 vc: Persist file handle may leak in FS#ToDisk
03478d4 vc: Clean up directories in case MkdirAll fails
51d7c23 shim: Respect containerd's debug config
93a0336 vc: Restore sandbox state when there is error starting containers
2331e87 vc: Persist file handle may leak in FS#FromDisk
9a4ee4f vc: Utilize map for newMounts to speed up replaceOCIMountSource
daae1db log: extract error info from firecracker built-in log and metrics scheme

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-12-09 17:18:29 +00:00
katacontainersbot
c334d3b8d8 release: Kata Containers 1.10.0-rc0
- release: Fix bug in how version is determined for actions
- kata-deploy: improve debug message, longer cleanup timeout
- v4.19.86: patch update for v4.19.86 on AArch64
- kata-deploy: add k3s support
- ci: Add obs testing for packaging
- kernel: Fix that the help is not printed twice
- obs: Check for broken packages
- kata-deploy: Increase the wait timeout for control plane to come up
- obs: Failed when we have unresolvable packages
- obs: Add fakeroot dependency for ubuntu 19.04

ff20f20 release: Checkout right version of kernel patches
9377c5d release: Fix bug in how version is determined for actions
168709c v4.19.86: patch update for v4.19.86 on AArch64
bbcffc3 kata-deploy: improve debug message, longer cleanup timeout
34ce361 ci: Add obs testing for packaging
0d84085 kernel: Fix that the help is not printed twice
e9bb8e5 kata-deploy: Increase the wait timeout for control plane to come up
37bce87 obs: Check for broken packages
9e716ae kata-deploy: add k3s support
380bd92 kata-deploy: reorganize files to support kustomize
0b9b722 obs: Add fakeroot dependency for ubuntu 19.04
5956065 obs: Failed when we have unresolvable packages

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-12-09 17:18:13 +00:00
katacontainersbot
640fee2e2a release: Kata Containers 1.10.0-rc0
- make: use `cd` instead of '--directory' option of `cpio`

38d0be3 make: use `cd` instead of '--directory' option of `cpio`

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-12-09 17:18:03 +00:00
Eric Ernst
5baacae0ff
Merge pull request #2335 from bergwolf/fc
versions: bump firecracker version
2019-12-09 09:04:15 -08:00
Peng Tao
810c2c93d6 versions: bump firecracker version
To include the latest fix for CVE-2019-18960.

Fixes: #2334
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-09 07:33:41 -08:00
Eric Ernst
a660d802ad
Merge pull request #2275 from jcvenegas/ch-api-support
clh: use http client
2019-12-06 17:23:20 -08:00
Eric Ernst
952c98da81 arch: add virtualization specific document
Improve our virtualization documentation, as well as introduce
the Cloud Hypervisor VMM. This creates a virtualization specific
document, and references this from the primary architecture document.

We are still limited on ACRN documentation: this should be augmented
in a follow on PR.

The PNGs included were grabbed from https://docs.google.com/presentation/d/1ZJg3w3O6F_j3ucQhdbBdj2hZUwg7L7qF347xC07L2_w

Fixes: #567

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-12-06 16:37:01 -08:00
Jose Carlos Venegas Munoz
0afeb527ff clh: clh http unit test
Add initial unit test around http client

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-06 21:26:26 +00:00
Jose Carlos Venegas Munoz
42061f6c39 clh: cleanup VM dir
remove dirtory created for VM. This should be refactored in all
hypervisors

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-06 21:26:26 +00:00
Jose Carlos Venegas Munoz
c688a1504c version: CH bump to master
test with recent API changes of CH.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-06 21:26:26 +00:00
Jose Carlos Venegas Munoz
9f15dd2da3 clh: remove cli builder
Remove cli builder code as now that we use http client

Signed-off-by: Bo Chen <chen.bo@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-06 21:26:26 +00:00
Jose Carlos Venegas Munoz
f73723a23f clh: use http client
Instead of build a command, use Cloud Hypervisor http API.

Fixes: #2165

Signed-off-by: Bo Chen <chen.bo@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-06 21:26:26 +00:00
Erich Cordoba
92301a6382 agent: Add unit tests for sandbox.rs
These are the unit tests for the sandbox struct. This is the summary
of the most important changes:

  - To test containers it was needed to create a `LinuxContainer` type
    and this requires root privileges. So, some tests now requires root
    user to be run.
  - There was a bug in the `unset_sandbox_storage` method. The return
    type was wrapped in a `Result` to avoid this problem.

Fixes: #50

Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-12-06 13:11:07 -06:00
Jose Carlos Venegas Munoz
ab2088f7d5 makefile: honor virtiofs config for default config
Fix config used when qemu-virtiofs is set as default.

Fixes: #2327

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-06 06:26:31 +00:00
Ted Yu
9a15457064 vc: Check error return from storeState
Fixes #2324

This achieves parity with the check on line 293.

Signed-off-by: Ted Yu yuzhihong@gmail.com
2019-12-05 18:55:57 -08:00
Jose Carlos Venegas Munoz
dc05d7dbbf
Merge pull request #2322 from amshinde/disable-vhost-net-for-rootless
rootless: Disable vhost-net for rootless
2019-12-05 17:39:35 -06:00
Archana Shinde
0babd38de0 rootless: Disable vhost-net for rootless
Since the /dev/vhost-net device is owned by root, we cannot used
vhost-net networking in rootless mode. Instead of having to
do this manually in the toml, disable vhost-net when the runtime
detects it is running rootless.

Fixes #2321

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-12-05 13:22:57 -08:00
Jose Carlos Venegas Munoz
60102188cd clh: Implement check()
Implement check hypervisor interface method, using VmmPing

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-05 20:03:09 +00:00
Jose Carlos Venegas Munoz
a10da3efbf vendor: update openapi deps
dep ensure to update new deps from openapi client

golang.org/x/oauth2

Signed-off-by: Bo Chen <chen.bo@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-05 15:36:26 +00:00
Jose Carlos Venegas Munoz
183622652a clh: generate client code
Generated using OpenAPITools/openapi-generator.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-05 15:36:26 +00:00
Jose Carlos Venegas Munoz
dcac021637 clh: Add Generation tools for API client
cloud-hypervisor provides an API server to send commands
in a qmp and Firecracker style over an Unix socket.

The API is defined via OpenAPI, this commit adds
scripts to help to generate a client using:

https://github.com/OpenAPITools/openapi-generator

This will make easy to update any change related with the API
in the future.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-05 15:36:26 +00:00
Peng Tao
00ff99bcb6
Merge pull request #2306 from jodh-intel/fix-compatoci-logger
compatoci: Add a SetLogger call
2019-12-05 13:57:38 +08:00
Fupan Li
e025ba7d08
Merge pull request #99 from jiangliu/v2
Fix bug #98 and improve code readability
2019-12-05 10:01:29 +08:00
Fupan Li
84e4d68b13
Merge pull request #2316 from eryugey/dev
virtiofs: stop sandbox when virtiofsd quits
2019-12-05 09:06:44 +08:00
Eric Ernst
e3ba17123a
Merge pull request #2296 from tedyu/rm-dev-when-err
vc: Remove device when AddDevice encounters error
2019-12-04 14:23:49 -08:00
Eric Ernst
62d9bf2ed0
Merge pull request #832 from amshinde/fix-version-bug-GH
release: Fix bug in how version is determined for actions
2019-12-04 10:10:20 -08:00
Salvador Fuentes
df7982b95f
Merge pull request #385 from shiloong/master
make: use `cd` instead of '--directory' option of `cpio`
2019-12-04 06:34:59 -06:00
Eryu Guan
abbb536cc4 virtiofs: stop sandbox when virtiofsd quits
Commit 89e0dfae11 ("qemu: stop qemu process when virtiofsd quits")
stops sandbox when virtiofsd quits so that virtiofs mount inside guest
won't hang. But commit d5a3d0a61c ("virtiofs: use virtiofsd
--fd=FDNUM") deleted this monitor logic.

Add the Scanner back to monitor virtiofsd's stderr and stop sandbox if
Scanner returns error.

Note that we don't monitor the virtiofsd process itself is because
virtiofsd may be live-upgraded (when available) and the original
process may quit, but virtiofs service is still running.

Fixes: #2315
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2019-12-04 19:54:41 +08:00
James O. D. Hunt
e2aff807ff
Merge pull request #847 from egernst/cleanup-timeout
kata-deploy: improve debug message, longer cleanup timeout
2019-12-04 09:05:29 +00:00
Penny Zheng
8f6d0ab165 FC: introduce --config-file to replace API configure request
New command-line parameter for firecracker v0.19.0, named `--config-file`,
which represents the path to a file that contains a JSON which can be
used for configuring and starting a microVM without sending any API
requests.

Fixes: #2199

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-12-03 23:46:29 -08:00
Penny Zheng
f2d8d715d3 FC: func checkVersion should be more independent
func checkVersion could be called anywhere, not always after
DescribeInstance `\` API request, so it should be more independent.
We could also get version number from `firecracker --version` command.

Fixes: #2199

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-12-03 23:46:24 -08:00
Penny Zheng
9ce2113535 FC: remove API Ready state
Since we decide to adopt config file to configure, we could bypass
API Ready state.
Here, we also create a new config ready state: `cfReady`, to represent
configuration part is done.

Fixes: #2199

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-12-03 23:46:19 -08:00
Archana Shinde
ff20f2008b release: Checkout right version of kernel patches
Checkout tag for packaging repo based on env variable NEW_VERSION
or kata_version with kata_version taking precedence.
With this, we checkout to the right version of packaging repo before
applying kernel patches.

Fixes #849

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-12-03 18:08:08 -08:00
Archana Shinde
9377c5d5ca release: Fix bug in how version is determined for actions
Althought, we changed the script "gen_versions_txt.sh" to accept a tag
rather than a branch, this change is not sufficient.
This script generates the right version file based on a tag, but
function `get_from_kata_deps` does not use this, and ends up using the
master branch instead. This is because this function looks at an env
variable called $BRANCH and ends up using master branch if the variable
is not defined.

Pass the tag/new version to the build scripts, so that this tag is
passed along to `get_from_kata_dep`.
With this change, the correct version information is consumed by the
build scripts for the various hypervisors and kernel.

Fixes #831

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-12-03 17:56:03 -08:00
Shile Zhang
38d0be3824 make: use cd instead of '--directory' option of cpio
Due to the option '--directory' just added from 'cpio' v2.12, so the
osbuilder will failed with old version 'cpio' before v2.12, such as in
Centos 7 with v2.11.
Fix it by replacing this option with '(cd ...; cat ...)'.

Fixes: #384

Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
2019-12-04 09:27:07 +08:00
Julio Montes
62f4536d46
Merge pull request #807 from Pennyzct/update_on_4.19.83
v4.19.86: patch update for v4.19.86 on AArch64
2019-12-03 17:14:28 -06:00
Penny Zheng
168709ca62 v4.19.86: patch update for v4.19.86 on AArch64
we need to do patch update for kernel bump to v4.19.86.

Fixes: #806
Depends-on: github.com/kata-containers/runtime#2185

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-12-03 13:29:05 -08:00
Eric Ernst
bbcffc32b5 kata-deploy: improve debug message, longer cleanup timeout
I am seeing tests fail at times waiting for label cleanup. Let's improve
the error message when this fails, and give the control plane a bit more
time, to improve stability of this test.

Fixes: #846

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-12-03 12:07:09 -08:00
Eric Ernst
6318f0a40b
Merge pull request #823 from wilsonianb/k3s
kata-deploy: add k3s support
2019-12-03 12:01:28 -08:00
GabyCT
07195c1eee
Merge pull request #836 from GabyCT/topic/addtests
ci: Add obs testing for packaging
2019-12-03 13:10:22 -06:00
Jose Carlos Venegas Munoz
62cd08044d
Merge pull request #2185 from egernst/kernel-bump
kernel: update to 4.19.83
2019-12-03 12:53:18 -06:00
GabyCT
ce32fb8689
Merge pull request #838 from GabyCT/topic/fixhelp
kernel: Fix that the help is not printed twice
2019-12-03 12:08:43 -06:00
Gabriela Cervantes
34ce361a40 ci: Add obs testing for packaging
This will test that is possible to install the obs packages in different
distributions.

Fixes #621

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-12-03 11:27:28 -06:00
Salvador Fuentes
8e23f2c114
Merge pull request #837 from GabyCT/topic/addbroken
obs: Check for broken packages
2019-12-03 11:23:48 -06:00
Gabriela Cervantes
0d840850ae kernel: Fix that the help is not printed twice
While running the build-kernel.sh script with no arguments, the help is
printed twice. This PR will fix that.

Fixes #433

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-12-03 10:12:38 -06:00
GabyCT
2462241c7a
Merge pull request #840 from amshinde/increase-aks-timeout
kata-deploy: Increase the wait timeout for control plane to come up
2019-12-03 09:48:46 -06:00
Ted Yu
9c0872dc7e vc: Remove device when AddDevice encounters error
Fixes #2295

Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2019-12-03 06:07:11 -08:00
Jianyong Wu
cc25216b11 virtiofs: add default value for virtioFsCache type.
If no virtioFsCache type set in configuration file, virtiofsd will
not starts, which makes kata-container start fail if virtio-fs
as its shared file system.

Fixes: #2279
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2019-12-03 14:01:29 +08:00
Archana Shinde
e9bb8e58ff kata-deploy: Increase the wait timeout for control plane to come up
Recent runs of setting up aks with github workflows shows that a timeout
of 5m is not always sufficent fot aks control plane to come up.
Increase this from 5m to 10m.

Fixes #839

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-12-02 13:38:11 -08:00