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

Ability to call specific modules in wasmtime no longer works #194

Closed
jsturtevant opened this issue Jul 21, 2023 · 3 comments
Closed

Ability to call specific modules in wasmtime no longer works #194

jsturtevant opened this issue Jul 21, 2023 · 3 comments

Comments

@jsturtevant
Copy link
Contributor

After switching to youki in #131, the ability to pass module names via the entry point no longer works. See a repo in https://github.com/containerd/runwasi/compare/main...jsturtevant:runwasi:specific-modules?expand=1

running 1 test
[2023-07-21T23:24:52Z ERROR libcontainer::process::container_init_process] executable ./hello.wat#foo for container process not found in PATH
[2023-07-21T23:24:52Z ERROR libcontainer::process::container_intermediate_process] failed to initialize container process: invalid executable: ./hello.wat#foo

Do we want to re-enable this? It is due to youki doing runtime checks when starting the container: https://github.com/containers/youki/blob/c3559e4a0aff56d63bcda80f35e7cf0b58ccacbe/crates/libcontainer/src/process/container_init_process.rs#L106-L117

@jsturtevant
Copy link
Contributor Author

pr that originally introduce this: https://github.com/containerd/runwasi/pull/102/files

@Mossaka
Copy link
Member

Mossaka commented Jul 29, 2023

I've raised this issue discussion first in the Slack chat. The following is just a repeat of what I said.

I went to the OCI Image Spec to checkout the specification of the entrypoints and it says they are

A list of arguments to use as the command to execute when the container starts. These values act as defaults and may be 
replaced by an entrypoint specified when creating a container.

My interpretation is that entrypoints are not strictly defined as executable binaries. In the case with runwasi, they could be functions in a Wasm module like ./hello.wat#foo. Thus, could we loose the requirement in libcontainer for verifying entrypoints? Specifically, could we make verify_binary optional?

@jsturtevant
Copy link
Contributor Author

This was fixed by #297 and each of the shims now has tests covering this after #306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants