Commit Graph

8384 Commits

Author SHA1 Message Date
Eric Ernst
c14080fd08
Merge pull request #3200 from likebreath/1203/upgrade_openapi_generator
virtcontainers: clh: Upgrade to openapi-generator v5.3.0
2021-12-03 14:15:51 -08:00
Bo Chen
995300260e virtcontainers: clh: Upgrade to openapi-generator v5.3.0
The latest release of openapi-generator v5.3.0 contains the fix for
`dropping err` bug [1]. This patch also re-generated the client code of
Cloud Hypervisor to have the bug fixed.

[1] https://github.com/OpenAPITools/openapi-generator/pull/10275

Fixes: #3201

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-12-03 08:55:38 -08:00
Steve Horsman
6f2d89ef6f
Merge pull request #3171 from stevenhorsman/skopeo-not-default
Stop skopeo being installed by default
2021-12-03 15:54:44 +00:00
Carlos Venegas
d02a0932d6
Merge pull request #3173 from liubin/fix/3172
agent: user container ID as watchable storage key for hashmap
2021-12-03 09:35:32 -06:00
stevenhorsman
bb66dbdccc osbuilder: Stop skopeo being installed by default
With the new rust image pull service skopeo we can parameterise whether to build
and install skopeo and turn it off by default if we don't need
signature verification support

Fixes: #3170

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-12-03 14:53:39 +00:00
stevenhorsman
95ab38ae54 doc: Stop skopeo being installed by default
With the new rust image pull service skopeo we can parameterise whether to build
and install skopeo and turn it off by default if we don't need
signature verification support

Fixes: #3170

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-12-03 14:53:39 +00:00
Jakob Naucke
389bbcb183 kata-deploy: Support separate Skopeo spec
The initrd build process now supports facultatively installing Skopeo
while still installing Umoci. Mirror this change in the respective
kata-deploy process.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-03 14:53:39 +00:00
Fabiano Fidêncio
3fdc97e110
Merge pull request #3183 from fengwang666/nonroot-vhost-bug-fix
runtime: enable vhost-net for rootless hypervisor
2021-12-03 10:42:50 +01:00
Jakob Naucke
af91084887
Merge pull request #3151 from liangzhou121/osbuilder-dev-1
CCv0|osbuilder: integrate AA's EAA KBC into ubuntu rootfs image
2021-12-03 09:37:29 +01:00
Bin Liu
86d9d2eed5
Merge pull request #3169 from Kvasscn/kata_dev_add_install_go_help
packaging: add help information for '-f' option in install_go.sh
2021-12-03 14:39:05 +08:00
Feng Wang
b3bcb7b251 runtime: enable vhost-net for rootless hypervisor
vhost-net is disabled in the rootless kata runtime feature, which has been abandoned since kata 2.0.
I reused the rootless flag for nonroot hypervisor and would like to enable vhost-net.

Fixes #3182

Signed-off-by: Feng Wang <feng.wang@databricks.com>
2021-12-02 21:55:31 -08:00
Bin Liu
4b57548838
Merge pull request #3181 from egernst/topic/clean-lint
Cleanup some unused variables, definitions
2021-12-03 11:06:42 +08:00
Eric Ernst
7cb7b9d5ba agent: remove unused field in mount handling
In our parsing of mountinfo, majority of the fields are unused.
Let's stop saving these.

Fixes: #3180

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-12-02 17:03:46 -08:00
Eric Ernst
f6ae15826e agent: drop unused fields from network
We don't utilize routes or inteface vectors. Let's drop them.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-12-02 17:03:41 -08:00
Chelsea Mafrica
cb4bf486ef
Merge pull request #3179 from likebreath/1202/clh_v20.0
Upgrade to Cloud Hypervisor v20.0
2021-12-02 15:31:14 -08:00
Bo Chen
4756a04b2d virtcontainers: clh: Re-generate the client code
This patch re-generates the client code for Cloud Hypervisor v19.0.
Note: The client code of cloud-hypervisor's (CLH) OpenAPI is
automatically generated by openapi-generator [1-2].

[1] https://github.com/OpenAPITools/openapi-generator
[2] https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/pkg/cloud-hypervisor/README.md

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-12-02 12:09:12 -08:00
Bo Chen
0bf4d2578a versions: Upgrade to Cloud Hypervisor v20.0
Highlights from the Cloud Hypervisor release v20.0: 1) Multiple PCI
segments support (now support up to 496 PCI devices); 2) CPU pinning; 3)
Improved VFIO support; 4) Safer code; 5) Extended documentation; 6) Bug
fixes.

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

Fixes: #3178

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-12-02 12:09:05 -08:00
GabyCT
6edddcced9
Merge pull request #3175 from GabyCT/topic/limitations
docs: Update limitation document regarding docker swarm
2021-12-02 12:03:36 -06:00
Gabriela Cervantes
647082b2c8 docs: Update limitation document regarding docker swarm
This PR removes the information about docker swarm and docker compose
as currently for kata 2.0 we have not support for docker swarm and docker
compose and the links and references that the document is referring are
currently not part of kata 1.0

Fixes #3174

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-12-02 16:38:13 +00:00
bin
39b35d0073 agent: user container ID as watchable storage key for hashmap
Use sandbox ID as the key will cause the failed containers' storage
leak.

Fixes: #3172

Signed-off-by: bin <bin@hyper.sh>
2021-12-02 23:28:25 +08:00
Bin Liu
4895015eac
Merge pull request #3166 from fengwang666/dax-bug-fix
runtime: Enable FUSE_DAX kernel config for DAX
2021-12-02 16:08:06 +08:00
zhanghj
1e6f58e562 packaging: add help information for '-f' option in install_go.sh
add help info for force install, and remove unused '-p' option.

Fixes: #3168

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2021-12-02 02:58:12 -05:00
Bin Liu
3992d28f00
Merge pull request #3152 from liubin/fix/3140-create-empty-dir
agent: copy empty directories for watchable-bind mounts
2021-12-02 14:46:25 +08:00
zhouliang121
365acda643 CCv0|osbuilder: add EAA KBC into ubuntu rootfs
Integrate EAA KBC into ubuntu rootfs image.
Fix build failure if build with AA_KBC=eaa_kbc option.

Fixes: #3167
Signed-off-by: zhouliang121 <liang.a.zhou@linux.alibaba.com>
2021-12-02 12:07:45 +08:00
Arron Wang
263bbe937f osbuilder: Add build dependency for openssl and protobuf
The openssl-sys crate will automatically detect:
https://docs.rs/openssl/0.10.16/openssl/#automatic

Signed-off-by: Arron Wang <arron.wang@intel.com>
2021-12-01 23:42:50 +01:00
Samuel Ortiz
378a4ce7a2 workflow: Fix Rust vendoring step for git crates
The CI runner fails to clone the git crates as it probably is confused
about its CARGO_HOME value. That prevents vendoring to succeed as the
runner has nothing to copy over to the vendoring code.

We fix that by temporarily setting CARGO_HOME to tmpfs, only for the
vendoring step. It's hackish.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2021-12-01 23:42:50 +01:00
Arron Wang
3454785c9b uevent: Fix clippy warning
unneeded `return` statement

Signed-off-by: Arron Wang <arron.wang@intel.com>
2021-12-01 23:42:50 +01:00
Samuel Ortiz
77ba9dcdbb versions: Update to Rust 2021 edition
We use tonic to build GRPC client to talk with attestation agent,
and tonic require newer version of rust.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2021-12-01 23:42:50 +01:00
Arron Wang
48ecac3c98 image_rpc: replace colon with underline for image store path
':' will have special meaning for umoci during upack, then we
do not use it as part of the image store path

Signed-off-by: Arron Wang <arron.wang@intel.com>
2021-12-01 23:42:50 +01:00
Arron Wang
7a1085fb74 image_rpc: Add rustified image pulling/decryption
Fixes: #3041

Signed-off-by: Arron Wang <arron.wang@intel.com>
2021-12-01 23:42:50 +01:00
Arron Wang
6237b9991c image_rpc: Fix the image store path
the "latest" is the tag info, real data will store in image_oci directory

Fixes: #3041

Signed-off-by: Arron Wang <arron.wang@intel.com>
2021-12-01 23:42:50 +01:00
bin
2af95bc536 agent: create directories for watchable-bind mounts
In function `update_target`, if the updated source is a directory,
we should create the corresponding directory.

Fixes: #3140

Signed-off-by: bin <bin@hyper.sh>
2021-12-02 06:31:03 +08:00
Feng Wang
6105e3ee85 runtime: enable FUSE_DAX kernel config for DAX
Otherwise DAX device cannot be set up.

Fixes #3165

Signed-off-by: Feng Wang <feng.wang@databricks.com>
2021-12-01 13:38:57 -08:00
GabyCT
45854147d0
Merge pull request #3164 from GabyCT/topic/fixconfigtoml
runtime: Update comments for virtcontainers to use kata 2.0
2021-12-01 12:19:26 -06:00
Gabriela Cervantes
591d4af1ea runtime: Update comments for virtcontainers to use kata 2.0
This PR updates the comments in the configuration.toml to point to
the current kata containers repository instead of the kata 1.x.

Fixes #3163

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-12-01 16:16:46 +00:00
Steve Horsman
855878b803
Merge pull request #3133 from stevenhorsman/CCv0
CCv0: Merge main into `ccv0`
2021-12-01 14:45:37 +00:00
Fupan Li
87f350db53
Merge pull request #3125 from jodh-intel/update-rust-crate-versions
Update rust crate versions
2021-12-01 18:00:33 +08:00
James O. D. Hunt
bc7fde2096
Merge pull request #3154 from GabyCT/topic/removedebian
osbuilder: Remove debian as a rootfs
2021-12-01 09:29:02 +00:00
Jakob Naucke
f740f97bed kata-deploy: Support CCv0
For the initrd build, add makeopts for $SKOPEO_UMOCI and $AA_KBC. Use
the $INCLUDE_ROOTFS variable to specify a directory of files that should
be recursively merged into the guest.

Fixes: #3126
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-01 08:58:04 +01:00
Jakob Naucke
69d157f78b CCv0: Use Ubuntu as base for initrd
As discussed in #2908, Ubuntu is used as a base for CCv0 for building
umoci in the guest. Currently, CCv0 only works with initrd, so this only
applies to initrd.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-01 08:58:04 +01:00
Gabriela Cervantes
923e098db6 osbuilder: Remove debian as a rootfs
Currently we do not have debian as part of the kata CI as we
do not have a mantainer, this PR removes debian as a supported
rootfs in order to have only the distros that we are supporting
and mantainining.

Fixes #3153

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-11-30 19:31:33 +00:00
James O. D. Hunt
afb96c0044 agent: Wrap remaining nix errors with anyhow
Wrap `nix` `Error`'s in an `anyhow` error for consistency with the way
`rustjail` handles errors.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-30 13:26:15 +00:00
James O. D. Hunt
aba572e01d rustjail: Wrap remaining nix errors with anyhow
Replace `Result` values that use a "bare" `nix` `Error` like this:

```rust
return Err(nix::Error::EINVAL.into());
```

... to the following which wraps the nix` error in an `anyhow` call for
consistency with the other errors returned by `rustjail`:

```rust
return Err(anyhow!(nix::Error::EINVAL));
```

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-30 13:24:04 +00:00
James O. D. Hunt
30d6007893 uevent: Fix clippy issue in test code
Remove a bare `return` from a test function. This looks wrong but isn't
because the callers are all tests that just wait for a state change
caused by this test function.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-30 12:58:15 +00:00
James O. D. Hunt
4a2be13c60 agent: Upgrade nix version for security fix
Running `cargo audit` showed that the `nix` package for the agent and
the `rustjail` and `vsock-exporter` local crates need to be updated to
resolve rust security issue
[RUSTSEC-2021-0119](https://rustsec.org/advisories/RUSTSEC-2021-0119).
Hence, bumped `nix` to the latest version (which required changes to
work with the new, simpler `errno` handling).

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-30 12:58:15 +00:00
James O. D. Hunt
256d5008dc agent: Update crate versions
Run `cargo update` to update to the latest crate dependency versions.

The agent is an application so this includes expanding the partially
specified semvers to full semver values for the following crates,
which makes those crates consistent with the other agent dependencies:

- `futures`
- `regex`
- `scan_fmt`
- `tokio`

Fixes: #3124.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-30 12:58:15 +00:00
James O. D. Hunt
13257986ae agent-ctl: Update rust lockfile
Ran `cargo update` to bump crate versions.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-30 12:58:15 +00:00
James O. D. Hunt
4ebdd424de forwarder: Update rust lockfile
Ran `cargo update` to bump crate versions.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-30 12:58:15 +00:00
James O. D. Hunt
6007322daa agent: Fixed invalid error message
Remove the format specifier in the `"failed to get VFIO group"` error
returned by `vfio_device_handler()`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-30 12:58:15 +00:00
Fabiano Fidêncio
3e3e3a0253
Merge pull request #3149 from fidencio/2.4.0-alpha0-branch-bump
# Kata Containers 2.4.0-alpha0
2021-11-29 20:24:19 +01:00