Commit Graph

1911 Commits

Author SHA1 Message Date
Peng Tao
254b85aec1
Merge pull request #2092 from lifupan/fixmissingwatchconsole
virtcontainers: fix the issue of missing watchConsole
2019-11-01 09:47:11 +08:00
Eric Ernst
764ba9f83d
Merge pull request #2153 from egernst/cgroup-fixups
sandbox/cgroups: don't constrain if using SandboxCgroupsOnly
2019-10-31 12:11:33 -07:00
Eric Ernst
1b05482680
Merge pull request #2097 from jcvenegas/overhead
cli: add kata-overhead subcommand
2019-10-31 07:39:36 -07:00
Salvador Fuentes
ad70bc3499
Merge pull request #2155 from yyyeerbo/wip
versions: support specify version in versions.yaml for rust agent.
2019-10-31 07:52:49 -06:00
Yang Bo
e4c816bebd versions: support specify version in versions.yaml for rust agent.
Fixes: #2154

Signed-off-by: Yang Bo <bo@hyper.sh>
2019-10-31 14:51:50 +08:00
Eric Ernst
691a6a7ac4 sandbox/cgroups: don't constrain if using SandboxCgroupsOnly
When SandboxCgroupsOnly is set, we are expected to just inherit our parent's
cgroup settings and to move all Kata threads within that sandbox cgroup. The
initial implementation still adjusted the size of this cgroup. This commit
fixes this.

This commit makes a couple of functional changes, small refactors, and
adds clarifying comments for some functions.

Fixes: #2090

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-30 19:16:30 -07:00
Jose Carlos Venegas Munoz
7fe0100444 cli: add kata-overhead command
Introduce kata-overhead command to kata-runtime CLI, to help
with calculating sandbox overhead.

Fixes: #2096

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-30 19:08:58 -07:00
Jose Carlos Venegas Munoz
1bbc1d58bd virtcontainers: add StatsSandbox to vc API
StatsSandbox is used to gather metrics for the sandbox (host cgroup) as
well as from the individual containers (from the guest cgroups). This is
intended to be used for easily calculating Kata sandbox overheads.

Fixes: #2096

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-30 19:07:23 -07:00
Wang Liang
569bd780f1 virtcontainers: change pass by value to pass by reference
container.config does not point to sandbox.config.Containers.ContainerConfig
which caused the ContainerConfig not sync.

Fixes: #2129

Signed-off-by: Wang Liang <wangliangzz@inspur.com>
2019-10-30 19:01:57 -07:00
Eric Ernst
da98191940
Merge pull request #2130 from fuxiao511/update_cpu
virtcontainers/sandbox: calculate container's CPU from sandbox.contai…
2019-10-22 21:38:36 -07:00
Salvador Fuentes
a1a2da6fcf
Merge pull request #2142 from jcvenegas/fix-version-checker-1.9
ci: Fix versions_checker.sh
2019-10-22 11:52:38 -05:00
Jose Carlos Venegas Munoz
559327c021
Merge pull request #2141 from jcvenegas/merge-check-for-release
ci: Fix versions_checker.sh
2019-10-21 13:19:06 -05:00
lifupan
c51d49277e virtcontainers: fix the issue of missing watchConsole
When do the reloading sandbox in shimv2, it's needed to
rewatch the hypervisor's console when debug enabled.

Fixes:#2091

Signed-off-by: lifupan <lifupan@gmail.com>
2019-10-19 00:37:15 +08:00
Jose Carlos Venegas Munoz
5b226d0d39 ci: Fix versions_checker.sh
Version checker does to work today

- Allow to detect stabe branches

Fixes #1581

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-10-17 20:54:43 -05:00
Jose Carlos Venegas Munoz
f8b84d7eba ci: Fix versions_checker.sh
Version checker does to work today

- Allow to detect stabe branches

Fixes #1581

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-10-17 20:48:10 -05:00
Peng Tao
7d484dfe4c
Merge pull request #2127 from devimc/topic/virtcontainers/rollbackUnmountHostMounts
virtcontainers: unmount host mounts if container can't be created
2019-10-14 10:32:14 +08:00
Peng Tao
a1cd0f8f76
Merge pull request #2134 from devimc/topic/virtcontainers/rootlessVCStoreUUIDPath
virtcontainers/store: make VCStoreUUIDPath rootless
2019-10-14 10:27:06 +08:00
Wang Liang
24d7aff60c virtcontainers: change pass by value to pass by reference
container.config does not point to sandbox.config.Containers.ContainerConfig
which caused the ContainerConfig not sync.

Fixes: #2129

Signed-off-by: Wang Liang <wangliangzz@inspur.com>
2019-10-12 04:24:50 -04:00
Julio Montes
abec17f8f2 virtcontainers/store: make VCStoreUUIDPath rootless
The uuid file shouldn't be created at `/var` if running rootless.
Modify `VMUUIDStoragePath` to get a path accessible for non-root users
if running rootless.

fixes #2133

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-11 15:30:23 +00:00
Julio Montes
eca7bd2705 virtcontainers: unmount host mounts if container can't be created
Mount points, like `resolv.conf` and `hostname` are left in the
host when the cgroup creation fails.
Use `unmountHostMounts()` and `bindUnmountContainerRootfs()` in the rollback
function that is called when container's creation fails.

fixes #2108

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-11 13:46:56 +00:00
Peng Tao
c7b4c5eab9
Merge pull request #2124 from devimc/topic/virtcontainers/fixAnnotationsPrefix
virtcontainers/annotations: use right domain name for kata annotations
2019-10-10 17:02:27 +08:00
Peng Tao
729b5faf52
Merge pull request #2122 from darfux/v2_pause_resume_behavior
v2: Change the event and error behavior of pause/resume
2019-10-10 16:52:09 +08:00
Eric Ernst
4f8cc73e82
Merge pull request #2112 from amshinde/update-cni-plugin-version
Update cni plugin version
2019-10-09 15:51:08 -07:00
Archana Shinde
04489fec2d
Merge pull request #2118 from amshinde/load-state-early
Load state early so that hypervisor can store the correct state
2019-10-09 15:46:15 -07:00
Julio Montes
91bd095ee4 virtcontainers/annotations: use right domain name for kata annotations
The domain name should be used as prefix for the annotations, for
kata containers the domain name is katacontainers.io, not kata-containers.io

fixes #2123

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-09 15:21:28 +00:00
Jose Carlos Venegas Munoz
a4b5a565ff
Merge pull request #2117 from katabuilder/1.9.0-rc0-branch-bump
# Kata Containers 1.9.0-rc0
2019-10-09 08:25:56 -05:00
Li Yuxuan
c1060a3b9e v2: Change the event and error behavior of pause/resume
1. Send the event when the container is paused/resumed successfully
2. Return the error of the pause/resume function rather than
`getContainerStatus`.

Fixes #2121

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-10-09 19:00:04 +08:00
Archana Shinde
f6a10bcae7 state: Refactor code to move all the state load code
Refactor so that all code to load state, devices, network
takes place at one place. This is in line with the experimental api
for new storage that also loads all the necessary items here all at once.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-08 18:42:20 -07:00
Archana Shinde
fa4acad4aa state: Load the state from storage early on
The hypervisor.createSandbox may need to access the state.
For eg, ACRN today needs to access the block index to assign
it to the root image of the VM. Hence load this early on.

Fixes #2026

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-08 16:29:07 -07:00
Archana Shinde
929c4e7e3d network: Change NewNS() call
NewNS() api has been moved to testutils package in the cni
plugin repo.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-08 16:16:35 -07:00
Archana Shinde
c0995c6201 vendor: Vendor the latest CNI plugins
Vendor cni plugin repo to use the latest code for
setting up network namespaces.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-08 16:16:26 -07:00
Archana Shinde
86d8346d0c version: Update the version for cni plugins
Update the version used for testing the cni plugins to the latest
0.8.2 release. This way we make sure CI tests with latest CNI plugins.

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

Fixes #2111

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-08 16:16:20 -07:00
katacontainersbot
b84cb5e0f1 release: Kata Containers 1.9.0-rc0
- Fix cache factory UT
- Virtio-fs v0.3 support
- virtcontainers: set agent's logs vsock port
- config: Fix `virtio-fs` typo in Makefile
- Hypervisor: UUID fix for acrn hypevisor
- virtcontainers: change firecracker socket permissions
- Add annotations to provide custom configs
- Fix CRIO + Firecracker
- rootless: add rootless to kata
- QEMU: do not require nvdimm machine option with initrd
- s390x: Fix runtime build for s390x
- versions: Update kernel to 4.19.75
- config: honor DEFSHAREDFS_QEMU_VIRTIOFS and CONFIG_QEMU_VIRTIOFS_IN
- Support Firecracker 0.18
- virtcontainers: fix the issue of missing qemu error logs
- config: Fix the qemu-virtiofs.toml
- s390x: Share image between qemu instances
- The unit of newMemory is MB
- config: use 9p as default shared filesystem for nemu
- Remove annotation config json key

dd21046 vc/store: fix TestStoreVCNewVCSandboxStore/TestStoreVCNewVCContainerStore
6ab89e4 vc/store: fix cache factory ut
4863aa9 vc/store: reuse store
ad15631 virtiofsd: Do not use posix lock.
2b40b6b vendor: update kata agent
aa43e2a virtcontainers: set agent's logs vsock port
23a5dc7 virtiofsd: use virtiofsd --syslog
d5a3d0a virtiofs: use virtiofsd --fd=FDNUM
6ce6a26 kata_agent: use virtio-fs 0.3+ mount options
80855a8 ci: travis: allow ppc64le failures
c3abd51 config: Fix `virtio-fs` typo in Makefile
8f6b0a6 virtcontainers: change firecracker socket permissions
8f70643 tests: Remove hardcoded annotation value.
e7b9c36 tests: Add tests for annotations.
09129c1 config: Define minimum memory requirement
8405b56 annotations: add Annotations for the agent.
5b78a8a annotations: Add annotations for runtime config
afb91c2 annotations: Add annotations to support additional configurations
845bf73 annotations: Support annotations to customise kata config
30d0b7a annotations: Add missing firmware and hashes to asset annotations
46b6815 annotations: Change existing annotations to fit a new format
312f3e7 virtcontainers/fc: implement remove device
7e9cc56 virtcontainers/fc: improve create disk pool process
07932d5 virtcontainers/fc: add logs and improve others to make debugging easier
ed7240b virtcontainers: move device operations to a more generic place
e93bf96 network: Add tuntap device
c8dd92d dep: update vendor packages for netlink commit
41407cf vc: make cgroup usage configurable if rootless
5f0799f vc: add rootless dir to path variables
cdd6f7e katautils: update paths to be configurable for rootless execution
2d8b278 rootless: add rootless logic
8b843c5 QEMU: do not require nvdimm machine option with initrd
c152ebf s390x: Fix runtime build for s390x
bc3c07b versions: Update kernel to 4.19.75
aa6a16c Hypervisor: UUID fix for acrn hypevisor
b1909e8 config: fix virtiofsd name
84ead98 config: add configuration-qemu-virtio-fs.toml to gitignore
443e657 config: honor DEFSHAREDFS_QEMU_VIRTIOFS and CONFIG_QEMU_VIRTIOFS_IN
3d0949d virtcontainers: check minimum supported version of firecracker
1f93cff virtcontainers: fix the issue of missing qemu error logs
8680db6 versions: update firecracker to the version 0.18.0
123ba13 vendor: update kata agent
5ac6e9a virtcontainers: make socket generation hypervisor specific
f2f0923 virtcontainers: rename kataVSOCK type and move it into the types package
f42dd7d virtcontainers/fc: Add support for hybrid vsocks
2c4cf39 virtcontainers/fc: bump firecracker experimental version
bb87b44 virtcontainers/fc: Add logger to the http transport
880bb2b virtcontainers: introducing HybridVSock type
2a8af23 virtcontainers: Make fc.go fit the new API
67ce728 virtcontainers: Update firecracker swagger API
cdb1b5c cli: Fix the qemu-virtiofs.toml
4134571 config: do not use nemu variable for qemu-virtiofs configuration
97fe749 config: use 9p as default shared filesystem for nemu
c81db9c sandbox: The unit of newMemory is MB
7fa0a72 s390x: Share image between qemu instances
7965baa vendor: update govmm
2ed94cb Config: Remove ConfigJSONKey from annotations

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-10-08 21:38:41 +00:00
Jose Carlos Venegas Munoz
c26788c329
Merge pull request #2115 from bergwolf/store
Fix cache factory UT
2019-10-08 15:40:52 -05:00
Peng Tao
dd21046072 vc/store: fix TestStoreVCNewVCSandboxStore/TestStoreVCNewVCContainerStore
They both need to set a temporary test dir in order to run as non-root.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-10-08 09:32:45 -07:00
Peng Tao
6ab89e4549 vc/store: fix cache factory ut
In order to run the ut as non-root, we need to add a path prefix
for all store paths.

Fixes: #2113

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-10-08 09:29:37 -07:00
Peng Tao
4863aa998e vc/store: reuse store
As store.New() claims, we should reuse an existing store instead of
failing on duplicating stores.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-10-08 09:29:28 -07:00
Eric Ernst
f62bceba99
Merge pull request #1994 from stefanha/virtio-fs-v0.3
Virtio-fs v0.3 support
2019-10-08 08:27:32 -07:00
Salvador Fuentes
ad1563196e virtiofsd: Do not use posix lock.
We have some issues trying to run `apt upgrade` on
a container that uses virtiofsd with `-o posix_lock`.

Add virtiofsd `-o no_posix_lock` argument to not use the
posix lock.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-07 16:21:33 -05:00
GabyCT
238f3cec56
Merge pull request #2104 from devimc/topic/virtcontainers/fcAgentLogs
virtcontainers: set agent's logs vsock port
2019-10-07 13:23:37 -05:00
Julio Montes
2b40b6b094 vendor: update kata agent
bring support for logging through a hybrid vsock

shortlog:
95be1c3 agent: add support for logging to a vsock port
a03e23b protocols/client: improve hybrid vsock parser
6a96997 protocols/client: make schemes and hybrid vsock dialer public
e01f23c network: Add a testcase for setupDNS
d733185 network: Setup DNS for sandbox

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-07 16:39:18 +00:00
Julio Montes
aa43e2a9ac virtcontainers: set agent's logs vsock port
In firecracker, there is no socket connected to /dev/console, so let's
use a vsock port to get agent's logs

Depends-on: github.com/kata-containers/shim#210

fixes #2103

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-07 16:39:18 +00:00
Stefan Hajnoczi
23a5dc7ff8 virtiofsd: use virtiofsd --syslog
Log to syslog instead of stderr.  This way all Kata and virtiofsd logs
are captured in syslog (or the systemd journal).  This makes debugging
much easier.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-10-07 14:21:30 +01:00
Stefan Hajnoczi
d5a3d0a61c virtiofs: use virtiofsd --fd=FDNUM
The new --fd=FDNUM file descriptor passing option eliminates the need to
wait for virtiofsd to create the vhost-user UNIX domain socket.  This is
a nice simplification because we can remove the timeouts and stderr
parsing.  There is no longer a race between launching virtiofsd and
launching QEMU, so we don't need to wait anymore.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-10-07 14:21:30 +01:00
Stefan Hajnoczi
6ce6a262a8 kata_agent: use virtio-fs 0.3+ mount options
virtio-fs changed the mount command-line.  Previously "mount none -o
tag=kataShared ..." was used.  Now "mount kataShared ..." is used
instead.

Since the "kataShared" tag is used for both 9P and virtio-fs, rename the
variable so that it is not 9P-specific.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: #1993
2019-10-07 14:21:28 +01:00
GabyCT
93197ddcc3
Merge pull request #2106 from chavafg/topic/makefile-virtiofs-typo
config: Fix `virtio-fs` typo in Makefile
2019-10-04 15:10:41 -05:00
Salvador Fuentes
80855a8ed4 ci: travis: allow ppc64le failures
ppc64le job on travis is being very unstable.
Allow failures on this job

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-04 12:33:31 -05:00
Salvador Fuentes
c3abd51a5b config: Fix virtio-fs typo in Makefile
typo `virtios-fs` should be `virtio-fs`.

Fixes: #2105.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-04 12:32:32 -05:00
Jose Carlos Venegas Munoz
b3aa770d95
Merge pull request #2075 from vijaydhanraj/acrn_vm_uuid_support
Hypervisor: UUID fix for acrn hypevisor
2019-10-04 09:39:46 -05:00
Jose Carlos Venegas Munoz
2591a1fb65
Merge pull request #2102 from devimc/topic/virtcontainers/fcFixSocketPerm
virtcontainers: change firecracker socket permissions
2019-10-04 09:26:50 -05:00