Julio Montes
8130d9b2dd
agent/rustjail: don't use unwrap in container::oci_state
...
replace unwrap with `match` statements, this way we can write
unit tests that don't panic
Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-10-27 09:28:38 -06:00
Julio Montes
5d111071be
rustjail: add mock implementation for cgroup manager
...
Only root is able to create and manipulate cgroups, this mock
implementation of a cgroup manager can used in unit testing.
Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-10-27 09:28:38 -06:00
James O. D. Hunt
157dd041b2
Merge pull request #895 from Apokleos/dev
...
agent: Update build instructions
2020-10-27 14:54:51 +00:00
James O. D. Hunt
583ed55680
Merge pull request #1027 from knittl/feature/kata-subcommands-aliases
...
cli: Provide aliases for kata-* subcommands and options
2020-10-27 09:58:05 +00:00
Tim Zhang
d1987f392d
Merge pull request #1018 from c3d/bug/1017-missing-makefile-variable
...
runtime: Restore QEMUVIRTIOFSPATH variable in Makefile
2020-10-27 11:33:05 +08:00
LiYa'nan
e3eff0eb15
agent: Update build instructions
...
Fix the instructions explaining how to build the agent from source now that make needs to be run to auto-generate some source files.
Fixes : #889 .
Signed-off-by: LiYa'nan <oliverliyn@gmail.com>
2020-10-27 01:19:21 +00:00
Peng Tao
f77937de35
Merge pull request #1025 from wainersm/static_build_qemu_patches
...
Use apply_patches.sh in qemu and kernel scripts
2020-10-26 18:23:41 +08:00
Bin Liu
43770b28da
Merge pull request #1029 from bergwolf/agent-proto
...
clean up agent proto files
2020-10-26 17:06:18 +08:00
Peng Tao
0896ce80a4
agent: update proto file copyright
...
Now that it is Ant Group...
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-26 16:03:47 +08:00
Peng Tao
6e9ca45732
agent: generate proto files properly
...
Need to generate all protos.
Depends-on: github.com/kata-containers/tests#3006
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-25 11:27:00 +08:00
Peng Tao
837343f08a
agent-ctl: update cargo.lock
...
Just compiling would show that the cargo.lock file is not updated.
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-25 10:58:27 +08:00
Peng Tao
b316661818
runtime: remove the unused proto files
...
These are moved to the agent and no longer needed.
Fixes : #1028
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-25 10:57:38 +08:00
Peng Tao
54e23c8302
agent: move gogo.proto out of the github.com namespance
...
To follow the same namespace scope as other proto files.
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-25 10:44:53 +08:00
Peng Tao
583e6ed3e5
agent: types.pb.go is not regenerated
...
When types.proto was relocated, types.pb.go is not regenerated and still
references the old location.
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-25 10:35:35 +08:00
Peng Tao
74a155c65b
Merge pull request #1023 from lifupan/fix_stdio
...
agent: fixes the permissions of PID 1's STDIO
2020-10-25 10:21:11 +08:00
Daniel Knittl-Frank
bb19fcb936
docs: Update documentation with new subcommand forms
...
Remove the old subcommands from the documentation and replace them with
the new form (without the redundant `kata-` prefix).
Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
2020-10-24 15:28:54 +02:00
Daniel Knittl-Frank
d2fe709174
cli: Use new subcommand forms in kata-manager script
...
Update the `kata-manager` script to call the new subcommand forms
without `kata-` prefix.
Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
2020-10-24 15:27:32 +02:00
Daniel Knittl-Frank
4d9ab0cd21
cli: Support new subcommand forms in bash completion
...
Support new `check` and `env` subcommands in bash completion.
Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
2020-10-24 15:27:32 +02:00
Daniel Knittl-Frank
c5d355e1ff
cli: Remove kata-
prefix from env and check subcommands
...
Provide the subcommands `kata-env` and `kata-check` as `env` and `check`
respectively.
Fixes #1011
Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
fixup! cli: Add aliases to kata-env and kata-check commands
2020-10-24 15:25:17 +02:00
Peng Tao
063e8bd801
Merge pull request #1010 from liubin/feature/1004-add-version-for-kata-monitor
...
Feature/1004 add version for kata monitor
2020-10-24 11:13:22 +08:00
Peng Tao
fba181088b
Merge pull request #1021 from Tim-Zhang/autogen-proto
...
agent: Generate proto files programmatically
2020-10-24 11:12:24 +08:00
LiYa'nan
f134b4a301
agent: Update build instructions
...
Fix the instructions explaining how to build the agent from source now that make needs to be run to auto-generate some source files.
Fixes : #889
Signed-off-by: LiYa'nan <oliverliyn@gmail.com>
2020-10-24 03:06:41 +00:00
Archana Shinde
e833e3ba39
Merge pull request #1002 from jodh-intel/2.0-dev-unbreak-fc-config
...
runtime: Fix firecracker config
2020-10-23 13:34:27 -07:00
Tim Zhang
9e9988df29
agent/protocols: Move agent.proto out of the mock folder of agent
...
Because the repos have been merged and the agent repo will be removed in the future,
we do not need mock the file structure any more.
Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-10-23 15:19:35 +08:00
fupan.lfp
e90aa7b417
agent: fixes the permissions of PID 1's STDIO
...
Fix the permissions of PID 1's STDIO within the container to
the specified user.
The ownership needs to match because it is created outside of the
container and needs to be localized.
Fixes : #1022
Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-10-23 11:06:53 +08:00
Archana Shinde
f92a4c288d
Merge pull request #913 from YchauWang/update-docs-2.0-4
...
docs: remove the 1.x version description about shim and proxy
2020-10-22 16:52:06 -07:00
Archana Shinde
5f0b83cc54
Merge pull request #1000 from jongwu/pci
...
arm64: correct bridge type for QEMUVIRT
2020-10-22 13:53:27 -07:00
Wainer dos Santos Moschetta
b9b281e76d
packaging: Use apply-patches.sh in build-kernel.sh
...
Calls apply-patches.sh in kernel/build-kernel.sh to apply the
kernel patches.
Fixes #1014
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2020-10-22 13:45:14 -04:00
Wainer dos Santos Moschetta
163e61045a
packaging: Make qemu/apply_patches.sh common
...
Moved the qemu/apply_patches.sh to the common scripts directory and
refactor it so that it can be used as a generic and consistent way
to apply patches.
Fixes #1014
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2020-10-22 13:43:44 -04:00
Wainer dos Santos Moschetta
d4cf3057a9
packaging: qemu/apply_patches.sh should sort the patches
...
Changed apply_patches.sh script so that patches are sorted before
they be applied.
Fixes #1014
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2020-10-22 13:41:15 -04:00
bin liu
5b065eb599
runtime: change govmm package
...
Change govmm package name from github.com/intel/govmm
to github.com/kata-containers/govmm
Fixes : #859
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-22 21:27:49 +08:00
Tim Zhang
9cb4150777
agent/protocols: Fix copyright header checking
...
Caused by: bb718ba1dd
Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-10-22 16:17:24 +08:00
Tim Zhang
0d58d91959
agent/protocols: Stop generate agent proto files in the shellscript
...
Because the job has been done by build.rs.
Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-10-22 16:12:21 +08:00
Tim Zhang
7559382b15
agent/protocols: Ignore generated files and remove these files from repo
...
Files generated by build.rs does not need to be stored in repo.
Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-10-22 16:12:21 +08:00
Tim Zhang
fdc33fb7bf
agent/protocols: Generate proto files programmatically
...
Build proto with build.rs
Fixes : #1019
Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-10-22 16:12:15 +08:00
Peng Tao
710a4f3b76
Merge pull request #1007 from devimc/2020-10-20/ghactions/snap-release
...
snap: add GH actions jobs to release the snap package
2020-10-22 11:52:21 +08:00
bin liu
f1c3bf6b58
runtime: let kata-collect-data.sh collect kata-monitor info
...
Collect kata-monitor version in kata-collect-data.sh
Fixes : #1004
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-22 10:32:55 +08:00
bin liu
993a8da3aa
kata-monitor: add version subcommand
...
This add a subcommand/options for `kata-monitor` command.
Fixes : #1004
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-22 10:32:47 +08:00
Fupan Li
074b5332aa
Merge pull request #977 from liubin/fix/951-clear-clippy-warnings
...
agent: clear clippy warnings
2020-10-22 09:36:45 +08:00
Christophe de Dinechin
4ee78120e6
runtime: Restore QEMUVIRTIOFSPATH variable in Makefile
...
Due to a bad edit / fixup in commit be6ee2550d
, the variable
QEMUVIRTIOFSPATH was incorrectly removed from the makefile.
This problem was found by the 1.x CI checks, see
https://github.com/kata-containers/runtime/pull/3005#issuecomment-712887125
Fixes : #1017
Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-10-21 14:35:37 +02:00
bin liu
df4ce9fab7
ci: add cargo clippy
for agent
...
To run `cargo clippy`, this commit includes changes:
- add a new Makefile target to run `cargo clippy`
- move `make`/`make check` to last step to let a fast retrun if `fmt`/`clippy` failed
Fixes : #951
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:14:17 +08:00
bin liu
2e13878880
agent: clear match_like_matches_macro/vec_resize_to_zero warnings
...
This commit fix these warnings for Rust v1.47.0:
- match_like_matches_macro
- vec_resize_to_zero
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:13:25 +08:00
bin liu
227edfdc9f
agent: clear module_inception/type_complexity warnings
...
To clear these two warnings, this commit did changes:
- add `#![allow(clippy::module_inception)]` to target files
- use type alias for tuple of `(MessageHeader, Vec<u8>)`
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:03:16 +08:00
bin liu
698d25b7ee
agent: clear redundant_field_names clippy warning
...
add `#![allow(clippy::redundant_field_names)]` can skip check
`protocols` package, and fix redundant_field_names in other
packages.
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:03:16 +08:00
bin liu
4dd9bd7aba
agent: clear clippy len_zero
warnings
...
Use `.is_empty()` instead of `.len() == 0`, `.len() >0`
and `.len() != 0`
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:03:16 +08:00
bin liu
bf7dec5c4f
agent: clear clippy warnings
...
This commit clears clippy warings for agent package.
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:03:16 +08:00
bin liu
56f867ee74
rustjail: clear clippy warnings
...
This commit clears clippy warings for rustjail package.
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 14:54:51 +08:00
bin liu
16757ad490
oci: clear clippy warnings
...
This commit clears clippy warings for oci package.
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 14:54:51 +08:00
bin liu
f32f49bdb7
logging: clear clippy warnings
...
This commit contains two changes:
- clear clippy warnigns
- add pkg/logging/Cargo.lock to .gitignore
Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 14:54:51 +08:00
Fupan Li
8c3228c286
Merge pull request #976 from Tim-Zhang/simplify-ttrpc-error
...
agent: simplify ttrpc error construction
2020-10-21 10:31:40 +08:00