Commit Graph

4802 Commits

Author SHA1 Message Date
Salvador Fuentes
84d2bacc74
Merge pull request #2604 from amshinde/update-virtiofs-kernel
versions: Switch to virtio-fs-dev branch for kernel
2020-04-14 12:04:06 -05:00
Graham Whaley
0fe23c85c2
Merge pull request #2591 from darfux/change_log_outpipe_to_rdwr
v2: Open log fifo with `RDWR` instead of `WRONLY`
2020-04-14 14:40:20 +01:00
Jia He
7e22144664 scripts: Disable pie for qemu when static building
--enable-pie is not compatible with --static option for qemu building.
Without this patch, it will report a configure error during static building:

ERROR: static and pie are mutually incompatible

Fixes: #982

Signed-off-by: Jia He <justin.he@arm.com>
2020-04-14 14:48:21 +08:00
Fabiano Fidêncio
ab8050c5e0 kata_agent: Don't use dax if virtio_fs_cache is 0
If always using dax, even if virtio_fs_cache is 0, the following error
would happen:

```
[root@f32 runtime]# podman run --security-opt label=disable  --runtime=/usr/local/bin/kata-runtime --rm -id fedora sh
Error: rpc error: code = Internal desc = Could not mount kataShared to /run/kata-containers/shared/containers/: invalid argument: OCI runtime error
```

Fixes: #2464

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-04-13 14:22:52 -07:00
Fabiano Fidêncio
6218b2a558 kata_agent: Remove sharedDirVirtioFSOptions
Although in the earlier stages of development those FUSE client mount
options were needed, when virtiofs got merged the default option values
were baked into virtiofs.ko.

Those options are not only unneeded, but they'd also cause issues when
trying to run recent enough kernels, as shown below:
```
[root@f32 runtime]# podman run --security-opt label=disable  --runtime=/usr/local/bin/kata-runtime --rm -id fedora sh
Error: rpc error: code = Internal desc = Could not mount kataShared to /run/kata-containers/shared/containers/: invalid argument: OCI runtime error
```

Fixes: #2464

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-04-13 14:22:52 -07:00
Fabiano Fidêncio
95ccc0f759 agent: Use "virtiofs" instead of "virtio_fs"
virtio_fs was the name used for the module in the very early stages of
its development.

Fixes: #2462

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-04-13 14:22:52 -07:00
Archana Shinde
4c1cacd31d versions: Switch to virtio-fs-dev branch for kernel
This includes a newer kernel and necessary overlay changes
that fix oustanding issue for running docker in docker using
overlay.

Depends-on: github.com/kata-containers/agent#738
Depends-on: github.com/kata-containers/shim#233

Fixes #2603

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-04-13 14:22:52 -07:00
Li Yuxuan
8e0f891ebc v2: Open log fifo with RDWR instead of WRONLY
The container log fifo is opened as `O_WRONLY` now. When the read side
of fifo is closed temporarily such as restarting contaienrd, write to
`tty.Stdout` will get an EPIPE error and finally cause `io.CopyBuffer`
return. Then `ioCopy` closes the tty io and exits. Thus after containerd
restarted, the log fifo can't be reopened. The container will be blocked
forever after stdout/stderr buffer is full.

Opening the log fifo with `RDWR` instead of `WRONLY` avoids the fifo
returning EPIPE when the read side is closed, and keeps the fifo open
until the reader reopening it.

Fixes: #2590

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2020-04-10 14:58:56 +08:00
James O. D. Hunt
af24829c2a
Merge pull request #2600 from nitkon/master
qemu-ppc64le: Switch off large decrementer capability
2020-04-09 11:30:54 +01:00
James O. D. Hunt
f13b4f582f
Merge pull request #627 from dong-liuliu/xliu2/spdk-vhost-user
Revise use-case of Using-SPDK-vhostuser-and-kata.md
2020-04-09 10:49:40 +01:00
James O. D. Hunt
d71d5e1e54
Merge pull request #639 from amshinde/add-versions-for-privileged
privileged: Add containerd and crio versions.
2020-04-09 10:49:04 +01:00
Your Name
afbd03cf01 qemu-ppc64le: Switch off large decrementer capability
Large decrementer was introduced in Power 9 cpus.
Switch it off "cap-large-decr=off" as not all KVM hosts
support it

Fixes: #2599

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2020-04-09 00:04:57 -05:00
Archana Shinde
e5046cc0ef privileged: Add containerd and crio versions.
Add containerd and crio versions that support
`privileged_without_host_devices` behaviour.

Fixes #638

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-04-08 16:11:11 -07:00
Salvador Fuentes
367c2ac068
Merge pull request #1005 from jodh-intel/fix-patch-ordering
kernel: Fix patch ordering
2020-04-08 12:55:28 -05:00
GabyCT
c07f20637d
Merge pull request #636 from GabyCT/topic/fixopensuse
docs: Fix opensuse installation guide
2020-04-08 10:51:51 -05:00
Jose Carlos Venegas Munoz
432f9bea6e clh: virtiofs: Add no_posix_lock option
This will allow lock operations, needed by programs like
`apt-get upgrade`.

Fixes: #2594

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-04-08 14:54:56 +00:00
James O. D. Hunt
93da14508f kernel: Fix patch ordering
Fix the `build-kernel.sh` script to sort patches correctly. Previously,
it relied on `find(1)` for the ordering. However, `find(1)` does not
guarantee any ordering of files within a directory. Since the ordering
could therefore be "random", it was quite possible for patches to be
applied in the wrong order, resulting in conflicts.

Fixes: #1003.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-04-08 14:21:36 +01:00
Jose Carlos Venegas Munoz
02d8ec0bf8
Merge pull request #2593 from chavafg/topic/update-golang-version
versions: Update go to 1.13.9
2020-04-07 18:05:51 -05:00
Gabriela Cervantes
832aaea1ad docs: Fix opensuse installation guide
This PR fixes the opensuse installation guide, it solves the issue of
having an extra empty space at the end of the distro name which is causing
a failure when we want to add the kata containers obs repository as we
are looking for http://download.opensuse.org/repositories/home:/katacontainers:/releases:/x86_64:/master/openSUSE_Leap_15.1%20/
which is non existing and it is giving us an error of Valid metadata not found at specified URL.
This PR replaces the URL for a correct one.

Fixes #635

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-04-07 14:56:38 -05:00
Archana Shinde
9a3a226184
Merge pull request #632 from jcvenegas/docs-pkg-test
release: docs: Add information about package testing
2020-04-07 11:51:56 -07:00
Salvador Fuentes
0294fcb992 versions: Update go to 1.13.9
Update golang to 1.13.9 in versions.yaml.
In addition, add same golang version to `.travis.yml` and
delete the call to `.ci/install_go.sh` as it started to
cause problems in travis CI.

Fixes: #2592.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-07 13:04:59 -05:00
James O. D. Hunt
ed13991f2d
Merge pull request #1002 from GabyCT/topic/removeupdate
tests: Remove performing updates in Fedora dockerfile
2020-04-07 15:03:50 +01:00
Yang Bo
c0dc7676e0
Merge pull request #179 from lifupan/fix_potentianl_crash
Fix potentianl crash
2020-04-07 19:58:52 +08:00
Jose Carlos Venegas Munoz
ab14b29116 release: docs: Add information about package testing
A basic testing can be done using jenkins pipeline.

Fixes: #631

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-04-06 21:01:35 +00:00
Gabriela Cervantes
59f7678f94 tests: Remove performing updates in Fedora dockerfiles
For obs and running the packages testing in Fedora, we need to remove
the performing of doing an update as it is hit by
https://github.com/kata-containers/runtime/issues/2580. This is needed
to unblock the errors in the testing.

Fixes #1001

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-04-06 12:07:11 -05:00
Graham Whaley
c5a5ac9e45
Merge pull request #576 from bergwolf/annotations
howto: add sandbox config annotation howto
2020-04-06 16:16:42 +01:00
Graham Whaley
dce8d66a30
Merge pull request #999 from wilsonianb/fix-k3s
kata-deploy: fix k3s containerd check
2020-04-06 14:20:49 +01:00
Brandon Wilson
96f3b99c7a
kata-deploy: fix k3s containerd check
The default k3s containerRuntimeVersion takes the form of:
containerd://1.3.3-k3s2

The awk was stripping away the k3s portion before checking if it was a
k3s containerd.

fixes #996

Signed-off-by: Brandon Wilson <brandon@coil.com>
2020-04-03 16:38:01 -05:00
Jose Carlos Venegas Munoz
6e398f7c71
Merge pull request #2585 from nitkon/QemuCapablity
qemu_ppc64le: EXpose fs support explicitly
2020-04-03 09:52:42 -06:00
Julio Montes
2b92007a5c
Merge pull request #2583 from fidencio/wip/virtiofsd_not_present
qemu: Don't crash if virtiofsd path is non existent
2020-04-03 09:21:14 -06:00
Archana Shinde
2f07ec9100
Merge pull request #2503 from rhatdan/selinux
Add SELinux support for running VM Confinement
2020-04-03 07:58:58 -07:00
Fabiano Fidêncio
fd625b3fc5 qemu: Don't crash if virtiofsd path is non existent
Instead, report an error and exit gracefully, as shown below:
```
dahmer fidencio # podman run -ti --runtime=/usr/bin/kata-runtime fedora sh
Error: virtiofsd path (/usr/libexec/virtiofsd) does not exist: OCI runtime error
```

Fixes: #2582

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-04-03 15:44:06 +02:00
Nitesh Konkar
5eec8bdf9d qemu_ppc64le: EXpose fs support explicitly
Since fs sharing is not assumed as supported by default, expose
explicitly that the qemu_ppc64le supports it.

Fixes: #2584

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2020-04-03 19:08:04 +05:30
Daniel J Walsh
e4eb553d12
virtcontainers: Add SELinux support for running VM Confinement
We want to launch the KVM launcher tool (qemu?) with an SELinux label, similar
to what we do with libvirt.

Currently when I use kata with Podman, it complains if we specify a label that
kata does not support SELinux labels. What I would like to do is have kata just
use this label to apply to the KVM launcher. Then I will work to generate a new
policy type (container_kvm_t) that will allow the KVM Launcher tool to do its
thing, but prevent breakout.

Fixes: #2501

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-02 09:19:45 -04:00
Liu Xiaodong
688c88a60f use-cases: avoid binding PCI in using-vhost-user
By default, SPDK's setup.sh will bind PCI devices to
userspace from kernel. This may confuse beginners.
So add PCI_WHITELIST="none" to blacklist all PCI devices.

Fixes: #626

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-04-02 09:13:07 -04:00
Liu Xiaodong
2c6cb39e07 use-cases: add version notice in using vhost-user
Fixes: #626

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-04-02 09:13:07 -04:00
Liu Xiaodong
4faf21e80d use-cases: revise config on vhost-user device
Configure parameter "enable_vhost_user_store" is
added as an indicator to enable vhost-user storage
device assignment.
Also notice user hugepage should be enabled for
SPDK vhost target currently.

Fixes: #626

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-04-02 09:13:07 -04:00
Liu Xiaodong
77fb011bd1 use-cases: re-edit words in using-spdk-vhost-user
Sentences for how to do host setup for vhost-user devices
were not clear, so re-edit them.

Fixes: #626

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-04-02 09:13:02 -04:00
fupan.lfp
ba3c732f86 grpc: fix the issue of potential crashes
It's better to check whether the sandbox's get_container
result instead of unwrap it directly, otherwise it would
crash the agent if the conainer id is invalid.

Fixes: #178

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-04-02 18:58:24 +08:00
fupan.lfp
32431d701c rpc: fix the issue of kill container process
When kill a process, if the exec id is empty, then
it means to kill all processes in the container, if
the exec id isn't empty, then it will only kill the
specific exec process.

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-04-02 17:58:46 +08:00
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