Commit Graph

2150 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Jose Carlos Venegas Munoz
d50eea66eb
Merge pull request #2274 from ericooper/ich-driver-002
Cloud Hypervisor: driver update number 2
2019-12-02 13:48:36 -06:00
Graham Whaley
1c27897ba2
Merge pull request #2300 from tedyu/map-ignored-mounts
vc: Use map to represent ignoredMounts
2019-12-02 16:41:48 +00:00
Eric Ernst
c384359209
Merge pull request #2278 from egernst/fc-comment
Fc comment
2019-12-02 07:53:27 -08:00
James O. D. Hunt
67f203f1b8 compatoci: Add a SetLogger call
Add a standard `SetLogger()` call to allow the `compatoci` package to be
provided a base logger which it can then customise.

Fixes: #2305.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-12-02 10:10:37 +00:00
James O. D. Hunt
fc9114dbdc
Merge pull request #2298 from tedyu/mkdir-all-ret
vc: Check return value from os.MkdirAll in virtiofsdArgs
2019-12-02 09:43:21 +00:00
Peng Tao
0a5315b1c6
Merge pull request #2283 from tedyu/rm-pause-resume
vc: Drop Sandbox#Pause and Sandbox#Resume
2019-12-02 13:19:15 +08:00
Peng Tao
450a646afd
Merge pull request #2290 from tedyu/get-container
vc: Use map built-in accessor to find container in Sandbox#GetContainer
2019-12-02 10:29:44 +08:00
Peng Tao
e49569a286
Merge pull request #2287 from devimc/topic/make/FixSuspiciousLine
Makefile: fix suspicious line
2019-12-02 10:29:20 +08:00
Ted Yu
bec46bb59b vc: Use map to represent ignoredMounts
We can use map from Source to Mount as ignoredMounts representation.
Inner loop in kataAgent#removeIgnoredOCIMount is removed.

Fixes #2299

Signed-off-by: Ted Yu yuzhihong@gmail.com
2019-11-30 12:36:27 -08:00
Ted Yu
628799a42f vc: Check return value from os.MkdirAll in virtiofsdArgs
Fixes #2297

Signed-off-by: Ted Yu yuzhihong@gmail.com
2019-11-30 08:43:23 -08:00
Julio Montes
9dd3f13a92 Makefile: Move the .git-commit: rule block to below the all: rule
the first rule defined becomes the default and the default rule should be all.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-11-29 15:39:43 +00:00
Julio Montes
7bcce3da63 Makefile: do not use tabs in if/else blocks
tabs should only appear in rules, not in ifeq/ifneq blocks
(since otherwise make can get very confused on error).

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-11-29 15:38:53 +00:00
Ted Yu
38224e8b7b vc: Use map built-in accessor to find container in Sandbox#GetContainer
Fixes #2289

Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2019-11-29 07:17:15 -08:00
Ted Yu
544730b4b1 vc: Drop Sandbox#Pause and Sandbox#Resume
Fixes #2276

Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2019-11-29 05:58:06 -08:00
Julio Montes
d4be097b71 Makefile: fix suspicious line
Emacs (the good and infalible text editor) detects a suspicious line in
Makefile, this line contains both space and tab (something that could be
introduced by a less sophisticated text editor) that is not correct
for a Makefile.

fixes #2286

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-11-29 13:49:35 +00:00
Johan Kuijpers
e8cc87b378 clh: basic/unit tests for clh driver
- added clh unit tests
- removed some inconsistencies in the cli builder to enable unit tests
- suppressed version check for in startSandbox to enable unit tests
- added clh related constants and methods to virtcontainer test
- small corrections after review applied

Fixes: #2205

Signed-off-by: Johan Kuijpers <johan.kuijpers@ericsson.com>
2019-11-28 10:27:37 +01:00
Eric Ernst
06971246ea fc: update comments for startSandbox
The comment didn't reflect what the function does. Updated accordingly.

Fixes: #2277

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-26 15:25:51 -08:00
Archana Shinde
d054556f60
Merge pull request #2251 from devimc/topic/k8s/fixWrongNumberCPUs
k8s: fix wrong number cpus after killing a container
2019-11-26 10:12:36 -08:00
Archana Shinde
cc3506403b
Merge pull request #2220 from tedyu/new-mount-map
vc: Utilize map for newMounts to speed up replaceOCIMountSource
2019-11-26 09:10:25 -08:00
Penny Zheng
837a0ee0ae cache-factory: set bridge info when creating vm
For now, we will encounter `failed to get available address from
bridges` error when launching kata containers from cache factory.
Although we've already passed bridges info to clients from cache factory
server, we still missed the setting part when creating vm.

Fixes: #2272

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-11-26 00:42:39 -08:00
Penny Zheng
3d8ffe4120 cache-factory: fix nil pointer runtime panic
For now, when we're using cache factory to launch kata containers,
we would encounter nil pointer runtime panic.

Fixes: #2272

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-11-26 00:42:12 -08:00
Johan Kuijpers
3ef8f6cf1b clh: fixes erroneous killing of virtiofsd
remove type in kill statement for virtiofsd

Fixes: #2270

Signed-off-by: Johan Kuijpers <johan.kuijpers@ericsson.com>
2019-11-26 09:12:13 +01:00
Johan Kuijpers
6af127f7f9 clh: improve driver logging for failed hypervisor
added logging of stdout and stderr for failed hypervisor

Fixes: #2271

Signed-off-by: Johan Kuijpers <johan.kuijpers@ericsson.com>
2019-11-26 09:08:11 +01:00
Eric Ernst
c58e6f973c kernel: update to 4.19.86
Fixes: #2193
Depends-on: github.com/kata-containers/packaging#807

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-25 14:10:11 -08:00