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

Allow alternative runtimes for functions #169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexellis
Copy link
Member

Signed-off-by: Alex Ellis (OpenFaaS Ltd) [email protected]

Description

Allow alternative runtimes for functions

Motivation and Context

By setting FUNCTION_RUNTIME, in theory an alternative container
runtime could be used such as libkrun or kata. In practice,
other changes are required like using the VM network.

How Has This Been Tested?

Testing with: https://gist.github.com/alexellis/13ed0de2211e1ac9bd1cb5f8a7e19d47

Replace the binary downloaded for faasd with one you build yourself with make dist on a Linux x86_64 host with Go 1.15/1.16 installed

Types of changes

Temporary patch for testing.

By setting FUNCTION_RUNTIME, in theory an alternative container
runtime could be used such as libkrun or kata. In practice,
other changes are required like using the VM network.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
@alexellis
Copy link
Member Author

alexellis commented Mar 14, 2021

With kata - the first error I see is:

Unexpected status: 400, message: Unable to start task: uname2: stat binary:///usr/local/bin/faasd: no such file or directory: not found

Then I'm unable to get any further - I can't delete or exec into the container using ctr.

$ sudo journalctl -u containerd --no-pager

Mar 14 19:01:53 kata-ams1-t1-small-x86-02 kata[2521]: time="2021-03-14T19:01:53.486796408Z" level=warning msg="sandbox's cgroup won't be updated: cgroup path is empty" ID=uname2 sandbox=uname2 source=virtcontainers subsystem=sandbox
Mar 14 19:01:53 kata-ams1-t1-small-x86-02 kata[2521]: time="2021-03-14T19:01:53.486796408Z" level=warning msg="sandbox's cgroup won't be updated: cgroup path is empty" ID=uname2 sandbox=uname2 source=virtcontainers subsystem=sandbox
Mar 14 19:01:53 kata-ams1-t1-small-x86-02 containerd[1784]: time="2021-03-14T19:01:53.486796408Z" level=warning msg="sandbox's cgroup won't be updated: cgroup path is empty" ID=uname2 sandbox=uname2 source=virtcontainers subsystem=sandbox

Screenshot 2021-03-14 at 19 05 04

Upon trying to create a second container, it gives this error:

root@kata-ams1-t1-small-x86-02:~# faas-cli deploy --image ghcr.io/openfaas/alpine:latest --fprocess "uname -a" --name uname4
Unexpected status: 400, message: Failed to setup network for task "uname4-2936": container veth name provided (eth1) already exists: container veth name provided (eth1) already exists

I assume that's kata trying to be clever and create bridging adapters for the containers.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
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

Successfully merging this pull request may close these issues.

None yet

1 participant