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

Unik doesn't create firecracker socket and clean up leftover files #175

Open
gcetusic opened this issue Dec 11, 2018 · 0 comments
Open

Unik doesn't create firecracker socket and clean up leftover files #175

gcetusic opened this issue Dec 11, 2018 · 0 comments

Comments

@gcetusic
Copy link
Contributor

gcetusic commented Dec 11, 2018

When trying to run firecracker this error occurs:

goc@gudmund:~/unik$ ./unik run --instanceName filter_instance --imageName filter
INFO[0000] running unik run                              env="map[]" host="localhost:3000" imageName=filter instanceName=filter_instance mounts="map[]"
ERRO[0000] failed running instance: [cmd/run.go:98] running image failed: %v: {[client/instances.go:103] failed with status 500: Put http://localhost/machine-config: dial unix /home/goc/.unik/firecracker/instances/filter_instance/firecracker.sock: connect: no such file or directory} 

After failing to run, it can't be retried because it doesn't clean up the files:

goc@gudmund:~/unik$ ./unik run --instanceName filter_instance --imageName filter
INFO[0000] running unik run                              env="map[]" host="localhost:3000" imageName=filter instanceName=filter_instance mounts="map[]"
ERRO[0000] failed running instance: [cmd/run.go:98] running image failed: %v: {[client/instances.go:103] failed with status 500: [firecracker/run_instance.go:52] can't create instance dir: {mkdir /home/goc/.unik/firecracker/instances/filter_instance: file exists}} 

Output of the daemon (with some prints added):

INFO[0001] Called startVMM(), setting up a VMM on /home/goc/.unik/firecracker/instances/lambda_go1/firecracker.sock INFO[0001] Terminal Program: xterm INFO[0001] Bin path: /home/goc/firecracker INFO[0001] firecracker exited: status=0 INFO[0001] returning from startVMM() time="2018-12-11T21:22:50+01:00" level=debug msg="Creating FIFO /home/goc/.unik/firecracker/instances/lambda_go1/logs.fifo" time="2018-12-11T21:22:50+01:00" level=debug msg="Creating FIFO /home/goc/.unik/firecracker/instances/lambda_go1/metrics.fifo" WARN[0001] setupLogging() returned Put http://localhost/logger: dial unix /home/goc/.unik/firecracker/instances/lambda_go1/firecracker.sock: connect: no such file or directory. Continuing anyway. ERRO[0001] PutMachineConfiguration returned [PUT /machine-config][204] putMachineConfigurationNoContent time="2018-12-11T21:22:50+01:00" level=debug msg="stopVMM(): sending sigterm to firecracker" time="2018-12-11T21:22:50+01:00" level=error msg="Firecracker Init returned error Put http://localhost/machine-config: dial unix /home/goc/.unik/firecracker/instances/lambda_go1/firecracker.sock: connect: no such file or directory" time="2018-12-11T21:22:50+01:00" level=error msg="error handling request" error="Put http://localhost/machine-config: dial unix /home/goc/.unik/firecracker/instances/lambda_go1/firecracker.sock: connect: no such file or directory" time="2018-12-11T21:22:50+01:00" level=debug msg="Completed 500 Internal Server Error in 69.066402ms\n"

My guess is that the problem is INFO[0001] firecracker exited: status=0
This exit handler function waits and the process it's waiting for (cmd.Start()) is finished too soon (removes the socket file)

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

1 participant