mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-01 00:46:38 +00:00
CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0 Fixes: #5854 Signed-off-by: Megan Wright <megan.wright@ibm.com>
This commit is contained in:
@@ -49,14 +49,14 @@ Follow the [`kata-deploy`](../../tools/packaging/kata-deploy/README.md).
|
||||
|
||||
* Download `Rustup` and install `Rust`
|
||||
> **Notes:**
|
||||
> Rust version 1.58 is needed
|
||||
> Rust version 1.62.0 is needed
|
||||
|
||||
Example for `x86_64`
|
||||
```
|
||||
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
$ source $HOME/.cargo/env
|
||||
$ rustup install 1.58
|
||||
$ rustup default 1.58-x86_64-unknown-linux-gnu
|
||||
$ rustup install 1.62.0
|
||||
$ rustup default 1.62.0-x86_64-unknown-linux-gnu
|
||||
```
|
||||
|
||||
* Musl support for fully static binary
|
||||
|
@@ -459,6 +459,7 @@ impl AgentService {
|
||||
"signal process";
|
||||
"container-id" => cid.clone(),
|
||||
"exec-id" => eid.clone(),
|
||||
"signal" => req.signal,
|
||||
);
|
||||
|
||||
let mut sig: libc::c_int = req.signal as libc::c_int;
|
||||
|
@@ -200,12 +200,16 @@ impl RuntimeHandlerManager {
|
||||
}
|
||||
|
||||
pub async fn handler_message(&self, req: Request) -> Result<Response> {
|
||||
if let Request::CreateContainer(req) = req {
|
||||
if let Request::CreateContainer(container_config) = req {
|
||||
// get oci spec
|
||||
let bundler_path = format!("{}/{}", req.bundle, oci::OCI_SPEC_CONFIG_FILE_NAME);
|
||||
let bundler_path = format!(
|
||||
"{}/{}",
|
||||
container_config.bundle,
|
||||
oci::OCI_SPEC_CONFIG_FILE_NAME
|
||||
);
|
||||
let spec = oci::Spec::load(&bundler_path).context("load spec")?;
|
||||
|
||||
self.try_init_runtime_instance(&spec, &req.options)
|
||||
self.try_init_runtime_instance(&spec, &container_config.options)
|
||||
.await
|
||||
.context("try init runtime instance")?;
|
||||
let instance = self
|
||||
@@ -215,7 +219,7 @@ impl RuntimeHandlerManager {
|
||||
|
||||
let shim_pid = instance
|
||||
.container_manager
|
||||
.create_container(req, spec)
|
||||
.create_container(container_config, spec)
|
||||
.await
|
||||
.context("create container")?;
|
||||
|
||||
|
@@ -93,8 +93,8 @@ impl Container {
|
||||
|
||||
// update rootfs
|
||||
match spec.root.as_mut() {
|
||||
Some(spec) => {
|
||||
spec.path = rootfs
|
||||
Some(root) => {
|
||||
root.path = rootfs
|
||||
.get_guest_rootfs_path()
|
||||
.await
|
||||
.context("get guest rootfs path")?
|
||||
|
@@ -253,7 +253,7 @@ impl ContainerManager for VirtContainerManager {
|
||||
let c = containers
|
||||
.get(container_id)
|
||||
.ok_or_else(|| Error::ContainerNotFound(container_id.to_string()))?;
|
||||
c.update(&resource).await.context("stats")
|
||||
c.update(&resource).await.context("update_container")
|
||||
}
|
||||
|
||||
async fn pid(&self) -> Result<PID> {
|
||||
|
@@ -65,7 +65,7 @@ async fn send_event(
|
||||
&namespace,
|
||||
])
|
||||
.spawn()
|
||||
.context("sawn cmd")?;
|
||||
.context("spawn containerd cmd to publish event")?;
|
||||
|
||||
let stdin = child.stdin.as_mut().context("failed to open stdin")?;
|
||||
stdin
|
||||
|
@@ -40,7 +40,7 @@ where
|
||||
let r = req
|
||||
.try_into()
|
||||
.map_err(|err| ttrpc::Error::Others(format!("failed to translate from shim {:?}", err)))?;
|
||||
let logger = sl!().new(o!("steam id" => ctx.mh.stream_id));
|
||||
let logger = sl!().new(o!("stream id" => ctx.mh.stream_id));
|
||||
debug!(logger, "====> task service {:?}", &r);
|
||||
let resp = s
|
||||
.handler_message(r)
|
||||
|
2707
src/tools/kata-ctl/Cargo.lock
generated
2707
src/tools/kata-ctl/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,8 @@ thiserror = "1.0.35"
|
||||
privdrop = "0.5.2"
|
||||
nix = "0.25.0"
|
||||
|
||||
runtimes = { path = "../../runtime-rs/crates/runtimes" }
|
||||
|
||||
[target.'cfg(target_arch = "s390x")'.dependencies]
|
||||
reqwest = { version = "0.11", default-features = false, features = ["json", "blocking", "native-tls"] }
|
||||
|
||||
|
@@ -8,8 +8,18 @@ pub use arch_specific::*;
|
||||
|
||||
mod arch_specific {
|
||||
use anyhow::Result;
|
||||
use std::path::Path;
|
||||
|
||||
const KVM_DEV: &str = "/dev/kvm";
|
||||
|
||||
pub fn check() -> Result<()> {
|
||||
unimplemented!("Check not implemented in aarch64")
|
||||
println!("INFO: check: aarch64");
|
||||
if Path::new(KVM_DEV).exists() {
|
||||
println!("Kata Containers can run on this host\n");
|
||||
} else {
|
||||
eprintln!("WARNING: Kata Containers can't run on this host as lack of virtulization support\n");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user