Open alannair opened 2 years ago
vSwarm functions' YAML files need to be modified in the following format to use firecracker MicroVMs instead of containers or gVisor VMs: https://github.com/ease-lab/vhive/blob/main/configs/knative_workloads/helloworld.yaml
See vHive Issue 68 (link is above).
@alannair could you add a note for this peculiarity to vSwarm's main README in a PR?
The yaml (eg. kn-aes-go.yaml
) files contain args such as addr and function-endpoint-url which are passed to the image. If we are to specify the image name and port env variables inside the stub image (as suggested), then how do we pass the args?
In addition, please clarify the following: The workaround involves running the function image within an external container that is configured to work with containerd. This external container is set up such that it initializes the image/port as per the respective environment variables. Is this correct?
@alannair the stub image does nothing although it runs in the same pod. The sole purpose of the stub container is to serve heartbeats coming from knative & k8s. Ultimately, we should make sure the target container serves those messages on its own but for that we need to investigate the problem further.
I think the env variables are set up for all containers. The arguments are just runtime arguments supplied to the command to run inside the target container.
@ustiugov I am able to deploy the functions by using the modified yaml format. Here is the modified aes-python manifest.
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: aes-python
namespace: default
spec:
template:
spec:
containers:
- image: crccheck/hello-world:latest # Stub image. See https://github.com/ease-lab/vhive/issues/68
ports:
- name: h2c # For GRPC support
containerPort: 50051
env:
- name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests
value: "50051"
- name: GUEST_IMAGE # Container image to use for firecracker-containerd container
value: "docker.io/vhiveease/aes-python:latest"
As you can see, I have skipped the args parameters which were passed to the target container in the original manifest.
Problem is, while I am able to deploy the function successfully, invocation fails.
Here is the output of ./invoker -port 80 -dbg -time 1 -rps 1
:
DEBU[2022-08-31T14:45:40.870005892-06:00] Debug logging is enabled
INFO[2022-08-31T14:45:40.870107586-06:00] Reading the endpoints from the file: endpoints.json
DEBU[2022-08-31T14:45:40.870262284-06:00] Invoking: aes-python.default.192.168.1.240.sslip.io:80
WARN[2022-08-31T14:45:40.891286725-06:00] Failed to invoke aes-python.default.192.168.1.240.sslip.io:80, err=rpc error: code = Unimplemented desc = Method not found!
DEBU[2022-08-31T14:45:40.891392746-06:00] Invoked aes-python.default.192.168.1.240.sslip.io in 21130 usec
INFO[2022-08-31T14:45:41.871316037-06:00] Issued / completed requests: 1, 0
INFO[2022-08-31T14:45:41.871380829-06:00] Real / target RPS: 0.00 / 1
INFO[2022-08-31T14:45:41.871401948-06:00] Experiment finished!
INFO[2022-08-31T14:45:41.871419873-06:00] The measured latencies are saved in rps0.00_lat.csv
I am speculating here, but this is probably because I did not pass the args to the target container (right?).
But the new manifest does not instantiate the target container. It just instantiates the stub.
Passing args to the stub container is futile.
Is there a workaround for this now?
@jingren1021 can you please specify for what exactly? If you refer to using vSwarm with Firecracker, then the YAML format changes are described above.
Sorry for the late response.
I encounter the following issue when trying to deploy the benchmark chained-function-serving and also aes (these are the only 2 benchmarks I have attempted to deploy). As a representative example, I will include the details pertaining to aes here.
Steps to reproduce the issue
I used the vSwarm-u profile on CloudLab to reproduce the issue on. Set up a single-node cluster as shown in the vHive quick-start guide and pull all the required images
Ensure that
kubectl get pods -A
shows all pods' status as Running or Completed (if not, wait till that happens). Now deploy a function. As a representative, we shall attempt to deploy kn-aes-go.which gives the output
The Error
A
CreateContainerError
is encountered in one of the containers.outputs (first line shown here)
For the 3 containers user-container-0, user-container-1 and queue-proxy, here are the outputs of
kubectl logs aes-go-00001-deployment-86749dbdf9-qcrzc -c ${CONTAINER_NAME}
in that order:Therefore it is the queue-proxy container that generates the error. Take a look at the list of events (a part of the output of
kubectl describe pod aes-go-00001-deployment-86749dbdf9-qcrzc
)Note the second last line which says VM config for pod does not exist. I saw the same mentioned on the vhive screen.
kn service list
gives the outputLogs
kubectl describe pod aes-go-00001-deployment-fdd5c869b-dx6sz
: kubectl-decribe-pod.logkubectl get service
: kubectl-get-service.logkubectl get pods -A
: kubectl-get-pods.log