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

Properly handle errors and clear VM artefacts by using *exec.Cmd #35

Open
darkodraskovic opened this issue Aug 16, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@darkodraskovic
Copy link
Collaborator

darkodraskovic commented Aug 16, 2023

Currently, we launch a VM and we don't wait for the /usr/bin/qemu-system-x86_64 execution to finish. We do like so in order not to block manager while the launched VM is running.

Also, when VMs are running, they create artefacts, especially firmware vars file and disk image file. Currently, we delete those files on SIGTERM. On SIGKILL files are not properly removed. We would like to clean up artefacts immediately after the VM shuts down.

For both of these tasks we need to use *exec.Cmd ptr to struct that is returned when we run qemu-system-x86_64 command.

NB: Manager should probably have some sort of in RAM VM key value store, like Redis, so it knows which machines are currently running. This could also be probably solved via libvirt or maybe QEMU itself (by corresponding queries). This is important because when Manager restarts or while running, it needs to know what VMs are spinned up.

NB: This is connected to ultravioletrs/agent-OLD#42.

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

No branches or pull requests

1 participant