Commit Graph

5350 Commits

Author SHA1 Message Date
Edmond AK Dantes
a6221a74e7 qemu: upgrade qemu version to 5.1.0 for arm64.
Now, the qemu version used in arm is so old. As some new features have merged
in current qemu, so it's time to upgrade it. As obs-packaging has been removed,
I put the qemu patch under qemu/patch/5.1.x.
As vxfs has been Deprecated in qemu-5.1, it will be no longer exist in
configuration-hyperversior.sh when qemu version larger than 5.0.

Fixes: #816
Signed-off-by: Edmond AK Dantes <edmond.dantes.ak47@outlook.com>
2020-09-30 22:40:49 +08:00
Julio Montes
d68d850ac4
Merge pull request #830 from YchauWang/update-docs-2.0-2
Packaging: release notes script using error kernel path urls
2020-09-30 09:35:23 -05:00
Peng Tao
ec09971d8e
Merge pull request #794 from c3d/bug/793-bad-match
rust-agent: Replaces improper use of match for non-constant patterns
2020-09-30 20:39:45 +08:00
Peng Tao
414b906e9c
Merge pull request #747 from Kvasscn/fix-warning-in-device-manager-test
devices: fix go test warning in manager_test.go
2020-09-30 20:37:20 +08:00
Bin Liu
ae72ba5cb6
Merge pull request #688 from jodh-intel/2.0-dev-action-improve-line-length-check
action: Allow long lines if non-alphabetic
2020-09-30 15:47:53 +08:00
Ychau Wang
f30b86f131 Packaging: release notes script using error kernel path urls
2.0 Packaging runtime-release-notes.sh script is using 1.x Packaging
kernel urls. Fix these urls to 2.0 branch Packaging urls.

Fixes: #829

Signed-off-by: Ychau Wang <wangyongchao.bj@inspur.com>
2020-09-30 14:47:46 +08:00
Bin Liu
ad7b1ff5ad
Merge pull request #820 from Tim-Zhang/mark-unreachable
Indicates never return function and remove unreachable code
2020-09-30 13:59:30 +08:00
Julio Montes
a7faeaac51 docs: fix broken links
Some sections and files were removed in a previous commit,
remove all reference to such sections and files to fix the
check-markdown test.

fixes #826

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-29 14:08:40 -05:00
Julio Montes
c32af06fc6
Merge pull request #825 from lifupan/2.0-dev
agent: propagate the internal detail errors to users
2020-09-29 12:12:34 -05:00
fupan.lfp
4501c25a46 agent: propagate the internal detail errors to users
It's should propagate the detail errors to users when
the rpc call failed.

Fixes: #824

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-09-30 00:01:23 +08:00
Fabiano Fidêncio
3360fb343f
Merge pull request #628 from fidencio/wip/update-install-information
Update Installation Guide to better reflect the current state of the project
2020-09-29 17:30:47 +02:00
Peng Tao
3dcd611a3b
Merge pull request #822 from chavafg/topic/ci-tests-clone-fix
ci: fix clone_tests_repo function
2020-09-29 23:18:54 +08:00
Fabiano Fidêncio
eaf0338b18
Merge pull request #813 from bpradipt/ppc64le-make
agent: Set LIBC=gnu for ppc64le arch by default
2020-09-29 16:28:19 +02:00
Peng Tao
496ac0a4f5
Merge pull request #516 from liubin/feature/472-integrate-fc-metrics
fc: integrate Firecracker's metrics
2020-09-29 21:30:37 +08:00
Salvador Fuentes
1984e635de ci: fix clone_tests_repo function
We should not checkout to 2.0-dev branch in the clone_tests_repo
function when running in Jenkins CI as it discards changes from
tests repo.

Fixes: #818.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-09-29 08:56:11 -04:00
Pradipta Kr. Banerjee
02c1a59f6d agent: Set LIBC=gnu for ppc64le arch by default
Fixes: #812

Signed-off-by: Pradipta Kr. Banerjee <pradipta.banerjee@gmail.com>
2020-09-29 09:36:45 +00:00
Tim Zhang
7019e72c7b agent: remove unreachable code
The code in the end of init_child is unreachable and need to be removed.
The code after do_exec is unreachable and need to be removed.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-09-29 15:51:59 +08:00
Tim Zhang
942999edb9 agent: Change do_exec return type to ! because it will never return
Indicates unreachable code.

Fixes #819

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-09-29 15:50:54 +08:00
Peng Tao
9b2eaeeff0
Merge pull request #787 from wainersm/static_build_qemu
Fix to qemu experimental and improvements
2020-09-29 10:26:23 +08:00
Bin Liu
46f420a9dc
Merge pull request #811 from bergwolf/runtime-check
ci: resurrect travis static checkers
2020-09-28 15:23:50 +08:00
Bin Liu
7e7d4c8cea
Merge pull request #814 from bergwolf/agent-mount
agent: fix UT failures due to chdir
2020-09-28 15:22:35 +08:00
bin liu
757dfa70e6 fc: integrate Firecracker's metrics
Firecracker expose metrics through fifo file
and using a JSON format. This PR will parse the
Firecracker's metrics and convert to Prometheus metrics.

Fixes: #472

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-28 15:20:02 +08:00
Peng Tao
b03d958e2f gitignore: ignore agent service file
As it is auto-generated.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 14:16:11 +08:00
Peng Tao
64b4f69847 agent: fix UT failures due to chdir
Current working directory is a process level resource. We cannot call
chdir in parallel from multiple threads, which would cause cwd confusion
and result in UT failures.

The agent code itself is correct that chdir is only called from spawned
child init process. Well, there is one exception that it is also called
in do_create_container() but it is safe to assume that containers are
never created in parallel (at least for now).

Fixes: #782
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 14:09:22 +08:00
Peng Tao
85d22301e9 runtime: fix TestNewConsole UT failure
It needs root.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:02:56 +08:00
Peng Tao
e90e9a2c9b travis: skip static checker for ppc64
As we have already run it on x64.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:01:07 +08:00
Peng Tao
5611283ec5 runtime: fix golint errors
Need to run gofmt -s on them.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:01:07 +08:00
Peng Tao
daf2a54dc8 agent: fix cargo fmt
Otherwise travis fails.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:01:07 +08:00
Peng Tao
c05c4ba5e7 ci: always checkout 2.0-dev of test repository
We use 2.0-dev in the tests repository now. Always make sure
we use the right branch.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:01:07 +08:00
Peng Tao
1569b3b32a docs: fix static check errors
Somehow we are not running static checks for a long time.
And that ended up with a lot for errors.

* Ensure debug options are valid is dropped
* fix snap links
* drop extra CONTRIBUTING.md
* reference kata-pkgsync
* move CODEOWNERS to proper place
* remove extra CODE_OF_CONDUCT.md.
* fix spell checker error on Developer-Guide.md

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:01:03 +08:00
Peng Tao
df3119b679 runtime: fix make check
Need to use the correct script path.

Fixes: #802
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 10:24:49 +08:00
Hui Zhu
fb12fff4d8
Merge pull request #808 from lifupan/2.0-dev
agent: Only allow proc mount if it is procfs
2020-09-28 10:09:47 +08:00
Peng Tao
5596eaa31d
Merge pull request #441 from liubin/feature/245-add-debug-console
kata 2.0: add debug console service
2020-09-28 10:06:13 +08:00
Peng Tao
ac6f020c6c
Merge pull request #697 from keloyang/destroy
runtime: Call s.newStore.Destroy if globalSandboxList.addSandbox
2020-09-27 16:30:24 +08:00
Peng Tao
b20ca6334b
Merge pull request #733 from cailca/732
shimv2: add a comment in checkAndMount()
2020-09-27 16:29:51 +08:00
bin liu
484a595f1a runtime: add enable_debug_console configuration item for agent
Set enable_debug_console=true in Kata's congiguration file,
runtime will pass `agent.debug_console`
and `agent.debug_console_vport=1026` to agent.

Fixes: #245

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-27 15:04:59 +08:00
bin liu
febdf8f68c runtime: add debug console service
Add `kata-runtime exec` to enter guest OS
through shell started by agent

Fixes: #245

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-27 10:57:17 +08:00
zhanghj
07d339c788 devices: fix go test warning in manager_test.go
Create "class" and "config" file in temporary device BDF dir,
and remove dir created  by ioutil.TempDir() when test finished.

fixes: #746

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2020-09-26 20:46:12 -04:00
Christophe de Dinechin
a4afe3af33 rust-agent: Replaces improper use of match for non-constant patterns
The code used `match` as a switch with variable patterns `ev_fd` and
`cf_fd`, but the way Rust interprets the code is that the first
pattern matches all values. The code does not perform as expected.

This addresses the following warning:

   warning: unreachable pattern
      --> rustjail/src/cgroups/notifier.rs:114:21
       |
   107 |                     ev_fd => {
       |                     ----- matches any value
   ...
   114 |                     cg_fd => {
       |                     ^^^^^ unreachable pattern
       |
       = note: `#[warn(unreachable_patterns)]` on by default

Fixes: #750
Fixes: #793

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-09-25 14:48:26 +02:00
Bin Liu
740c45ac61
Merge pull request #800 from Kvasscn/rust-version-bump-test
osbuilder: specify default toolchain verion in rust-init
2020-09-25 17:49:01 +08:00
fupan.lfp
acaa806cc7 agent: Only allow proc mount if it is procfs
This only allows some whitelists files bind mounted under proc
and prevent other malicious mount to procfs.

Fixes: #807

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-09-25 15:00:07 +08:00
Peng Tao
594519d883
Merge pull request #790 from likebreath/upgrade_clh_v0.10.0
runtime: Update CLH client pkg to version v0.10.0
2020-09-25 11:51:11 +08:00
zhanghj
ca501e5478 osbuilder: specify default toolchain verion in rust-init.
Specify default toolchain version in rust-init.

Fixes: #799

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2020-09-24 23:20:43 -04:00
James O. D. Hunt
0351732778 action: Allow long lines if non-alphabetic
Overly long commit lines are annoying. But sometimes,
we need to be able to force the use of long lines
(for example to reference a URL).

Ironically, I can't refer to the URL that explains this
because of ... the long line check! Hence:

```sh
$ cat <<EOT | tr -d '\n'; echo
See: https://github.com/kata-containers/tests/tree/master/
cmd/checkcommits#handling-long-lines
EOT
```

Maximum body length updated to 150 bytes for parity with:

https://github.com/kata-containers/tests/pull/2848

Fixes: #687.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-09-24 15:32:38 +01:00
Christophe de Dinechin
8cdccedfb3
Merge pull request #792 from dgibson/bug791
agent/oci: Don't use deprecated Error::description() method
2020-09-24 11:49:06 +02:00
fupan.lfp
33513fb49b rustjail: make the mount error info much more clear
Make the invalid mount destination's error info much
more clear.

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-09-24 17:48:53 +08:00
David Gibson
45b0b4ede0 agent/oci: Don't use deprecated Error::description() method
We shouldn't use it, and we don't need to implement it.

fixes #791

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-09-24 18:26:50 +10:00
James O. D. Hunt
ce9a4eeffd
Merge pull request #784 from jodh-intel/2.0-dev-fix-linter-errors
runtime: Fix linter errors in release files
2020-09-24 08:40:19 +01:00
Bo Chen
a34478ffa5 runtime: Update cloud-hypervisor client pkg to version v0.10.0
The latest release of cloud-hypervisor v0.10.0 contains the following
updates: 1) `virtio-block` Support for Multiple Descriptors; 2) Memory
Zones; 3) `Seccomp` Sandbox Improvements; 4) Preliminary KVM HyperV
Emulation Control; 5) various bug fixes and refactoring.

Note that this patch updates the client code of clh's HTTP API in kata,
while the 'versions.yaml' file was updated in an earlier PR.

Fixes: #789

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-09-23 17:37:34 -07:00
Bo Chen
952b9fe856
Merge pull request #762 from likebreath/fix_clh_ci
packaging: Build from source if the clh release binary is missing
2020-09-23 13:46:24 -07:00