-
Notifications
You must be signed in to change notification settings - Fork 469
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
support for storage pool resource #435
Comments
@alxbse ciao yop, afaik we never added the You can also have a look at https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/CONTRIBUTING.md ( once the feature done we need always testacc) Also keep in mind to implement the 4 crud ops: Ciao Thx, feel free to ask more for any kind of question you have! 💘 @dmacvicar cc |
It is certainly something that we haven't given priority as most users manage their own pools for a simple reason: data. I would be open to add support for managing pools as long as it takes into account that we don't want then users coming back "hey, but libvirt deleted my data on destroy!". Also, given that there are many types of pools, and they all have different options, and that we don't want a 1:1 mapping between XML and HCL, it is important to design the schema so that it is easy to use, powerful enough to be useful, and clever enough to be extendable to more pool types later. So, it may be helpful that you already have some idea how the schema will look like, and may be discuss it a bit, before creating lot of code. |
IMO pools are not supposed to be managed by Terraform. |
Just FYI, I've a WIP patch for this. Will submit soon. |
@zeenix keep in mind comment #435 (comment) as acceptance criteria of pr. For any help feel free to ask thx a lot for your help ! 🌞 |
@MalloZup Thanks for the reminder. To be honest, I hadn't thought of the lifecycle. What I had in mind is a simple API that allows one to create and destroy a filesystem-based pool, just like volume. As for the destruction, how about we simply error out if pool is attempted to be destroyed when it has non-zero volumes in it? I'm very new to Terroform so please let me know if that doesn't work. |
@zeenix np.
An update operation is like when you run Imagine we have Pool are kind of global variable. If you modify a pool, it can have consequences. on all domain, so we migh need some extra attention on update some attribute of the pool in a idempotent way this regarding the lifecycle.
extra-reading: So resuming before we accept even a This is not to be picky, but is more the nature of the libvirt project itself which is complicated and beautiful project .. 😁 |
@MalloZup Thanks so much for such an informative reply. About update, here is the schema I went with:
The last 3 are supposed to be read-only (that's what As for modification of 'default' pool, I don't think it was meant to be used by the whole world. Apps/services should be creating and managing their own pools if they want to modify/manage them in any way. So I am not sure if we should be worrying about consequences of updating pools to domains etc. P.S. While I'm new to terraform, Go and other tech, I have years of experience with libvirt and have even added new API in there at some point (I was one of the GNOME Boxes creators and maintainer). My experience isn't very fresh though. :) |
nice! @zeenix i will read it later on |
@zeenix sorry for delay. to me looks good. Feel free to send a pr and we can continue discussion there. |
@MalloZup No worries about the late response and thanks so much for being so welcoming. I am currently trying to get the tests passed and in the process learning how Go tests work. :) After that, I'll add the update operation and send a PR your way. :) |
This patch adds a resource type for libvirt storage pool. Known issue: The tests `TestAccLibvirtPool_ManuallyDestroyed` and 'TestAccLibvirtPool_UniqueName' currently fail. I failed to find out why yet. Fixes dmacvicar#435.
This patch adds a resource type for libvirt storage pool. Known issue: The test `TestAccLibvirtPool_ManuallyDestroyed` and currently fail. I failed to find out why yet. Fixes dmacvicar#435.
This patch adds a resource type for directory-based libvirt storage pool. Known issue: The test `TestAccLibvirtPool_ManuallyDestroyed` and currently fail. I failed to find out why yet. Fixes dmacvicar#435.
This patch adds a resource type for directory-based libvirt storage pool. Known issue: The test `TestAccLibvirtPool_ManuallyDestroyed` and currently fail. I failed to find out why yet. Fixes dmacvicar#435.
This patch adds a resource type for directory-based libvirt storage pool. Known issue: The test `TestAccLibvirtPool_ManuallyDestroyed` and currently fail. I failed to find out why yet. Fixes dmacvicar#435.
This patch adds a resource type for directory-based libvirt storage pool. Fixes dmacvicar#435.
This patch adds a resource type for directory-based libvirt storage pool. Fixes dmacvicar#435.
This patch adds a resource type for directory-based libvirt storage pool. Fixes dmacvicar#435.
This patch adds an experimental resource type for libvirt storage pool. Currently only directory-based pool are supported. Fixes dmacvicar#435.
This patch adds an experimental resource type for libvirt storage pool. Currently only directory-based pool are supported. Fixes dmacvicar#435.
This patch adds an experimental resource type for libvirt storage pool. Currently only directory-based pool are supported. Fixes dmacvicar#435.
This patch adds an experimental resource type for libvirt storage pool. Currently only directory-based pool are supported. Fixes dmacvicar#435.
Version Reports:
Distro version of host:
Ubuntu Bionic 18.04
Terraform Version Report
v0.11.8
Libvirt version
4.7.0
terraform-provider-libvirt plugin version (git-hash)
df6aed4
Description of Issue/Question
There doesn't seem to be any support for managing storage pools or any mentions regarding it. I've hacked together some very basic support in this provider for creating and deleting a default pool but I don't want to spend too much time on it if there is maybe a reason for it not being supported?
Would be happy to contribute the support for it, at least for basic dir and filesystem pool types.
The text was updated successfully, but these errors were encountered: