auraed icon indicating copy to clipboard operation
auraed copied to clipboard

Manage multiple auraed instances

Open krisnova opened this issue 3 years ago • 3 comments

Right now we can start 2 auraed instances... we shouldn't be able to do that

krisnova avatar Sep 26 '22 01:09 krisnova

If we decide to integrate firecracker into auraed, we'd need to spawn a second, "jailed", auraed instance from the main (pid 1) auraed instance. This second instance would then act as the MicroVM's hypervisor.

If you simply try to start two auraed instances in parallel, there'll be an error that the socket is already in use. I'm not sure if we really got a problem with multiple auraed instances.

MalteJ avatar Oct 01 '22 14:10 MalteJ

ahh sorry, I haven't tested starting auraed twice. The problem is this line: https://github.com/aurae-runtime/auraed/blob/755efd3527c371ad521eda03011dc2e70892d17c/src/lib.rs#L100

During initialization of auraed we remove the socket if it already exists. Probably the file descriptor stays open so the first auraed keeps running, but the file is gone and replaced by the second auraed's socket.

MalteJ avatar Oct 01 '22 20:10 MalteJ

Probably the above mentioned line should be removed completely. Instead we should delete the socket during auraed's shutdown as described in #36

MalteJ avatar Oct 01 '22 20:10 MalteJ