Commit Graph

2077 Commits

Author SHA1 Message Date
GabyCT
bc15e44245
Merge pull request #1649 from mcastelino/topic/jail
Firecracker Add jailer support for firecracker
2019-07-12 12:05:16 -05:00
Ganesh Maharaj Mahalingam
d392b22ee4 virtiofs: Allow memory hotplug with virtiofs
Kata with virtio-fs fails to do memory hotplugging. This is caused by
the fact that hot plugged memory is always backed by
'memory-backend-ram' while virtio-fs expects it to be backed by file and
shared for it to be able to use the system the way it is intended. This
chnage allows using file based memory backend for virtio-fs, hugepages
or when the user prefers to use a file backed memory

Fixes: #1745
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-07-12 09:25:30 -07:00
Manohar Castelino
3bd4bb66fb
Merge pull request #1868 from ganeshmaharaj/revert-virtio-disable-modern
runtime: update govmm and move to virtio 1.0 for hotplugs
2019-07-12 09:07:37 -07:00
Ganesh Maharaj Mahalingam
050f8e9715 runtime: Disable disable-modern for virtio QMP add
History: the previous version of kvm (unknown) and qemu-lite had an
issue using virtio 1.0 version when it came to device hotplug, which led
to the team to disable 1.0 version of virtio for hotplug (set
disable-modern=on). Please check
e99f6b2931
for further info.

We have since moved to QEMU4.0 and probably a later version of kvm as
default across all distros. This change is to move to virtio 1.0 for
hotplugging devices.

Fixes: #1870
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-07-11 20:16:15 -07:00
Ganesh Maharaj Mahalingam
3e4989db42 vendor: update govmm and match code
update govmm to support virtiofs memory hotplug
Commits:
    0c900f5 Allow sharing of memory backend file
    f695ddf qemu: add migration incoming defer support
    f0f18dd qmp: add virtio-blk multiqueue
    7d3deea qemu: Add a virtio-blk-pci device driver support

Fixes: #1745
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-07-11 20:16:15 -07:00
Manohar Castelino
4fed346d53 Firecracker: Enable jailer by default
Add jailer support to configuration files.
Also enable jailer by default in Kata containers.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-07-11 21:32:45 +00:00
Manohar Castelino
78ea50c36c virtcontainers: Jailer: Add jailer support for firecracker
Firecracker provides a jailer to constrain the VMM. Use this
jailer to launch the firecracker VMM instead of launching it
directly from the kata-runtime.

The jailer will ensure that the firecracker VMM will run
in its own network and mount namespace. All assets required
by the VMM have to be present within these namespaces.
The assets need to be copied or bind mounted into the chroot
location setup by jailer in order for firecracker to access
these resouces. This includes files, device nodes and all
other assets.

Jailer automatically sets up the jail to have access to
kvm and vhost-vsock.

If a jailer is not available (i.e. not setup in the toml)
for a given hypervisor the runtime will act as the jailer.

Also enhance the hypervisor interface and unit tests to
include the network namespace. This allows the hypervisor
to choose how and where to lauch the VMM process, vs
virtcontainers directly launching the VMM process.

Fixes: #1129

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-07-11 21:32:36 +00:00
Archana Shinde
5e67e04666
Merge pull request #1779 from vijaydhanraj/ACRN-Runtime
HV: kata-runtime support for ACRN hypervisor
2019-07-11 09:42:19 -07:00
Vijay Dhanraj
98a69736c5 virtcontainers: Add ACRN unit test cases
This patch adds unit test cases for acrn specific changes.

Fixes: #1778
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-07-10 10:49:24 -07:00
Vijay Dhanraj
f246a799aa virtcontainers: Add support for updating virtio-blk based container rootfs
Thist patch adds the following,
1. ACRN only supports virtio-blk and so the rootfs for the VM
   sits at /dev/vda. So to get the container rootfs increment the
   globalIndex by 1.
2. ACRN doesn't hot-plug container rootfs (but uses blkrescan) to
   update the container rootfs. So the agent can be provided the virtpath
   rather than the PCIaddr avoiding unneccessary rescaning to find the
   virthpath.

v1->v2:
Removed the workaround of incrementing index for
virtio-blk device and addressed it acrn.

Fixes: #1778

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-07-10 10:49:24 -07:00
Vijay Dhanraj
d9a4157841 virtcontainers: Add support for launching/managing ACRN based VMs
This patch adds the following,
1. Implement Sandbox management APIs for ACRN.
2. Implement Sandbox operation APIs for ACRN.
3. Add support for hot-plugging virtio-blk based
(using blk rescan feature) container rootfs to ACRN.
4. Prime devices, image and kernel parameters for
launching VM using ACRN.

v2->v3:
Incrementing index to keep track of virtio-blk devices
created. This change removes the workaround introduced
in block.go.

v1->v2:
1. Created issue #1785 to address the UUID TODO item.
2. Removed dead code.
3. Fixed formatting of log messages.
4. Fixed year in copyright message.
5. Removed acrn_amd64.go file as there are no amd64 specific
   changes. Moved the code to acrn_arch_base.go.

Fixes: #1778

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-07-10 10:49:24 -07:00
Vijay Dhanraj
828e0a2205 pkg/katautils: Add support for ACRN hypervisor config
This patch adds support for,
1. Extracting and configuring ACRN hypervisor from toml.
2. Add ACRN hypervisor ctl for controlling ACRN hypervisor.
This will be used for updating virtio-blk based
container rootfs using blk rescan feature.

v2->v3:
Fixed acrnctl path.

v1->v2:
Trimmed hypervisor config options as needed by ACRN.

Fixes: #1778

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-07-10 10:49:24 -07:00
Vijay Dhanraj
adcac9368f kata-check: Check and validate type-1 hypervisor for kata
ACRN hypervisor is a type-1 hypervisor and this patch
adds support to check and validate if the system is
capable of running kata containers with ACRN hypervisor.

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

v3->v4:
Implemented a generic way to identify hypervisor and
test VM creation.

v2->v3:
1. Removed cgo structs and defined go structs.
2. Suppressed lint warnings due to unused createVM struct.

v1->v2:
1. Created an issue #1784 to address TODO item.
2. Fixed formatting of the log message.
3. Currently ACRN is only supported on amd64. So
   moved ACRN specific code to kata-check_amd64.go.

Fixes: #1778

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-07-10 10:47:31 -07:00
Vijay Dhanraj
4d26ceee79 Make: Add ACRN hypervisor and generate configuration file
This patch covers the following aspects,
1. Add ACRN as a supported hypervisor for amd64 architecture.
2. Build and install configuration file for ACRN hypervisor.

v1->v2:
1. Deleted autogenerated configuration-acrn.toml.
2. Trimmed configuration options not used by ACRN.

Fixes: #1778

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-07-10 10:46:47 -07:00
Salvador Fuentes
a4e6af0316
Merge pull request #1873 from openSUSE/crictl-openshift
versions: add crictl version which is compatible with OpenShift
2019-07-10 10:10:26 -05:00
Sascha Grunert
bdd89473fd
versions: add crictl version which is compatible with OpenShift
Fixes #1872

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-07-10 11:02:34 +02:00
GabyCT
e9bbe0b343
Merge pull request #1867 from openSUSE/crio-version
versions: update CRI-O to v1.14.6
2019-07-09 10:11:34 -05:00
Sascha Grunert
098501ac14
versions: update CRI-O to v1.14.6
- Changes:
  - version: v1.14.6
  - Add username and homedir to generated password
  - Close temporary image in PullImage
  - Version 1.14.6-dev
  - Version 1.14.5
  - version: if git commit is empty, silently ignore
  - enable inline exec and attach test
  - Bump up minMemoryLimit to 12Mb
  - Backport CircleCI config
  - Fix up machine os content version and cri-o version in spec
  - Add state of infracontainer to disk when stopped
  - Use GlobalAuthFile when pulling the pause image if
    PauseImageAuthFile is not set
  - Don't discard copy.Options.SourceCtx when credentials are provided
  - Don't set non-default copy.Options in imageService.PullImage if it is nil
  - Add global_auth_file option to crio.image config
  - Create network and plugins directory if they do not exist
  - Disable file locking by default
  - Update containers/image to v2.0.0, buildah to 1.8.4, libpod to 1.4.1, ...
  - Bump github.com/containers/libpod from 1.2.0 to 1.3.1
  - Vendor containers/storage v1.12.4
  - update github.com/containers/* dependencies
  - Changes to rpm build and Dockerfile for ci
  - When plugin_dir is set, only use that value
  - Update Makefile to be usable without git
  - bump to version 1.14.5-dev
  - bump to version 1.14.4
  - Default to runc is default_runtime is not set
  - Fix missing images names on list
  - Add crio-wipe
  - Add logic for running OpenShift CI on cri-o PRs
  - Update device cgroup permissions for configured devices.
  - version: v1.14.4-dev
  - version: v1.14.3
  - Fix runtime panic when having concurrent writes to runtime impl map
  - server: do not add default /sys if bind mounted
  - Change plugin_dir to plugin_dirs
  - Added unit tests
  - Add version file functionality
  - fix build issues on 32-bit arches
  - conmon: use sd_journal_sendv
  - make vendor generated
  - Move to v1.14.3-dev
  - Tag v1.14.2
  - Vendor in c/storage release-1.13
  - Revert "update github.com/containers/* dependencies"
  - Update test suites
  - Fix logic of server.restore()
  - version: v1.14.2-dev

Fixes #1866

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-07-09 10:57:25 +02:00
GabyCT
220ae83820
Merge pull request #1859 from jodh-intel/fix-fork-exec-test-error
Fix fork exec test errors
2019-07-05 15:40:50 -05:00
GabyCT
8b89a868e9
Merge pull request #1858 from GabyCT/topic/checkversion
ci: Verify and block merge if other projects are not updated
2019-07-05 14:05:53 -05:00
James O. D. Hunt
4968438992 tests: Fix fork/exec test error
Fixed `TestSandboxCreationFromConfigRollbackFromCreateSandbox` which
requires that the hypervisor does not exist. Unfortunately, it does
exist (as a fake test binary), but isn't executable meaning although the
test failed (since an error is expected), rather than the expected
`ENOENT` error, the test was logging a message similar to the following
since the fake hypervisor exists with non-executable permissions:

```
Unable to launch /tmp/vc-tmp-526112270/hypervisor: fork/exec /tmp/vc-tmp-526112270/hypervisor: permission denied
```

Fixes: #1835.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-07-05 11:11:56 +01:00
James O. D. Hunt
fcf9f9f6dd test: Fix fd leak causing test error
Update the `TestQemuAddDeviceKataVSOCK` test so that it:

- Doesn't hard-code the file descriptor number.
- Cleans up after itself.

The latter issue was causing an odd error similar to the following in
the test output:

```
Unable to launch /tmp/vc-tmp-526112270/hypervisor: fork/exec /tmp/vc-tmp-526112270/hypervisor: permission denied
```

Partially fixes: #1835.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-07-05 11:11:52 +01:00
Gabriela Cervantes
5182a2551d ci: Verify and block merge if other projects are not updated
This will take the VERSION of all the components in order to
verify that they match among them before merging the runtime.

Fixes #1581

Depends-on: github.com/kata-containers/packaging#614

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-07-05 01:06:37 -05:00
Fupan Li
cd4cc02568
Merge pull request #1857 from odinuge/fix-hugetlb-pagesize
shimv2: Add missing page size to Hugetlb Stat
2019-07-04 15:57:45 +08:00
Odin Ugedal
da7f5f3796
shimv2: Add missing page size to Hugetlb Stat
Fixes: #1856

Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-07-03 21:07:04 +02:00
GabyCT
43f2680e4c
Merge pull request #1841 from katabuilder/1.8.0-rc0-branch-bump
# Kata Containers 1.8.0-rc0
2019-07-02 18:15:16 -05:00
Jose Carlos Venegas Munoz
b94dafa980
Merge pull request #1849 from jodh-intel/fix-borken-url
docs: Fix broken URL
2019-07-02 08:04:26 -05:00
James O. D. Hunt
f1a43ac4c6 docs: Fix broken URL
Update broken Clear Linux stateless URL.

Fixes: #1846.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-07-02 08:41:33 +01:00
James O. D. Hunt
09e316a376
Merge pull request #1848 from bergwolf/url
vc/readme: fix cri url
2019-07-02 08:37:51 +01:00
Peng Tao
db3363fbdf vc/readme: fix cri url
The old one was invalidated since 2019-07-01.

Fixes: #1847
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-01 20:14:13 -07:00
Jose Carlos Venegas Munoz
c92d77bf99
Merge pull request #1838 from egernst/fix-1837
vc: update CRI link
2019-07-01 18:06:32 -05:00
Eric Ernst
8f33d736e8 vc: update CRI link
Kubernetes moved CRI document within the sig-node directory. Updating
README.md accordingly.

Fixes: #1837

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-07-01 15:54:59 -07:00
Jose Carlos Venegas Munoz
024a87419e
Merge pull request #1845 from chavafg/topic/travis_run_setup
CI: Run .ci/setup.sh from tests repo
2019-07-01 17:46:55 -05:00
Salvador Fuentes
963db61cb3 CI: Run .ci/setup.sh from tests repo
This will install correct dependencies for running
static checks.

Fixes: #1844.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-07-01 16:24:51 -05:00
Eric Ernst
3a454814e3
Merge pull request #1826 from amshinde/empty-dir-fix-overlay
empty-dir: Fix bug in the way empty-dirs are handled for overlay
2019-07-01 14:09:01 -07:00
katacontainersbot
71ce7577fb release: Kata Containers 1.8.0-rc0
- shimv2: Make shimv2 in case any source files change
- Firecracker: Upgrade to 0.17.0
- kata-check: add kvm extension check on aarch64
- versions update kernel to 4.19.52
- trace: Add missing log message
- docs: Fix doc link

749dd04 versions: update kernel to 4.19.52
4d526db firecracker: Update virtcontainer to use latest swagger definition
1e9e00a firecracker: generated code
48fef40 kata-check: add kvm extension check on aarch64
b3ab9ca trace: Add missing log message
289df4d firecracker: Fix yaml definition
62a715a Firecracker: Add upstream swagger file
da2a52a Unvendor: Unvendor firecracker-go-sdk
dca1f52 Firecracker: Upgrade to 0.17.0
b489bbd shimv2: Make shimv2 in case any source files change
af6bba1 docs: Fix doc link

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-07-01 19:38:14 +00:00
Archana Shinde
57136faa38 empty-dir: Fix bug in the way empty-dirs are handled for overlay
With #1485, we moved the default medium empty-dir creation to the
sandbox rootfs. This worked for devicemapper, but in case of overlay
the "local" directory was being created outside the sandbox rootfs.
As a result we were seeing the behaviour seen in #1818.

Fixes #1818

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-06-27 09:39:53 -07:00
James O. D. Hunt
829ac720cd
Merge pull request #1806 from amshinde/make-shimv2
shimv2: Make shimv2 in case any source files change
2019-06-24 11:16:53 +01:00
Eric Ernst
ed693fe3df
Merge pull request #1813 from mcastelino/topic/fc_0_17_0
Firecracker: Upgrade to 0.17.0
2019-06-21 16:03:03 -07:00
Xu Wang
21c8cf4f9f
Merge pull request #1797 from Pennyzct/IPA
kata-check: add kvm extension check on aarch64
2019-06-21 19:10:35 +08:00
Xu Wang
4d071fd406
Merge pull request #1817 from egernst/kernel-bump
versions update kernel to 4.19.52
2019-06-21 19:03:11 +08:00
Eric Ernst
749dd0491f versions: update kernel to 4.19.52
Update to newer stable kernel

Fixes: #1816
Depends-on: github.com/kata-containers/packaging#592

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-06-20 17:26:52 -07:00
Manohar Castelino
4d526dbb6e firecracker: Update virtcontainer to use latest swagger definition
Update virtcontainer to use latest swagger definition.
Most changes are around mandatory parameters which need to be
passed in via pointers so that the absence of the same can be
detected (vs using default values).

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-06-20 09:36:44 -07:00
Manohar Castelino
1e9e00a529 firecracker: generated code
```
swagger generate model -f ./firecracker-experimental.yaml --model-package=client/models --client-package=client
swagger generate client -f ./firecracker-experimental.yaml --model-package=client/models --client-package=client
```

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-06-20 09:36:21 -07:00
Jose Carlos Venegas Munoz
a5b8ff42f7
Merge pull request #1815 from jodh-intel/log-trace-msg
trace: Add missing log message
2019-06-20 11:35:43 -05:00
James O. D. Hunt
b2295dbf94
Merge pull request #1804 from jodh-intel/fix-doc-link
docs: Fix doc link
2019-06-20 12:04:21 +01:00
Penny Zheng
48fef40fd9 kata-check: add kvm extension check on aarch64
Auger Eric's latest patches about "ARM virt: Initial RAM expansion
and extended memory map"(https://patchwork.kernel.org/cover/10835377/)
paves the way to device memory, which is the foundation for NVDIMM and
memory hotplug.
This new feature on qemu kinds of depends on host kernel's new feature
on dynamic IPA range(https://lwn.net/Articles/750176/).
The availability of this feature is advertised by a new kvm cap
KVM_CAP_ARM_VM_IPA_SIZE. When supported, this capability returns the
maximum IPA shift supported by the host. The supported IPA size on
a host could be different from the system's PARange indicated
by the CPUs (e.g, kernel limit on the PA size).

Fixes: #1796

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-06-20 10:23:13 +08:00
James O. D. Hunt
b3ab9cafc1 trace: Add missing log message
Add a log message for every trace span created, required by the tracing
tests to validate tracing is working.

Fixes: #1814.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-06-19 11:46:13 +01:00
Manohar Castelino
289df4da13 firecracker: Fix yaml definition
The upstream yaml definition has a formatting issue. Fix the
indentation to ensure that swagger can generate the code.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-06-18 16:55:53 -07:00
Manohar Castelino
62a715a330 Firecracker: Add upstream swagger file
Add upstream swagger file corresponding to release 0.17.0.

https://github.com/firecracker-microvm/firecracker/blob/v0.17.0/api_server/swagger/firecracker-experimental.yaml

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-06-18 16:41:22 -07:00