Open muroj opened 5 years ago
@muroj thx for issue. One question afaik I understand the issue, can you confirm that if you create for the 1st time a domain with running
= false this work, but if you update
( I emphatise this), the update doesn't work?
Just to be sure on this. thx!
Afaik the update mechanism isn't working but the creation should work. thx for confirmation!
Hi @MalloZup, thanks for response. Yes I can confirm that when starting from scratch (empty terraform state) with running="false"
the domain is created but not started (as expected). Output from virsh list --all
confirms this. Furthermore, changing running="true"
and running terraform apply
again will successfully start the domain. However, changing back to running="false"
does not affect the running domain.
Let me know I can provide libvirtd logs if they are useful.
@muroj thx! I don't think the libvirt logs are needed here.
The situation is really well described and we have an HOWTO reproduce. thx so far
I'm providing a short description for people who perhaps want to contribute:
On the highlevel the problem is following:
currently when an user specify running
= false, this works only when we have the domain is created, but not updated
See later the functions.
The main problem is because we don't have a function during the update
lifecycle of the domain.
the function destroyDomainByUserRequest
destroy (shutdown) only a domain during the create
lifecycle of domain
we should in theory have a function called like updateRunningStatus
which act as shutting down or turn on a domain.
This function should be added during the lifecycle update and also some testAcc should be added + doc as usual
System Information
Linux distribution
Ubuntu 18.04.2 LTS
Terraform version
Provider and libvirt versions
Checklist
[ ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[x] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
Changing
running = "false"
domain argument has no effect. Yetterraform apply
reports all that update was successful. Same as #119Setup
Steps to Reproduce Issue
Change running to
false
->terraform apply
Guest is still running on host