Commit Graph

8143 Commits

Author SHA1 Message Date
Bin Liu
f622d9491f
Merge pull request #3253 from stevenhorsman/agent-config-cmdline
agent: Refactor command line parsing to use a framework
2022-01-05 20:25:57 +08:00
Bin Liu
59ec112337
Merge pull request #3355 from lifupan/main
move the oci and protocols crates from agent to upper libs
2022-01-05 20:19:59 +08:00
Fupan Li
615224e993 agent: move the protocols to upper libs
move the protocols to upper libs thus it can
be shared between agent and other rust runtime.

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

Fixes: #3348

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2022-01-05 16:58:06 +08:00
Fupan Li
330e3dcc93 agent: move the oci crate to upper libs
Move the oci crate to upper libs thus it can be
shared between agent and other rust runtimes.

Fixes: #3348

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2022-01-05 16:58:06 +08:00
Bin Liu
3339ba90cf
Merge pull request #3382 from GabyCT/topic/updateupgradingdoc
docs: Remove word duplication
2022-01-05 14:50:26 +08:00
Bin Liu
b2166560fa
Merge pull request #3375 from zhaojizhuang/debianrootfs
osbuilder: Restore Debian as a rootfs
2022-01-05 10:27:47 +08:00
Eric Ernst
7b03d78f15 vendor: update to containerd v1.6.0-beta.4
Update our containerd vendoring. In particular, we're interested in
grabbing the updated annotation definitions for defining sandbox sizing.

- go get github.com/containerd/containerd@v1.6.0-beta.4
- edit go.mod to remove containerd v1.5.8 replacement directive
- go mod vendor
- go mod tidy

Fixes: #3276

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2022-01-04 17:15:17 -08:00
GabyCT
caa4e89dfc
Merge pull request #3366 from Kvasscn/kata_dev_fix_kata-collect-data_typo
runtime: fix a typo in kata-collect-data.sh
2022-01-04 17:03:34 -06:00
Bo Chen
1f581a0405 versions: Upgrade to Cloud Hypervisor v20.2
This is a bug release from Cloud Hypervisor addressing the following
issues: 1) Don't error out when setting up the SIGWINCH handler (for
console resize) when this fails due to older kernel; 2) Seccomp rules
were refined to remove syscalls that are now unused; 3) Fix reboot on
older host kernels when SIGWINCH handler was not initialised; 4) Fix
virtio-vsock blocking issue.

Details can be found: https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v20.2

Fixes: #3383

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-01-04 14:37:35 -08:00
Gabriela Cervantes
623d8f086a docs: Remove word duplication
This PR removes a word duplication in the Upgrading documentation.

Fixes #3381

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-01-04 15:58:50 +00:00
James O. D. Hunt
a838a598ef
Merge pull request #3354 from liubin/fix/3353-return-error-details
agent: return detail error message for RPC calls from shim
2022-01-04 14:06:25 +00:00
stevenhorsman
1c4edb9619 agent: Refactor arg parsing to use clap
Fixes: #3284

Co-authored-by: Samuel Ortiz <samuel.e.ortiz@protonmail.com>
Co-authored-by: stevenhorsman <steven@uk.ibm.com>

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-01-04 09:14:08 +00:00
zhaojizhuang
3093f93a6f osbuilder: Restore Debian as a rootfs
Restore Debian as a rootfs.
1. revert of #3154, but some change
2. update debian version to 10.11
3. update  `libstdc++-6-dev` to `libstdc++-8-dev`
4.  changes discarded in QAT are not restored

Fixes: #3372
Signed-off-by: zhaojizhuang <571130360@qq.com>
2022-01-04 11:54:34 +08:00
Bin Liu
883b0d1dc3
Merge pull request #2840 from optimistyzy/1014_fix_vhost_nvme
use-cases: clarify SPDK vhost-user-nvme target status in using-spdk-v…
2022-01-04 11:42:15 +08:00
Ziye Yang
073a345908 use-cases: clarify vhost-user-nvme status in using-spdk-vhost-user
SPDK vhost-user-nvme target is removed from SPDK 21.07 release since
upstreamed QEMU version does not support. Fixes this usage.

Fixes #3371

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2021-12-31 02:24:59 +00:00
Fupan Li
ea1a173854 agent: fix the issue of creating new namespaces for agent
The tokio's spawn will only create an future async task
instead of a new real thread, thus executing unshare to
create a new namespace in tokio's async task would make
the agent process to join in the new created namespace,
which isn't expected.

Thus, we'd better to to the unshare in a real thread to
prevent moving the agent process into a new namespace.

Fixes: #3369

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2021-12-30 13:32:22 +08:00
Wainer Moschetta
820dc930db
Merge pull request #3109 from wainersm/delint_dockerfiles
Delint dockerfiles
2021-12-28 10:11:51 -03:00
zhanghj
2254fa8657 runtime: fix a typo in kata-collect-data.sh
Fix a typo while to check if mountpoint exist.

Fixes: #3365

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2021-12-28 10:03:18 +08:00
Shengjing Zhu
2d0f9d2d06 vc: remove swagger binary
Fixes: #3362

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2021-12-25 22:41:29 +08:00
bin
cf91307c66 agent: return detail error message for rpc calls from shim
For calls from shim to agent, the return error will be processed like this:

match self.do_start_container(req).await {
    Err(e) => Err(ttrpc_error(ttrpc::Code::INTERNAL, e.to_string())),
    Ok(_) => Ok(Empty::new()),
}

The e.to_string() return only a part of the error(for example set by context()),
this may lead lack of information.

The `format!("{:?}", err)` will return more info.

Fixes: #3353

Signed-off-by: bin <bin@hyper.sh>
2021-12-24 17:17:29 +08:00
Fupan Li
0fe20854e7
Merge pull request #2481 from Bevisy/main-1494
Makefile: update `make go-test` call
2021-12-24 09:57:06 +08:00
James O. D. Hunt
302c7c34f3
Merge pull request #3137 from t3hmrman/docs/2474-add-dind-how-to
docs: add how-to on DinD in Kata
2021-12-23 12:24:36 +00:00
James O. D. Hunt
ba22a04265
Merge pull request #2958 from ManaSugi/ignore-unknown-systemcall
agent: Ignore unknown seccomp system calls
2021-12-23 12:12:47 +00:00
Peng Tao
8b6fbf9108
Merge pull request #3331 from dubek/mount-remove-var
agent: mount: Remove unneeded mount_point local variable
2021-12-23 11:53:14 +08:00
Peng Tao
65343b3fdc
Merge pull request #3337 from Jakob-Naucke/cgroups-main
docs: Fix outdated links
2021-12-23 11:40:32 +08:00
Peng Tao
08367643dc
Merge pull request #3339 from Jakob-Naucke/spell-kernel-readme
docs: Fix kernel configs README spelling errors
2021-12-23 11:40:09 +08:00
Jakob Naucke
137e217b85
docs: Fix outdated k8s link
in virtcontainers readme

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-22 19:40:25 +01:00
Jakob Naucke
55bac67ac6
docs: Fix kernel configs README spelling errors
- `fragments` in backticks
- s/perfoms/performs/

Fixes: #3338
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-22 18:57:47 +01:00
Jakob Naucke
205420d21b
docs: Replicate branch rename on runtime-spec
renamed branch `master` to `main`

Fixes: #3336
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-22 18:15:01 +01:00
Fabiano Fidêncio
562fc73769
Merge pull request #3297 from jodh-intel/cargo-audit-fixes
security: Update rust crate versions
2021-12-22 16:10:10 +01:00
Dov Murik
91abebf92e agent: mount: Remove unneeded mount_point local variable
We already have a `mount_path` local Path variable which holds the mount
point.

Use it instead of creating a new `mount_point` variable with identical
type and content.

Fixes: #3332

Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
2021-12-22 14:11:50 +02:00
James O. D. Hunt
b1f4e945b3 security: Update rust crate versions
Update the rust dependencies that have upstream security fixes. Issues
fixed by this change:

- [`RUSTSEC-2020-0002`](https://rustsec.org/advisories/RUSTSEC-2020-0002) (`prost` crate)
- [`RUSTSEC-2020-0036`](https://rustsec.org/advisories/RUSTSEC-2020-0036) (`failure` crate)
- [`RUSTSEC-2021-0073`](https://rustsec.org/advisories/RUSTSEC-2021-0073) (`prost-types` crate)
- [`RUSTSEC-2021-0119`](https://rustsec.org/advisories/RUSTSEC-2021-0119) (`nix` crate)

This change also includes:

- Minor code changes for the new version of `prometheus` for the agent.

- A *downgrade* of the version of the `futures` crate to the (new)
  latest version (`0.3.17`) since version `0.3.18` was removed [1].

Fixes: #3296.

[1] - See https://crates.io/crates/futures/versions

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-22 07:41:16 +00:00
Fabiano Fidêncio
ee66155a72
Merge pull request #3271 from Jakob-Naucke/kata-manager-static
kata-manager: Retrieve static tarball
2021-12-21 16:09:50 +01:00
Fabiano Fidêncio
67f0ab4092
Merge pull request #3294 from Kvasscn/kata_dev_osbuilder_makefile
osbuilder: avoid to copy versions.txt which already deprecated
2021-12-21 16:07:01 +01:00
Wainer dos Santos Moschetta
d79268ac65 tools/packaging: add copyright to kata-monitor's Dockerfile
The kata-monitor's Dockerfile was added by Eric Ernst on commit 2f1cb7995f
but for some reason the static checker did not catch the file misses the copyright statement
at the time it was added. But it is now complaining about it. So this assign the copyright to
him to make the static-checker happy.

Fixes #3329
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-21 10:01:11 -05:00
Fabiano Fidêncio
79153c3845
Merge pull request #3288 from gkurz/qemu-disable-libudev
qemu: Disable libudev for QEMU 5.2 and newer
2021-12-21 15:56:16 +01:00
Wainer dos Santos Moschetta
428cf0a685 packaging: delint tests dockerfiles
Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following
ignored rules:
  - "DL3008 warning: Pin versions in apt get install"
  - "DL3041 warning: Specify version with `dnf install -y <package>-<version>`"
  - "DL3033 warning: Specify version with `yum install -y <package>-<version>`"
  - "DL3048 style: Invalid label key"
  - "DL3003 warning: Use WORKDIR to switch to a directory"
  - "DL3018 warning: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>"
  - "DL3037 warning: Specify version with zypper install -y <package>[=]<version>"

Fixes #3107
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-21 09:54:44 -05:00
Wainer dos Santos Moschetta
1ea9b70383 packaging: delint kata-deploy dockerfiles
Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following
ignored rules:
  - "DL3008 warning: Pin versions in apt get install"
  - "DL3041 warning: Specify version with `dnf install -y <package>-<version>`"
  - "DL3033 warning: Specify version with `yum install -y <package>-<version>`"
  - "DL3048 style: Invalid label key"
  - "DL3003 warning: Use WORKDIR to switch to a directory"
  - "DL3018 warning: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>"
  - "DL3037 warning: Specify version with zypper install -y <package>[=]<version>"

Fixes #3107
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-21 09:54:44 -05:00
Wainer dos Santos Moschetta
3669e1b6d9 ci/openshift-ci: delint dockerfiles
Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following
ignored rules:
  - "DL3008 warning: Pin versions in apt get install"
  - "DL3041 warning: Specify version with `dnf install -y <package>-<version>`"
  - "DL3033 warning: Specify version with `yum install -y <package>-<version>`"
  - "DL3048 style: Invalid label key"
  - "DL3003 warning: Use WORKDIR to switch to a directory"
  - "DL3018 warning: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>"
  - "DL3037 warning: Specify version with zypper install -y <package>[=]<version>"

Fixes #3107
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-21 09:54:44 -05:00
Wainer dos Santos Moschetta
aeb2b673b3 osbuilder: delint dockerfiles
Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following
ignored rules:
  - "DL3008 warning: Pin versions in apt get install"
  - "DL3041 warning: Specify version with `dnf install -y <package>-<version>`"
  - "DL3033 warning: Specify version with `yum install -y <package>-<version>`"
  - "DL3048 style: Invalid label key"
  - "DL3003 warning: Use WORKDIR to switch to a directory"
  - "DL3018 warning: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>"
  - "DL3037 warning: Specify version with zypper install -y <package>[=]<version>"

Fixes #3107
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-21 09:54:44 -05:00
Wainer dos Santos Moschetta
bc120289ec packaging: delint kata-monitor dockerfiles
Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following
ignored rules:
  - "DL3008 warning: Pin versions in apt get install"
  - "DL3041 warning: Specify version with `dnf install -y <package>-<version>`"
  - "DL3033 warning: Specify version with `yum install -y <package>-<version>`"
  - "DL3048 style: Invalid label key"
  - "DL3003 warning: Use WORKDIR to switch to a directory"
  - "DL3018 warning: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>"
  - "DL3037 warning: Specify version with zypper install -y <package>[=]<version>"

Fixes #3107
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-21 09:54:44 -05:00
Wainer dos Santos Moschetta
bc71dd5812 packaging: delint static-build dockerfiles
Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following
ignored rules:
  - "DL3008 warning: Pin versions in apt get install"
  - "DL3041 warning: Specify version with `dnf install -y <package>-<version>`"
  - "DL3033 warning: Specify version with `yum install -y <package>-<version>`"
  - "DL3048 style: Invalid label key"
  - "DL3003 warning: Use WORKDIR to switch to a directory"
  - "DL3018 warning: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>"
  - "DL3037 warning: Specify version with zypper install -y <package>[=]<version>"

Fixes #3107
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-21 09:54:41 -05:00
Fabiano Fidêncio
aa7ba1741b
Merge pull request #3324 from fidencio/wip/add-protoc-to-alpine-image
osbuilder: Add protoc to the alpine container
2021-12-21 15:52:25 +01:00
Fabiano Fidêncio
99ef52a35d osbuilder: Add protoc to the alpine container
It seems the lack of protoc in the alpine containers is causing issues
with some of our CIs, such as the VFIO one.

Fixes: #3323

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2021-12-21 13:57:18 +01:00
Archana Shinde
ae271a7e7b
Merge pull request #3318 from jodh-intel/docs-agent-protoc
docs: Clarify where to run agent API generation commands
2021-12-21 00:28:01 -08:00
Peng Tao
b990868b11
Merge pull request #3302 from wainersm/static_qemu-partial_clone
packaging/qemu: partial git clone
2021-12-21 10:52:49 +08:00
James O. D. Hunt
c2578cd9a1 docs: Clarify where to run agent API generation commands
Make it clear when reading the table in the agent's "Change the agent
API" documentation that the commands in the "Generation method" column
should be run in the agent repo.

Fixes: #3317.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-20 15:45:36 +00:00
James O. D. Hunt
464d1a653e
Merge pull request #3312 from jodh-intel/docs-arch-fix-formatting
docs: Fix arch doc formatting
2021-12-20 14:04:36 +00:00
James O. D. Hunt
cd20bf95e9
Merge pull request #3315 from jodh-intel/ci-use-mirror-for-gnu.org
CI: Switch to a mirror as gnu.org is down
2021-12-20 11:53:14 +00:00
James O. D. Hunt
321995b7df CI: Switch to a mirror as gnu.org is down
All CI jobs are failing as www.gnu.org is down, so switch to a mirror
for the time being.

Fixes: #3314.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-20 11:22:56 +00:00