Commit Graph

6795 Commits

Author SHA1 Message Date
Julio Montes
b4c45df885 runtime: tools/packaging/cmd/kata-pkgsync: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 12:09:54 -05:00
Julio Montes
aec530904b runtime: virtcontainers/utils: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 11:59:15 -05:00
Julio Montes
1e4f7faa77 runtime: virtcontainers/types: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 11:59:15 -05:00
Julio Montes
bb9495c0b7 runtime: virtcontainers/pkg: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 11:59:15 -05:00
Julio Montes
80ab91ac2f runtime: virtcontainers/persist: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 11:59:15 -05:00
Julio Montes
54bdd01811 runtime: virtcontainers/factory: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 11:59:15 -05:00
Julio Montes
dd58de368d runtime: virtcontainers/device: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 11:59:15 -05:00
Julio Montes
47d95dc1c6 runtime: virtcontainers: fix govet fieldalignment
Fix structures alignment

fixes #2271

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

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 11:59:15 -05:00
Julio Montes
8ca7a7c547 runtime: netmon: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 10:30:30 -05:00
Julio Montes
31de8eb75b runtime: pkg: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 10:30:30 -05:00
Julio Montes
2b80091e14 runtime: containerd-shim-v2: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 10:30:30 -05:00
Julio Montes
0dc59df68f runtime: cli: fix govet fieldalignment
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-20 10:30:30 -05:00
Jakob Naucke
54bcd3c946
Merge pull request #2284 from Jakob-Naucke/ci-expand-to-nothing
ci: expand $CI to nothing
2021-07-20 17:10:35 +02:00
Jakob Naucke
c10425233b
ci: expand $CI to nothing
PR #2252 put `set -o nounset` in `ci/lib.sh`. It turns out that this
won't work when `$CI` is unset (it is always set in CI). Expand `$CI` to
nothing.

Fixes: #2283
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-20 15:55:36 +02:00
Peng Tao
fd2607cc43
Merge pull request #2202 from teawater/swap7
Add swap support
2021-07-20 21:12:30 +08:00
Julio Montes
5512da1739
Merge pull request #2280 from YchauWang/wyc-arm-qemu
snap: fixed snap aarch64 qemu patches dir in snapcraft.yaml file
2021-07-20 07:33:39 -05:00
fupan.lfp
add480ed59 monitor: mv the monitor socket into sbs directory
Since the monitor socket used the unix socket path file,
which needed to be cleaned after the pod terminated,
thus put it into the sandbox data directory, and it
would be cleaned up once the sandbox termianted.

Fixes: #2269

Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com>
2021-07-20 19:10:01 +08:00
Fabiano Fidêncio
75c5edd66a
Merge pull request #2263 from eryugey/eryugey/for-main
agent: clear MsFlags if the option has clear flag set
2021-07-20 12:50:45 +02:00
Jakob Naucke
67906b4876
Merge pull request #2250 from Jakob-Naucke/remove-qemu-snap
snap: Remove QEMU before clone
2021-07-20 11:28:32 +02:00
hspease99
f7c6f17060 docs: added a glossary to support SEO tactics
This commit is a result of Assisted PR Process for PR #1515.  It
deviates from it in that the original commits were not retained as the
original commit structure was unnecessarily complex - the same commit
was added to two parallel branches which were then merged, producing the
same result in the end as any of the original two non-merge commits.
Also, a squash was requested by an original PR review.

Other changes to the original PR were changing capitalisation of the word
"Kubelet" in Glossary.md to placate spell checker and fixing link names and
syntax.

The original commit message follows:

The terms added are: Kata Containers, container software, container
runtime interface, virtual machine software, container virtualization,
container security solutions, serverless containers, pod containers,
virtual machine monitor, private cloud, infrastructure architecture,
public cloud, and auto scaling.

Fixes: #1509

Signed-off-by: Helena Spease <helena@openstack.org>
Signed-off-by: Pavel Mores <pmores@redhat.com>
2021-07-20 11:22:58 +02:00
Jakob Naucke
1838c3a33b
Merge pull request #2277 from YchauWang/wyc-doc-dev
docs: fix minikube installation guide runtimeclasses error
2021-07-20 10:45:29 +02:00
snir911
259f0e26d1
Merge pull request #2274 from YchauWang/wyc-doc-test
docs: fixed kata-deploy path for kata logs with fluentd doc
2021-07-20 10:50:19 +03:00
wangyongchao.bj
a8649acfd0 snap: fixed snap aarch64 qemu patches dir in snapcraft.yaml file
fixed arm qemu patches dir in snap part. Clear the old `packaging/obs-packaging` path.

Fixes: #2279

Signed-off-by: wangyongchao.bj <wangyongchao.bj@inspur.com>
2021-07-20 15:24:42 +08:00
Bin Liu
6b00806bb8
Merge pull request #2243 from egernst/bump-tokio
agent/agent-ctl: update tokio to 1.8.1
2021-07-20 13:56:32 +08:00
wangyongchao.bj
3882619471 osbuilder: update centos arm rootfs image config 'GPG_KEY_ARCH_URL'
fix GPG_KEY_ARCH_URL config of centos's config_aarch64,
update to "http://mirror.centos.org/altarch/7/os/aarch64/RPM-GPG-KEY-CentOS-7".

Fixes: #2181

Signed-off-by: wangyongchao.bj <wangyongchao.bj@inspur.com>
2021-07-20 13:49:17 +08:00
wangyongchao.bj
c5fdc0dbb6 docs: fix minikube installation guide runtimeclasses error
the kata-deploy project scripts were changed, but minikube installation guide doc still use old yaml script.
fix guide doc use the new yaml script of runtimeClasses.

Fixes: #2276

Signed-off-by: wangyongchao.bj <wangyongchao.bj@inspur.com>
2021-07-20 13:39:06 +08:00
wangyongchao.bj
f2ef25c67f docs: fixed kata-deploy path for kata logs with fluentd doc
The kata-deploy project path has changed from kata v2. fixed kata-deploy path in the document how-to-import-kata-logs-with-fluentd.md.
The correct path is `$GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy`

Fixes: #2273

Signed-off-by: wangyongchao.bj <wangyongchao.bj@inspur.com>
2021-07-20 10:41:18 +08:00
Bin Liu
1b71d31121
Merge pull request #2252 from Jakob-Naucke/ci-nounset
ci: set -o nounset
2021-07-20 10:03:28 +08:00
Wainer Moschetta
6310f0543a
Merge pull request #2239 from wainersm/static_checks-improvements-2
static-checks: Add a make target to run static-checks locally
2021-07-19 14:25:23 -03:00
Hui Zhu
cb6b7667cd runtime: Add option "enable_guest_swap" to config hypervisor.qemu
This commit add option "enable_guest_swap" to config hypervisor.qemu.
It will enable swap in the guest. Default false.
When enable_guest_swap is enabled, insert a raw file to the guest as the
swap device if the swappiness of a container (set by annotation
"io.katacontainers.container.resource.swappiness") is bigger than 0.
The size of the swap device should be
swap_in_bytes (set by annotation
"io.katacontainers.container.resource.swap_in_bytes") - memory_limit_in_bytes.
If swap_in_bytes is not set, the size should be memory_limit_in_bytes.
If swap_in_bytes and memory_limit_in_bytes is not set, the size should be
default_memory.

Fixes: #2201

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-07-19 23:22:06 +08:00
Hui Zhu
a733f537e5 runtime: newContainer: Handle the annotations of SWAP
This commit add code to handle the annotations
"io.katacontainers.container.resource.swappiness" and
"io.katacontainers.container.resource.swap_in_bytes".
It will set the value of "io.katacontainers.resource.swappiness" to
c.config.Resources.Memory.Swappiness and set the value of
"io.katacontainers.resource.swap_in_bytes" to
c.config.Resources.Memory.Swap.

Fixes: #2201

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-07-19 23:20:46 +08:00
Hui Zhu
2c835b60ed ContainerConfig: Set ocispec.Annotations to containerConfig.Annotations
ocispec.Annotations is dropped in ContainerConfig.
This commit let it to be set to containerConfig.Annotations in
ContainerConfig.

Fixes: #2201

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-07-19 23:20:43 +08:00
Hui Zhu
243d4b8689 runtime: Sandbox: Add addSwap and removeSwap
addSwap will create a swap file, hotplug it to hypervisor as a special
block device and let agent to setup it in the guest kernel.
removeSwap will remove the swap file.

Just QEMU support addSwap.

Fixes: #2201

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-07-19 23:20:40 +08:00
Hui Zhu
e1b91986d7 runtime: Update golang proto code for AddSwap
Fixes: #2201

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-07-19 23:20:37 +08:00
Hui Zhu
4f066db8da agent: agent.proto: Add AddSwap
Add new fuction AddSwap.  When agent get AddSwap, it will get the device
name from PCIPath and set the device as the swap device.

Fixes: #2201

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-07-19 23:20:34 +08:00
Fabiano Fidêncio
11d84cca46
Merge pull request #2229 from lifupan/fix_virtiofsd
virtiofsd: fix the issue of missing stop virtiofsd
2021-07-19 13:34:59 +02:00
Jakob Naucke
4f23b8cd47
ci: set -o nounset
This avoids confusion e.g. when `$GOPATH` is unset.

Fixes: #2251
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-19 11:26:01 +02:00
Bin Liu
5737b36a35
Merge pull request #2175 from Rapiz1/patch-1
docs: Update containerd configuration format
2021-07-19 17:10:19 +08:00
Bin Liu
1da8fa1655
Merge pull request #2171 from liubin/feature/delete-golang-for-rootfs-builder
osbuilder: Skip installing golang for building rootfs
2021-07-19 17:06:57 +08:00
Bin Liu
1bb0705765
Merge pull request #2245 from liubin/2244-update-makefile-of-agent-ctl
agent-ctl: Use a common Makefile style like other components
2021-07-19 17:06:40 +08:00
Bin Liu
b94ebc30b4
Merge pull request #2235 from Tim-Zhang/vsock-exporter-async
vsock-exporter: switch to tokio runtime
2021-07-19 17:06:14 +08:00
Fabiano Fidêncio
462e445d2f
Merge pull request #2261 from ManaSugi/fix/oci-hooks-explanation
config: Fix description for OCI hooks
2021-07-19 10:38:16 +02:00
Fabiano Fidêncio
f8d71eb96b
Merge pull request #2253 from lifupan/fix_socket_address
shimv2: fix the issue of kata-runtime exec failed
2021-07-19 10:38:06 +02:00
Fabiano Fidêncio
a8a623fb75
Merge pull request #2257 from fidencio/wip/runtime-option-fix
shim-v2: Be compatible with the old runtime options
2021-07-19 08:05:01 +02:00
Eryu Guan
35cbc93dee agent: clear MsFlags if the option has clear flag set
'FLAGS' hash map has bool to indicate if the flag should be cleared or
not. But in parse_mount_flags_and_options() we set the flag even 'clear'
is true. This results in a 'rw' mount being mounted as 'MS_RDONLY'.

Fixes: #2262
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2021-07-19 11:50:10 +08:00
Manabu Sugimoto
ff87da721b config: Fix description for OCI hooks
- Update url for osbuilder
- Fix typo about poststart

Fixes: #2260

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-07-18 16:47:19 +09:00
Fabiano Fidêncio
fcc93b0074 shim-v2: Be compatible with the old runtime options
Seems that at least some versions of container, when using ConifgPath,
still rely on the runtime options and its APIs from the not in use
anymore github.com/containerd/cri-containerd/pkg/api/runtimeoptions/v1.

The fact backward compat breaks when moving from the old to the new
runtime options, which happened as part of f60641a6e6d, strongly feels
like a containerd bug.  Regardless, we can easily work this around on
our side without much hassle.

Just by importing old runtime options the unmarshalling doesn't break
anymore and we can easily check whether getting the options fails or not
and fallback to the old way if it does.

Fixes: #2258

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-07-18 00:07:57 +02:00
fupan.lfp
8e0daf6780 shimv2: fix the issue of kata-runtime exec failed
Commit 32c9ae1388 upgrade the
containerd vendor, which used the socket path to replace
the abstract socket address for socket listen and dial, and
there's an bug in containerd's abstract socket dialing.

Thus we should replace our monitor and exec socket server
with the socket path to fix this issue.

Fixes: #2238

Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com>
2021-07-16 11:41:09 +08:00
bin
b12b21f337 osbuilder: Skip installing golang for building rootfs
Building rootfs does not depend on golang, delete intalling
golang may save build time.

And there is only rust agent now, the code for golang agent should
be deleted too.

Fixes: #2170

Signed-off-by: bin <bin@hyper.sh>
2021-07-15 23:59:15 +08:00
Jakob Naucke
558f1be62d
snap: Remove QEMU before clone
If you snap in an environment where you previously snapped,
`git clone`ing QEMU will fail. Remove the checkout directory.

Fixes: #2249
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-15 12:22:21 +02:00