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

subfolders of libvirt-provider directory has to be configurable #212

Open
lukas016 opened this issue Mar 1, 2024 · 1 comment
Open

subfolders of libvirt-provider directory has to be configurable #212

lukas016 opened this issue Mar 1, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers prio-low

Comments

@lukas016
Copy link
Contributor

lukas016 commented Mar 1, 2024

Summary

Directory set by --libvirt-provider-dir flag contains 3 subfolders (store, machines, images) currently.
It can create problem because machine store contains api.Machine objects which serve for managing of VM. Folders machines and images contains os images, empty disks and additional files for vm.
Root cause is shared volume, where libvirt-provider doesn't monitor capacity.
It means machines and os images can affects libvirt-provider logic and block creating of api.Machine objects.
Monitoring of volume capacity will discuss in issue: #182

Ideally solution doesn't exist because it depends on structure of host volumes/filesystem.
Simplest solution for us will do every subfolders in libvirt-provider-dir configurable with arguments and administrator can set it as he will need.

If we want to keep all information together in libvirt-provider-dir, we can use symlink.

Example:
I have host machine with 48cpu cores, 64gb ram and volume with libvirt-provider-dir has 100gb capacity.
i will create one machine with 2cpu, 2gb ram and os disk with size 10gb.
Later i will add additional empty disk with capacity 90gb.
Currently i have available 46cpu cores, 62gb ram and 0gb capacity in libvirt-provider-dir (ignore rounding problem)
I will create second machine but operation will fail because i cannot create file in libvirt-provider-dir/store/
But libvirt-provider will still report available capacity for machine classes because we don't monitor volume capacity.

Basic example

--libvirt-provider-dir=/home/user/.libvirt-provider

These parameters below can be optional. If they aren't set, we will use current logic.

--libvirt-provider-dir-store=/var/lib/libvirt-provider/store
--libvirt-provider-dir-machines=/var/lib/libvirt-provider/machines
--libvirt-provider-dir-images=/var/tmp/libvirt-provider/images

Motivation

Minimize side effects of vms to libvirt-provider logic. Add more flexibility for administrator how can use libvirt-provider.

@lukas016 lukas016 added enhancement New feature or request prio-low labels Mar 1, 2024
@github-project-automation github-project-automation bot moved this to Todo in Compute Mar 1, 2024
@lukas016
Copy link
Contributor Author

lukas016 commented Mar 4, 2024

@afritzler @lukasfrank @hardikdr could you approve/unapprove this issue before i will start work on it.

@lukas016 lukas016 added the good first issue Good for newcomers label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers prio-low
Projects
Status: Todo
Development

No branches or pull requests

1 participant