-
Notifications
You must be signed in to change notification settings - Fork 32
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
With the version 0.24.1 it is not possible to remove the affinity host on an existing VM. #238
Comments
Hi @bufanda, thanks for reporting this issue. It is definitely possible for terraform to handle this case properly. At the moment, I don't know if this is additional fallout from the XO api preventing empty string params (#231) or if the changes to address that caused a new bug. In any case, the provider should be able to handle this. I'm currently traveling through April 23rd, but I'm hoping to have time to address this. In the meantime, I would use terraform's ignore_changes meta argument and remove the affinity host from the UI (note the code below is an example and was not tested): resource "xenorchestra_vm" "vm_name" {
[ .. ]
lifecycle {
ignore_changes = [affinity_host],
}
} That should allow you to continue using the provider to manage these resources until the bug is fixed. |
Hi, the ignore_changes works for now. Thanks. |
I found a workaround to remove affinity. Simply set the
|
Tried it. When you have a VM stopped it won't start anymore as the affinity host wiht the pool id doesn't exists. You'll get an error message like this
|
@bufanda yeah, you're right. I should've tested that more than just checking if the host was removed. |
This will be fixed in v0.24.2, which will be available when this GitHub action completes. Sorry that this has taken quite a while to be addressed! |
I have a VM I had configured an affinity host, now with an expanded cluster and reworking some of the VM distribution I want this one particular VM to not have a affinity to one particular host anymore. So I removed the affinity host rule from the terraform file but now I get the following error.
As the affinity host rule os only optional per documentation shouldn't it be possible to remove the rule and have terraform remove the setting from the host? Or do I have to destroy the VM and recreate it. Which sure would be possible but it isn't the behaviour I would expect. As in the gui I can simply click on the 'X' to remove the affinity.
The text was updated successfully, but these errors were encountered: