Commit Graph

2214 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
e9a852dd79 clh: update api calls for latest master
cpu api changed, update to latest API

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-13 16:44:50 +00:00
Jose Carlos Venegas Munoz
1a7539c1f5 clh: update client
update api based latest master.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-13 16:44:50 +00:00
Jose Carlos Venegas Munoz
553237884a versions: update clh to v0.4.0
Update to latest master code.

Changes:

fa0fdc6 cargo: Update Cargo.lock for the 0.4.0 release
cec884e release: v0.4.0
6444e29 docs: Add CPU hot plug documentation
a002093 build(deps): bump anyhow from 1.0.23 to 1.0.25
43f0478 build(deps): bump thiserror from 1.0.6 to 1.0.9
664431f vsock: vhost_user: vfio: Fix potential host memory overflow
1e97d14 README: Update for newer distribution support
e8e21ae README: Update the --cpus command line examples
a40a70a ci: Rely on latest virtiofsd version
f0b7412 vmm: device_manager: Add all virtio devices to the migratable list
37557c8 vmm: vm: Implement the Pausable trait
9756fc2 vmm: cpu_manager: Implement the Pausable trait
35dd152 vmm: device_manager: Implement the Pausable trait
a122da4 vm-virtio: vhost: Implement the Pausable trait for all vhost-user devices
dae0b2e vm-virtio: Implement the Pausable trait for all virtio devices
35d7721 vmm: Convert virtio devices to Arc<Mutex<T>>
5450de0 cargo: Do not run fmt on anyhow's build code
0361df4 vm-device: Initial Migratable trait
36daf9c ci: Skip testing RFC or WIP PRs
64c5e3d vmm: api: Adjust FsConfig for OpenAPI
4bfd51c vmm: api: Match VhostUserBlkConfig defaults between CLI and HTTP API
1c2587f vmm: api: Match VhostUserNetConfig defaults between CLI and HTTP API
5e0bbf9 vmm: Don't factorize vhost-user configurations
793327c vmm: api: Make ConsoleConfig default match between CLI and HTTP API
cc08c44 vmm: api: Make MemoryConfig default match between CLI and HTTP API
5a72225 vmm: api: Update CpuConfig name to match the internal name
f7c215d cli: Fix default CPU argument
59ae01f ci: Cancel older builders on Jenkins
c61104d vmm: Port to latest vmm-sys-util
4c92f89 ci: Add OpenAPI validation
93bd88e ci: Simplify travis.yml
d42ef18 ci: Offload cargo tests to the worker node VM
ee528ae vmm: api: Make FsConfig defaults match between CLI and HTTP API
befd342 vmm: api: Make NetConfig defaults match between CLI and HTTP API
eff78f7 resources: Prevent kernel config interactive shell from showing up
99e608c openapi: Fix schema
f994665 vmm: Reduce the minimum IRQ constant
ba59c62 vmm, devices: Remove hardcoded IRQ number for GED device
ce1bd9c resources: turn on CONFIG_ACPI_REDUCED_HARDWARE_ONLY
0374c3d build(deps): bump ssh2 from 0.5.0 to 0.6.0
aa94e9b Revert "vmm: api: Modify FsConfig to be OpenAPI friendly"
9b1ba14 vmm: Delegate device related ACPI DSDT table work to DeviceManager
60e6609 vmm: Delegate CPU related ACPI tables to CpuManager
defc5dc vmm: api: Modify FsConfig to be OpenAPI friendly
66e00ce ci: Extend VFIO integration test
59d0171 vmm: Remove kernel based IOAPIC handling from the device manager
afea6a1 vmm: Stop initialising kernel based IOAPIC/PIC
9b1cb96 vmm: Remove pin based interrupt setup for virtio devices
72fb687 vmm: Check for required capabilities
904b1ea build(deps): bump unicode-width from 0.1.6 to 0.1.7
fcf92d8 tests: Add rebooting to the CPU hotplug test
f98b16f vmm: Update the configuration to preserve hot-plug CPUs after reboot
1722708 vmm: Switch to storing VmConfig inside an Arc<Mutex<>>
c063bb8 vmm: acpi: Make GED interrupt edge triggered
e1af17d vmm: Restore tty to canonical mode when SIGTERM or SIGINT received
44d026b build(deps): bump serde_json from 1.0.43 to 1.0.44
a1285ea build(deps): bump cc from 1.0.47 to 1.0.48
23929f4 vfio: Don't override MSI Enable bit through VFIO ioctl
1dfd60b vfio: use correct flags to disable interrupts
5208ff8 vmm: Detect and handle AMD SME (Secure Memory Encryption)
dcfd6ff build(deps): bump serde_json from 1.0.42 to 1.0.43
08258d5 vfio: pci: Allow multiple devices to be passed through
4115fa8 vfio: pci: Update irqfd registration
1379abb pci: msi: Fix MSG_CTL update through 32 bits write
c81e808 docs: Update instructions regarding virtiofsd
17badfb vmm: cpu: Call vcpu configure() on the vCPU thread
1350306 api: Fix OpenAPI specification entries
e1ff142 tests: Remove MSI only test from test_serial_off
e083064 tests: Add integration test for hotplugging vCPUs
66a31c1 vmm: acpi: Upon GED interrupt notify on all vCPUs
48bf141 vmm: Trigger a hotplug device notification when resizing
b629727 vmm: acpi: Add a CTFY method to notify on all CPU objects
ae9359c vmm: acpi: Create the CPU entries in the DSDT for all vCPUs
791ca33 vmm: device_manager: Add ability to notify via GED device
623755c devices: Add ACPI GED device
7ad68d4 vmm: device_manager: Allocate I/O port for ACPI shutdown device
86339b4 vmm: Add HTTP API to resize the VM
e7d4eae vmm: cpu: Add support for starting more vCPU threads
0ef9999 vmm: cpu: Support only partially configuring the vCPU
c8b3041 vmm: openapi: Update OpenAPI for CpuConfig struct
b6801e3 vmm: cpu: Refactor vCPU thread starting
66d5163 vmm: cpu: Encapsulate vCPU state into its own struct
ea19bb0 tests: Add a test to check that the boot vs max cpus work
1bbe48b vmm: acpi: Mark non-boot vCPUs as disabled in the MADT table
4bc8635 tests: Use new "--cpus" syntax for integration tests
82bc07c vmm: Add boot and max vCPU handling to command line parser
7543e00 vmm: Use new CpuManager accessor to get boot vCPUs
df09078 vmm: cpu: Introduce concept of maximum vs boot vCPUs in CpuManager
669d9a8 vhost_user_backend: fix memory region offsetting
d378da6 build(deps): bump vcpkg from 0.2.7 to 0.2.8
b1cfdc7 build(deps): bump syn from 1.0.9 to 1.0.11
0f21781 cargo: Bump the kvm and vmm-sys-util crates

Fixes: #2343

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-13 16:43:56 +00:00
James O. D. Hunt
76f9b34b59
Merge pull request #2273 from Pennyzct/cache_server
cache-factory: a few bug fix
2019-12-13 09:08:21 +00:00
Peng Tao
6eae033f48 shimv2: cleanup container if not found
Shutdown API relies on it being cleaned up in order to proceed.
Otherwise it fails silently and shimv2 process never quits.

This can be triggered by killing the vmm while pod is running.

Fixes: #2345
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-11 06:06:11 -08:00
Fupan Li
d10adfdc03
Merge pull request #2200 from Pennyzct/fc_launch_on_config
FC: introduce `--config-file` to bypass API ready state
2019-12-11 16:30:55 +08:00
Peng Tao
743309cdc9 vc: stop container should change container state at last
Otherwise if we fail to stop it, container state is set as StateStopped.
And future force stop will just be ignored. Then when we force delete
the container, we are deleting it without actually cleaning up container
resources especially the host shared mounts, which would be removed by
agent cleanup code and we endup removing container volume contents
unexpectedly.

Fixes: #2345
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-12-10 22:16:56 -08:00
Salvador Fuentes
e3115e344e
Merge pull request #2342 from jcvenegas/clh-update-client-using-versions
clh: client: update acording to versions.yaml
2019-12-10 16:24:17 -06:00
Archana Shinde
810a528096
Merge pull request #2325 from tedyu/store-state-err
vc: Check error return from storeState
2019-12-10 13:24:44 -08:00
GabyCT
9ddf91d1f2
Merge pull request #2328 from jcvenegas/2327-fix
makefile: honor virtiofs config for default config
2019-12-10 14:21:18 -06:00
Jose Carlos Venegas Munoz
efb611aa65 clh: client: update acording to versions.yaml
Instead of point to master use the version defined
in versions.yaml

Fixes: #2341

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-12-10 19:53:37 +00:00
Julio Montes
d0e30ef11f
Merge pull request #2280 from jongwu/cache_mode
virtiofs: add default value for virtioFsCache type.
2019-12-10 08:14:19 -06:00
GabyCT
9049395de8
Merge pull request #2338 from katabuilder/1.10.0-rc0-branch-bump
# Kata Containers 1.10.0-rc0
2019-12-09 15:19:34 -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
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