runwasi
runwasi copied to clipboard
Daemon cannot start under shared mode
I followed the building instructions and installed the runwasi tools locally. The make check
and mae test
executed successfully.
vagrant@vagrant:~/runwasi$ make check
cargo fmt --all -- --check
cargo clippy --all --all-targets -- -D warnings
Finished dev [unoptimized + debuginfo] target(s) in 0.35s
Then I tried to use shared mode executing containerd-wasmedged
to start daemon, but it errored as,
vagrant@vagrant:~/runwasi$ containerd-wasmedged
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Others("ENOENT: No such file or directory")', crates/containerd-shim-wasmedge/src/bin/containerd-wasmedged/main.rs:19:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Is it my mistake in operation or are there indeed some bugs? Thanks for attention.
Could you please check the containerd
log and paste them here?
Could you please check the
containerd
log and paste them here?
Hi Mossaka,
I hadn't used containerd
to invoke containerd-wasmedged
. The later is an executable in /usr/local/bin/
.
Ah okay I misread it. I can verify that I could reproduce this error locally. Honestly I am not familiar with how the shared mode is implemented / used.
It looks like when you executed the binary, it tried to bind a socket at unix:///run/io.containerd.wasmwasi.v1/manager.sock
which was not found.
@cpuguy83 do you know this issue?
Try mkdir /run/io.containerd.wasmwasi.v1/
Try
mkdir /run/io.containerd.wasmwasi.v1/
That worked! I sucessfully started the containerd-wasmedged
after mkdir.
But now another problem is that when I started the daemon and executeed
sudo ctr run --rm --runtime=io.containerd.wasmedged.v1 ghcr.io/containerd/runwasi/wasi-demo-app:latest testwasm /wasi-demo-app.wasm echo 'hello'
,
it will timeouted and errored like,
ctr: failed to dial "/run/containerd/containerd.sock": context deadline exceeded
Could you please help me solve this?
Did you make sure that containerd is running in the background?
Sorry that I didn't start containerd by systemctl.
Then I started it and could execute sudo ctr run --rm --runtime=io.containerd.wasmedge.v1 ghcr.io/containerd/runwasi/wasi-demo-app:latest testwasm /wasi-demo-app.wasm echo 'hello'
in Normal mode and received the expected result ("hello\nexiting"
).
After that, I executed sudo containerd-wasmedged
in one bash and sudo ctr run --rm --runtime=io.containerd.wasmedged.v1 ghcr.io/containerd/runwasi/wasi-demo-app:latest testwasm /wasi-demo-app.wasm echo 'hello'
(for Shared mode) in another, but they all stuck.
Does Shared mode work well in your side? I don't know if I mistake something.
@Mossaka any update on shared-mode?
@macko99 we have not had a ton of time to put toward shared-mode at this point, and have been looking to redesign the functionality using the containerd sandboxer APIs rather than the current design. If anyone is interested in hacking on the current shared-mode functionality, we'd gladly review PRs.
I think the next step for shared-mode is to create a new proposal for how we'd implement it using the containerd sandboxer APIs, then implement that proposal after we gain some consensus.