Commit Graph

5012 Commits

Author SHA1 Message Date
Yang Bo
6d61ab439c
Merge pull request #176 from lifupan/fix_hostname
sandbox: fix the issue of missing setting hostname
2020-04-01 10:00:31 +08:00
fupan.lfp
986e666b0b sandbox: fix the issue of missing setting hostname
When setup the persisten uts namespace, it's should
set the hostname for this ns.

Fixes: #175

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-03-31 17:22:24 +08:00
fupan.lfp
7d9bdf7b01 grpc: Fix the issue passing wrong exec_id to exec process
This issue was brought accidently by PR #174, fix this issue.

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-03-31 17:19:40 +08:00
Jose Carlos Venegas Munoz
705713b4f9
Merge pull request #2571 from jcvenegas/caps-clh
clh:  Implment capabilities
2020-03-30 16:33:42 -06:00
Jose Carlos Venegas Munoz
9fd7189388
Merge pull request #2536 from openSUSE/golang-update
Update go to v1.13.8
2020-03-30 12:12:41 -06:00
Julio Montes
e2d346c61d
Merge pull request #2566 from jcvenegas/fix-2565
Makefile: Allow change default hypervisor via env var
2020-03-30 07:30:49 -06:00
James O. D. Hunt
90b9d82ce3
Merge pull request #621 from GabyCT/topic/updateslesdoc
docs: Update SLES installation guide
2020-03-30 10:33:08 +01:00
James O. D. Hunt
c948d8a802
Merge pull request #174 from lifupan/unify_log
unify the rustjail's log to contain container id and exec id
2020-03-30 10:02:39 +01:00
James O. D. Hunt
891b61c993
Merge pull request #405 from justin-he/boundary_mb
image_builder: Reduce the boundary mb for reducing image size on arm64
2020-03-30 09:57:06 +01:00
James O. D. Hunt
0312a60287
Merge pull request #423 from crobinso/initrd-nonroot
initrd-builder: Don't error if run as non-root
2020-03-30 09:56:38 +01:00
James O. D. Hunt
7cb647a78b
Merge pull request #439 from alicefr/skip-rust-s390x
s390x: Skip rust for s390x
2020-03-30 09:54:47 +01:00
Julio Montes
b4ecfdb2dc
Merge pull request #990 from devimc/topic/scripts/qemu5
scripts: update configuration script to support QEMU 5.0
2020-03-27 13:50:35 -06:00
Jose Carlos Venegas Munoz
e525003e96
Merge pull request #2552 from likebreath/warn_only_resizeCPU
clh: Report warning when requested vCPUs exceeds maxVCPU allowed
2020-03-27 13:01:48 -06:00
Julio Montes
0fd7873a98
Merge pull request #623 from Jimmy-Xu/update-use-case-nvidia
use-cases: Update documentation for using Nvidia GPU with Kata
2020-03-27 07:00:50 -06:00
fupan.lfp
9220fb8e0c rustjail: unify the rustjail's log to contain container id and exec id
Add the container id and exec id to start container's log
which would make it clearly to check the log.

Fixes: #173

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-03-27 20:10:50 +08:00
Alice Frosi
2ac3090c20 s390x: Skip rust for s390x
Need to verify that rust deps are available on s390x

Fixes #438

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2020-03-27 10:01:54 +01:00
Jose Carlos Venegas Munoz
39e354f609 clh: Implement capabilities
Make explicit that sharedfs is supported.

Other features are not supported today.

Fixes: #2567

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-27 06:14:20 +00:00
Jose Carlos Venegas Munoz
0a1ffc1d97 types: Make FS sharing disable by default
All the other caps are inverted (not supported by default).

Make fs sharing not supported by default and let hypervisors
expose if it supports it.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-27 06:14:20 +00:00
Jimmy Xu
21743269b0 use-cases: Update documentation for using Nvidia GPU with Kata
When running docker with Nvidia GPU, the option --cap-add=ALL is required.

Fixes: #622

Signed-off-by: Jimmy Xu <jungming.xjm@antfin.com>
2020-03-27 12:38:10 +08:00
Bo Chen
669b6e32a5 clh: Report warning when requested vCPUs exceeds maxVCPU allowed
To have a consistent behavior of CPU hotplug with qemu in clh, we should
only report warning instead of errors when the requested vCPUs exceeds
the maximum number of vCPUs allowed.

Fixes: #2551

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-03-26 19:36:09 -07:00
Jose Carlos Venegas Munoz
2a19de8aa9
Merge pull request #2556 from jcvenegas/mem-hotplug-clh-v2
clh: Enable memory hotplug
2020-03-26 15:48:19 -06:00
Julio Montes
fb42e38978 scripts: update configuration script to support QEMU 5.0
Update configure-hypervisor.sh to support QEMU 5.0.

fixes #989

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-26 21:43:27 +00:00
Jose Carlos Venegas Munoz
7997218ced Makefile: Allow change default hypervisor via env var
- Add support to change default hypervisor via env variable.

- Show in the summary the default hypervisor to be used.

```
export DEFAULT_HYPEVISOR=cloud-hypervisor
make
sudo -E make install
```

Fixes: #2565

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-26 20:59:38 +00:00
Julio Montes
4fe62ade7f
Merge pull request #2543 from devimc/topic/virtcontainers/fixQ35vfioHotplug
virtcontainers: check PCI resource format before using it
2020-03-26 14:29:26 -06:00
Jose Carlos Venegas Munoz
11c998b6c7
Merge pull request #2515 from devimc/topic/pmem-CSI
Support persistent memory volumes
2020-03-26 11:57:17 -06:00
GabyCT
c9540ce641
Merge pull request #984 from GabyCT/topic/updatesles
obs: Update SLES version for packaging
2020-03-26 11:15:44 -06:00
GabyCT
36e7d3d13e
Merge pull request #988 from jongwu/printk
config: enable printk-time for kernel-5.4 for arm64
2020-03-26 09:43:28 -06:00
Graham Whaley
92b2ff723c
Merge pull request #2563 from chavafg/topic/update-containerd-version
versions: Update containerd commit
2020-03-26 09:33:24 +00:00
Jose Carlos Venegas Munoz
aab82f6745 clh: Add memory hotplug
Request memory to resize memory to hypervisor.

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

Fixes: #2526

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-26 04:31:21 +00:00
Salvador Fuentes
e62a8aa98e versions: Update containerd commit
We currently use containerd v1.3.0, but this version has an
issue when running the containerd/cri tests with go 1.13.
This commit: 3a4acfbc99aa976849f51a8edd4af20ead51d8d7 from
branch release/1.3 contains the fix to be able to run the
tests with go 1.13.

Depends-on: github.com/kata-containers/tests#2415
Fixes: #2562.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-03-25 18:10:52 -06:00
Gabriela Cervantes
9bdc51c982 obs: Update SLES version for packaging
Currently for our CI, we have SLES 15 SP1, this PR updates the current obs
version to match with our current testing.

Fixes #983

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-03-25 14:32:04 -06:00
Salvador Fuentes
5fe076ac8b
Merge pull request #972 from grahamwhaley/20200306_silence_actions
actions: change trigger phrase for kata-deploy action
2020-03-25 12:06:01 -06:00
Gabriela Cervantes
13b7ccf921 docs: Update SLES installation guide
We need to update the SLES installation guide, as we have obs packages
for SLES 12 SP4 and not for SLES 12 SP3.

Fixes #620

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-03-25 10:54:03 -06:00
Julio Montes
c4dc530708
Merge pull request #618 from cmaf/update-howto-crioconf
howto: Update deprecated CRI-O conf option
2020-03-25 08:54:03 -06:00
Jianyong Wu
32986dbb10 config: enable printk-time for kernel-5.4 for arm64
Open PRINTK_TIME in arm64_kata_kvm_5.4.x to let kernel print timestamp
correctly.

Fixes: #987
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2020-03-25 17:29:19 +08:00
Jose Carlos Venegas Munoz
2f948738e4 clh: Use MemUnit to create VM
Provide memory in bytes using the new memory unit abstraction.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-25 04:32:03 +00:00
Jose Carlos Venegas Munoz
b6a7d8d63a utils: Add memory unit abstraction
Add MemUnit to help to manage memory, this will handle memory
units internally and provide proper methods to convert to different
units.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-25 04:32:03 +00:00
Jose Carlos Venegas Munoz
5e7d253859 clh: add vmInfo method
API VMInfo call is done more than one time. This leads to have
similar code in multiple times, create context, defer, do call.

Move the logic to one function.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-25 04:32:03 +00:00
Jose Carlos Venegas Munoz
ebb8fd576b versions: Update clh to latest master
Use latest master to enable memory hotplug.

Changes:

c1e6d00 ci: Add memory resizing use case to vhost-user tests
890582b ci: Factorize kernel command line
4de2584 ci: Fix mmio tests with direct kernel boot
f268246 ci: Factorize integration tests booting from vhost-user-blk
5a5b3cf ci: Factorize vhost-user-blk integration tests
dd8debf ci: Run vhost-user-blk tests for mmio builds
0c9c72c ci: Unify vhost-user-blk integration tests
c95851f ci: Run vhost-user-net tests for mmio transport
68293fc ci: Factorize vhost-user-net one step further
d75e745 vm-virtio: vhost-user: Send memory update to the backend
7ff82af vm-virtio: vhost-user: Factorize SET_MEM_TABLE setup
e54f8ec vmm: Update memory through DeviceManager
bc874a9 vm-virtio: Add update_memory() to VirtioDevice trait
93becca build(deps): bump backtrace from 0.3.45 to 0.3.46
feb8d7a vmm: Separate seccomp filters between VMM and API threads
5120c27 main: Add seccomp support
f1a23d7 vmm: api: Add seccomp to the HTTP API thread
db62cb3 vmm: Add seccomp filter to the VMM thread
cb98d90 vmm: Create new seccomp_filter module
708f02d vmm: Pull seccomp crate from Firecracker
18fbd30 vhost-user-fs: return correct result of fs_slave_io()
bbc385c devices: ioapic: Remove unused MsiMessage structure
2fc86ff dev_cli: Always pull the latest container image
4b462a5 Dockerfile: Add cpio and bsdtar to the container image
8acc15a build: Bump vm-memory and linux-loader dependencies
38ed560 build(deps): bump thiserror from 1.0.12 to 1.0.13
9f67de4 build(deps): bump proc-macro-hack from 0.5.12 to 0.5.14
ebab809 build(deps): bump thiserror from 1.0.11 to 1.0.12
c67e407 build(deps): bump syn from 1.0.16 to 1.0.17
bdcfe1e tests: Add "discard_writes" pmem test
7098602 tests: Make the test_virtio_pmem test use a temporary file
f7197e8 vmm: Add a "discard_writes=" to --pmem
d11a67b vmm: Use more generic MmapRegion constructor
7257e89 vmm: Add "readonly" parameter MemoryManager::create_userspace_mapping
03cb26c release: v0.6.0
3e9a39c github: Upload the ch-remote asset
c503118 vmm: fix a corrupted stack caused by get_win_size
0788600 build: Remove "pvh_boot" feature flag
477bc17 bin: Share VFIO device syntax between cloud-hypervisor and ch-remote
96be2db build(deps): bump serde_derive from 1.0.104 to 1.0.105
5a335fc build(deps): bump serde from 1.0.104 to 1.0.105
a31ffef openapi: Add hotplug_size for memory hotplug
87990f9 vmm: Add virtio-pci device to B/D/F hash table
fb185fa vmm: Always return PCI B/D/F from add_virtio_pci_device
462082c build(deps): bump arc-swap from 0.4.4 to 0.4.5
c821e96 vhost_user_fs: Implement support for FUSE_LSEEK
5aa9abc docs: Add document for vhost-user-net test with OVS/DPDK
6329219 vm-virtio: queue: Use a SeqCst fence on get_used_event
63eeed2 vm: Comment on the VM config update from memory hotplug
0895bcb build(deps): bump proc-macro-hack from 0.5.11 to 0.5.12
0541f5a build(deps): bump proc-macro-nested from 0.1.3 to 0.1.4
51f51ea build(deps): bump libc from 0.2.67 to 0.2.68
9cf67d1 arch: x86: Always set the bootloader type
ad35470 arch: x86: Extract common bootparams settings
28a5f9d vmm: acpi: Remove unused IORT related structures
5c1207c vhost-user-fs: handle FS_IO request
f61f78e build(deps): bump anyhow from 1.0.26 to 1.0.27
efb2447 pvh: Add integration test to validate PVH boot
da084fa pvh: Add unit tests for initial sregs and control registers
64941bf pvh: Add unit tests for start_info and memory map structures
9e247c4 pvh: Introduce "pvh_boot" feature
a22bc35 pvh: Write start_info structure to guest memory
840a9a9 pvh: Initialize vCPU regs/sregs for PVH boot
24f0e42 pvh: Introduce EntryPoint struct
98b9568 pvh: Add definitions for PVH boot protocol support
6e6ef83 build: Fix log dependency
291f1ce build(deps): bump linux-loader from `0c754f3` to `0ce5bfa`
07cc73b vhost_user_fs: add a flag to disable extended attributes
710520e vhost_user_fs: Process requests in parallel with a thread pool
90309b5 vm-virtio: queue: Add methods to switch a descriptor context
2294c2d Add .rustfmt.toml to the project
48c4885 vhost_user_fs: replace HandleData's File Mutex with RwLock
134e64c arch, qcow: Fix 1.42.0 clippy warnings
6ea85ca resources: Dockerfile: Update Rust toolchain
4579afa vmm: For --disk error if socket and path is specified
7e599b4 vmm: Make disk path optional
477d924 github: Build from a rust toolchain matrix
4f2469e main: Remove "--vhost-user-net"
8d785bb pci: Fix the PciBus using HashMap instead of Vec
04f2ccd build(deps): bump ryu from 1.0.2 to 1.0.3
02265bb build(deps): bump regex-syntax from 0.6.16 to 0.6.17
40b38a4 openapi: Make desired_ram int64 format
ca3b39c bin: Fix wrapping in help strings
ee1ba56 build: Use "wrap_help" feature for clap
3957d1e vhost_user_backend: call get_used_event from needs_notification
536323d vm-virtio: queue: hint that get_used_event should be inlined
401e1d2 vm-virtio: queue: fix a barrier comment at update_avail_event
e0bdfe8 vm-virtio: queue: add a missing memory barrier in get_used_event
df2570a resources: Simplify kernel config filename
9ab648b resources: Enable VIRTIO_MEM support
0339853 ci: Bump to kernel 5.6-rc4
abccf76 tests: Use ch-remote to add/remove devices in test_vfio
5c3ce9d tests: Extend ch-remote helper to support optional single argument
9a7d9c9 ch-remote: Support removing VFIO devices
0d53ba4 ch-remote: Support adding VFIO devices
babefbd main: Remove spurious second help line for "--device"
63c5d09 github: Trigger the build job on PRs
8cbb6d0 github: Replace Travis CI with github actions
efba48d vmm: Don't put a VFIO device behind the vIOMMU by default
34412c9 vmm: Add id option to VFIO hotplug
18dc916 vmm: Switch to the micro-http package
9023444 vmm: Add id field to --device through CLI
f4a956a vmm: Remove 32 bits MMIO range from correct address space
432eb5b vmm: Free PCI BARs when unplugging PCI device
f0dff8b vfio: pci: Remove KVM user memory region when cleaning up
34d1f43 vfio: pci: Implement free_bars() from the PciDevice trait
b8e1cf2 vm-allocator: Add new function to free 32 bits MMIO address space
f3dc245 pci: Extend PciDevice trait with new free_bars() method
911a2d6 tests: Use ch-remote to resize the VM
21160f7 ch-remote: Add "resize" command
bb2d04b ch-remote: Add support for sending a request body
bde4f73 ch-remote: Refactor HTTP response handling
6ed23bb build(deps): bump micro_http from `9bbde4f` to `6b3e5f0`
5edd812 build(deps): bump backtrace-sys from 0.1.33 to 0.1.34
f727714 ci: Add integration test for VFIO hot-unplug
b50cbe5 pci: Give PCI device ID back when removing a device
df71aae pci: Make the device ID allocation smarter
e514b12 vmm: Update VmConfig when removing VFIO device
81173bf vmm: Add id field to DeviceConfig structure
6cbdb9a vmm: api: Introduce new "remove-device" HTTP endpoint
991f3bb vmm: Remove VFIO device from everywhere it is referenced
6adebbc vmm: Detect when guest notifies about ejecting PCI device
0e21c32 devices: Add new method to remove all occurrences of a BusDevice
f8e2008 pci: Add a function to remove a PciDevice from the bus
08604ac vmm: Store PCI devices as Any devices from DeviceManager
0f99d3f vmm: Store VFIO device's name and its PCI b/d/f
13a61c4 build(deps): bump rand_chacha from 0.2.1 to 0.2.2
fcd605a build(deps): bump micro_http from `6d416af` to `9bbde4f`
30b6954 vm-virtio: Consume pause events to prevent infinite epoll_wait calls
16fd506 tests: Use new ch-remote for pause/resume integration test
ba8cd4d bin: Introduce "ch-remote" for controlling VMM
06cd31c build(deps): bump micro_http from `02def92` to `6d416af`
7e941c9 build(deps): bump linux-loader from `8cb7c66` to `0c754f3`

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-25 04:30:58 +00:00
Chelsea Mafrica
99e2d1397c howto: Update deprecated CRI-O conf option
CRI-O config option manage_network_ns_lifecycle is replaced with
manage_ns_lifecycle in 1.17, which determines whether we pin and remove
namespaces and manage their lifecycle. Update docs to reflect both.

Fixes #617

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2020-03-24 15:42:30 -07:00
Julio Montes
213f5dbaf5
Merge pull request #2550 from devimc/topic/virtcontainers/noVFIOInGuest
virtcontainers: Don't create vfio devices in the guest
2020-03-24 09:39:23 -06:00
Yang Bo
1e15465012
Merge pull request #167 from lifupan/refactor
Refactor the way of creating container process
2020-03-24 11:18:42 +08:00
GabyCT
39f6cb6862
Merge pull request #436 from fidencio/wip/force_osbuilder_mount_dir_to_be_in_slash_tmp
image_builder: Force mount_dir to be created in /tmp
2020-03-23 15:03:21 -06:00
Julio Montes
4d2574a723 virtcontainers: Don't create vfio devices in the guest
vfio devices hotplugged in the VM are expected to be handled by the kernel
driver in the guest, hence the char vfio devices shouldn't appear in the
container under /dev/vfio/.

fixes #2539

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-23 19:53:42 +00:00
Fabiano Fidêncio
9665563145 image_builder: Force mount_dir to be created in $TMPDIR
Immutable systems, as such Red Hat Core OS and Fedora Core OS, will not
allow mount_dir to be created in a location that's not read-write.

Let's ensure we use $TMPDIR (with /tmp as fallback) as base for mount_dir,
as it's a safe writable choice for any distro supported by kata.

Fixes: #437

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-03-23 17:35:38 +01:00
Julio Montes
3b53114ad1 virtcontainers: improve algorithm to check Large bar devices
Instead of iterate in a loop dividing bytes by 1024, use right shift
to convert Bytes to GBytes and check if that number is greater than 4G

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-23 16:21:39 +00:00
Julio Montes
7aff546655 virtcontainers: check PCI resource format before using it
Make sure the number of columns in the PCI resource file is greater
or equal to 2, since the first two columns are used to calculate
the PCI bar space.
Add unit test for `isLargeBarSpace()`.

fixes #2542

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-23 16:20:09 +00:00
Julio Montes
078da1a6de
Merge pull request #2533 from bergwolf/mounted
shimv2: move container rootfs mounted flag to container level
2020-03-23 09:34:38 -06:00
Graham Whaley
c028329755
Merge pull request #2505 from Pennyzct/update_FC_0.21.0
AArch64: officially enable firecracker v0.21.0 on AArch64
2020-03-23 10:03:19 +00:00
fupan.lfp
c1b6838e25 rustjail: refactoring the way of creating container process
In the previous implementation, create a container process
by forking the parent process as the container process,
and then at the forked child process do much more setting,
such as rootfs mounting, drop capabilities and so on, at
last exec the container entry cmd to switch into container
process.

But since the parent is a muti thread process, which would
cause a dead lock in the forked child. For example, if one
of the parent process's thread do some malloc operation, which
would take a mutex lock, and at the same time, the parent forked
a child process, since the mutex lock status would be inherited
by the child process but there's no chance to release the lock
in the child since the child process only has a single thread
which would meet a dead lock if it would do some malloc operation.

Thus, the new implementation would do exec directly after forked
and then do the setting in the exec process. Of course, this requred
a data communication between parent and child since the child cannot
depends on the shared memory by fork way.

Fixes: #166
Fixes: #133

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-03-23 17:12:10 +08:00