Commit Graph

6963 Commits

Author SHA1 Message Date
Julio Montes
62917621c2 virtcontainers: copy files form host to guest
Files are copied over gRPC and there is no limit in size of the files that
can be copied. Small files are copied using just one gRPC call while big files
are copied by parts.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-12-19 09:55:25 -06:00
Eric Ernst
dcd48a9ca1 vc: capabilities: add capability flags for filesystem sharing
Not all hypervisors support filesystem sharing. Add capability flags to track
this. Since most hypervisor implementations in Kata *do* support this, the set
semantices are reversed (ie, set the flag if you do not support the feature).

Fixes: #1022

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-12-19 09:54:00 -06:00
Julio Montes
e776380ff8 vendor: update kata agent
Brings support to copy file from host to guest

shortlog:
169d755 protocols/grpc: implement function to copy files
ff87c26 virtio-mmio: Add support for virtio-mmio blk devices
b9c5d5b libcontainer: use /run as root containers path
092f1a0 block: add support of block storage driver "nvdimm"

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-12-19 09:10:20 -06:00
James O. D. Hunt
0d6a035f95
Merge pull request #1056 from lifupan/fixVsock
katautils: check config factory/template and vsock
2018-12-19 10:39:38 +00:00
Frank Cao
07a0b163f9
Merge pull request #1049 from sameo/topic/ctx-unset
virtcontainers: Add context when creating tests sandboxes
2018-12-19 14:43:16 +08:00
fupan
e4e7c3ae54 katautils: check config template and vsock
Vsock conflicts with factory, when both of them are enabled,
kata will try to create a new vm template which is useless,
thus it's better to return an error directly to let users know
that those two config cannot be enabled at the same time.

Fixes: #1055

Signed-off-by: fupan <lifupan@gmail.com>
2018-12-19 14:12:41 +08:00
Peng Tao
b446179fa4
Merge pull request #1015 from teawater/fix_yq2
make: Add "GOPATH not set"
2018-12-19 13:16:07 +08:00
Peng Tao
ade738f7b7
Merge pull request #1052 from sboeuf/fc_fix_network
virtcontainers: network: Use multiqueue flag only when appropriate
2018-12-19 09:56:42 +08:00
Sebastien Boeuf
0f1fde498d virtcontainers: network: Use multiqueue flag only when appropriate
The multiqueue flag associated with the TUNTAP network device cannot
be used if the number of queues indicates 0. When 0, this means the
multiqueue is not supported, and we cannot use the according flag.

Fixes #1051

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-12-18 11:06:06 -08:00
Samuel Ortiz
f63a18deea virtcontainers: Add context when creating tests sandboxes
We can use the background context when creating test sandboxes from the
sanbox unit tests. This shuts the "trace called before context set"
erros down.

Fixes: #1048

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2018-12-18 13:22:08 +01:00
Sebastien Boeuf
5d91edd695
Merge pull request #1038 from lifupan/fixvsock
katautils: fix the issue of shimv2 boot failed with vsock enabled
2018-12-17 11:35:25 -08:00
Sebastien Boeuf
9ad35bd6b6 kernel: Add 4.19.10 config for x86
We want to make sure Kata runs on latest stable kernels so that it
benefits from the latest features.

For instance, in case of Kata relying on NEMU hypervisor, the recent
kernel patches reworking the way timer calibration is handled are
solving some boot latency issues.

Fixes #287

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-12-17 08:53:04 -08:00
Sebastien Boeuf
802bfa26c9 versions: Bump to kernel 4.19.10
We need to bump the kernel version from 4.14.67 to 4.19.10 in order
to follow the recent kernel config bump.

Fixes #1029

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-12-17 08:16:10 -08:00
Fupan Li
05be5bf1f9 shimv2: discard log before shim init log output
containerd would like to get the shim's socket
address from shimv2's stdout, thus it's better
to discard the log's output before shimv2 init
it's logger and at the same time add a hook to
log into syslog.

Fixes: #1035

Signed-off-by: Fupan Li <lifupan@gmail.com>
2018-12-17 15:39:44 +00:00
James O. D. Hunt
006d375358
Merge pull request #1040 from alicefr/doc_s390
docs: add IBM Z in the README
2018-12-17 15:25:11 +00:00
Alice Frosi
e98dee6a22 docs: drop 's in architecture names for consistency
Drop 's for the other archs to be consistent

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-12-17 16:18:16 +01:00
Sebastien Boeuf
658bd82490
Merge pull request #1034 from Pennyzct/hvc
qemu-arm64: refactor 'console=hvc0,hvc1' for kata-agent debugging
2018-12-17 06:50:55 -08:00
Julio Montes
bb06a0498a
Merge pull request #221 from alicefr/s390_docu
docs: update compatibility matrix with s390
2018-12-17 07:42:08 -06:00
Alice Frosi
1892102dc3 docs: add IBM Z in the README
Fixes: #1039

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-12-17 12:56:25 +01:00
Marco Vedovati
3549d5a5e2 obs-packaging: support comparisons of pre-releases versions
Fix version compare when specifying a pre-release version in
versions.txt. This is needed because kata on git uses strict semver,
while kata RPM packages uses ~ in place of - for PATCH version, to
allow RPM version comparison to work properly.

Fixes: #285

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-12-17 12:36:09 +01:00
Alice Frosi
c3d77aea6a docs: add s390 to the compatibility matrix
Fixes: #198

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-12-17 10:39:09 +01:00
Fupan Li
573b73eb10 katautils: fix the issue of shimv2 boot failed with vsock enabled
shimv2 missed to enable vsock in KataAgentConfig.

Fixes: #1037

Signed-off-by: Fupan Li <lifupan@gmail.com>
2018-12-17 07:13:38 +00:00
Eric Ernst
df6a8ed37a
Merge pull request #272 from mcastelino/topic/firehack
Firecracker support: Add support for virtio-mmio
2018-12-16 21:31:01 -08:00
Eric Ernst
31489976ae
Merge pull request #1028 from sboeuf/multi_queues
network: Don't assume multiple queues support by default
2018-12-16 21:23:10 -08:00
Penny Zheng
c8c564bdd6 qemu-arm64: refactor 'console=hvc0,hvc1' for kata-agent debugging
Since kata-agent is using virtio-console to output debugging info
and the console ports are available in the guest as /dev/hvc0 and
/dev/hvc1, we should swap origin console type 'console=ttyAMA0'
with 'console=hvc0,hvc1'.

Fixes: #1033

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Signed-off-by: Wei Chen <Wei.Chen@arm.com>
2018-12-17 11:34:11 +08:00
Penny Zheng
aee668b51d kernel: update guest kernel to 4.19.8 on aarch64
For supporting nvdimm, we need to update kernel on aarch64 to the
stable version 4.19.8 and backport Suzuki K Poulose's latest
Dynamic IPA and 52bit IPA support patch series
(https://patchwork.kernel.org/cover/10616271/)which has been included
in 4.20-rc3+ to the v4.19.8.

Fixes: #268

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Signed-off-by: Wei Chen <Wei.Chen@arm.com>
2018-12-17 10:00:59 +08:00
Manohar Castelino
662147ce03
Merge pull request #283 from kata-containers/revert-278-add_config_x86_4_19_8
Revert "kernel: Add 4.19.8 config for x86"
2018-12-14 17:10:28 -08:00
Manohar Castelino
8f513d6c86 Add support for virtio-mmio
Add support for virtio-mmio. Firecracker uses virtio-mmio.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2018-12-14 17:02:09 -08:00
Manohar Castelino
edc9bcba30
Revert "kernel: Add 4.19.8 config for x86" 2018-12-14 16:34:18 -08:00
Sebastien Boeuf
a1af1cb099 virtcontainers: network: Rely on hypervisor capabilities for multi queues
In order to properly setup the network, hence allocate or not multiple
queues, this commit makes sure that the hypervisor capabilities are
checked for this.

Fixes #1027

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-12-14 15:39:25 -08:00
Manohar Castelino
9d4e6b0742
Merge pull request #278 from sboeuf/add_config_x86_4_19_8
kernel: Add 4.19.8 config for x86
2018-12-14 15:21:22 -08:00
Sebastien Boeuf
a227ab852a virtcontainers: hypervisor: Add capability regarding multiqueue support
Each hypervisor is different and supports different options regarding
the network interface it creates. In particular, the multiqueue option
is not supported by Firecracker and should not be assumed by default.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-12-14 15:11:44 -08:00
Sebastien Boeuf
0bcd221fad virtcontainers: network: Rename numCPUs to queues
The point of knowing the number of CPUs from the network perspective
is to determine the number of queues that can be allocated to the
network interface of the our virtual machine.

Therefore, it's more logical to name it queues from a network.go
perspective.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-12-14 15:08:55 -08:00
Sebastien Boeuf
2cb4bb9db7 virtcontainers: network: Reorganize endpoints interconnection
In order to prevent from future duplication of calls into the
hypervisor interface, the hypervisor is directly passed as part
of the xConnectVMNetwork() function. Because this does not apply
the disconnection case, this commit splits the former function
into two separate ones.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-12-14 14:50:11 -08:00
Marco Vedovati
59ce0b3d4e dev-guide: detect & use existing docker unit file
Only create a new docker unit file if no other existing unit files
are detected. Creating a new docker file when not necessary may mask out
existing docker daemon configurations.

Fixes: #300

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-12-14 18:34:29 +01:00
Salvador Fuentes
4fc6e33ccc
Merge pull request #220 from chavafg/topic/fix-dependencies-fedora
setup: Add make and gcc as dependencies
2018-12-14 10:58:32 -06:00
Sebastien Boeuf
9ec1ca731d kernel: Add 4.19.8 config for x86
We want to make sure Kata runs on latest stable kernels so that it
benefits from the latest features.

For instance, in case of Kata relying on NEMU hypervisor, the recent
kernel patches reworking the way timer calibration is handled are
solving some boot latency issues.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-12-14 07:28:30 -08:00
Salvador Fuentes
be97380a3b setup: Add make and gcc as dependencies
We require make and gcc to run our CI tools.

Fixes: #219.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2018-12-14 08:09:52 -06:00
Julio Montes
121de2ccf3
Merge pull request #216 from marcov/suse-arm-repo-fix
suse: fix port URL detection for aarch64
2018-12-14 07:08:45 -06:00
Julio Montes
695702b61b
Merge pull request #218 from alicefr/master
s390x: set CC for fedora
2018-12-14 07:08:21 -06:00
James O. D. Hunt
bcf995bfe1
Merge pull request #887 from jcvenegas/sandbox-manage-resources
virtcontainers: make sandbox manage VM resources
2018-12-14 09:21:36 +00:00
x00464843
08f1c05144 Module: fix parameter order error in cli/ps.go
Fixes: #1017
reason: when calls vci.ProcessListContainer, fix wrong parameter order

Signed-off-by: x00464843 <xueshaojia@huawei.com>
2018-12-14 09:08:54 +08:00
Jose Carlos Venegas Munoz
d4586d4bcc test: remove TestHotplugRemoveMemory
HotplugRemoveMemory require to do a qmp call, but
unit test does not start a Qemu instance.

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

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-12-13 16:33:35 -06:00
Jose Carlos Venegas Munoz
0d80202573 vc:sandbox: rename newcontainer to fetchcontainer.
The containers is not new but fech from an existing one.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-12-13 16:33:24 -06:00
Jose Carlos Venegas Munoz
618cfbf1db vc: sandbox: Let sandbox manage VM resources.
- Container only is responsable of namespaces and cgroups
inside the VM.

- Sandbox will manage VM resources.

The resouces has to be re-calculated and updated:

- Create new Container: If a new container is created the cpus and memory
may be updated.

- Container update: The update call will change the cgroups of a container.
the sandbox would need to resize the cpus and VM depending the update.

To manage the resources from sandbox the hypervisor interaface adds two methods.

- resizeMemory().

This function will be used by the sandbox to request
increase or decrease the VM memory.

- resizeCPUs()

vcpus are requested to the hypervisor based
on the sum of all the containers in the sandbox.

The CPUs calculations use the container cgroup information all the time.

This should allow do better calculations.

For example.

2 containers in a pod.

container 1 cpus = .5
container 2 cpus = .5

Now:
Sandbox requested vcpus 1

Before:
Sandbox requested vcpus 2

When a update request is done only some atributes have
information. If cpu and quota are nil or 0 we dont update them.

If we would updated them the sandbox calculations would remove already
removed vcpus.

This commit also moves the sandbox resource update call at container.update()
just before the container cgroups information is updated.

Fixes: #833

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-12-13 16:33:14 -06:00
Alice Frosi
de7fe193ab s390x: set CC for fedora
Fixes: #217

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-12-13 14:40:44 +01:00
Hui Zhu
25358444ad make: Add "GOPATH not set"
Most of the projects, they can be built with "make".  After that,
"sudo make install" can install the application.
It is not work for kata-runtime because kata-runtime's make must work
with golang in the environment that default sudo cannot supply it.
But "make install" doesn't need golang.

So add "GOPATH not set" to handle the issue.

Fixes: #1008

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2018-12-13 13:25:43 +08:00
Marco Vedovati
3366a32077 README: add ARM architecture to openSUSE
The openSUSE image can be built for ARM.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-12-12 18:16:32 +01:00
Marco Vedovati
804286f90d suse: fix port URL detection for aarch64
Fix port URL detection for aarch64, and error out if an unknown
architecture is detected.

Fixes: #215

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-12-12 18:15:07 +01:00
fli
97fce623d5
Merge pull request #976 from bergwolf/synctime
factory: set guest time after resuming
2018-12-12 18:25:18 +08:00