Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move call of the prestart hooks over to the lib part #60

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/containerd-shim-wasm/src/sandbox/shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,10 @@ where

debug!("create done");

// Per the spec, the prestart hook must be called as part of the create operation
debug!("call prehook before the start");
oci::setup_prestart_hooks(&spec.hooks())?;

Ok(api::CreateTaskResponse {
pid: std::process::id(),
..Default::default()
Expand Down
3 changes: 0 additions & 3 deletions crates/wasmedge/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ impl Instance for Wasi {
debug!("preparing module");
let spec = load_spec(self.bundle.clone())?;

debug!("call prehook before the start");
oci::setup_prestart_hooks(spec.hooks())?;

let vm = prepare_module(engine, &spec, stdin, stdout, stderr)
.map_err(|e| Error::Others(format!("error setting up module: {}", e)))?;

Expand Down
3 changes: 0 additions & 3 deletions crates/wasmtime/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ impl Instance for Wasi {
debug!("preparing module");
let spec = load_spec(self.bundle.clone())?;

debug!("call prehook before the start");
oci::setup_prestart_hooks(spec.hooks())?;

let m = prepare_module(engine.clone(), &spec, stdin, stdout, stderr)
.map_err(|e| Error::Others(format!("error setting up module: {}", e)))?;

Expand Down