You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The VM group gets created with a role called random which lists the 11 hosts in the anti_affined list.
Actual behavior
The VM Group gets created with a role called random which lists the 11 hosts in the anti_affined list, however, on subsequent runs, Terraform tries to add all but the last host to the anti_affined list.
Steps to Reproduce
Create a VM group:
# opennebula_virtual_machine_group.random will be created
+ resource "opennebula_virtual_machine_group" "random" {
+ default_tags = (known after apply)
+ gid = (known after apply)
+ gname = (known after apply)
+ group = "oneadmin"
+ id = (known after apply)
+ name = "team-random-group"
+ permissions = "642"
+ tags_all = (known after apply)
+ uid = (known after apply)
+ uname = (known after apply)
+ role {
+ host_affined = (known after apply)
+ host_anti_affined = [
+ 22,
+ 21,
+ 20,
+ 32,
+ 28,
+ 30,
+ 31,
+ 23,
+ 2,
+ 3,
+ 16,
]
+ id = (known after apply)
+ name = "random"
+ policy = (known after apply)
}
}
...
opennebula_virtual_machine_group.random: Creating...
opennebula_virtual_machine_group.random: Creation complete after 0s [id=18]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Run the plan again; Terraform wants to add all but the first host in the list:
# opennebula_virtual_machine_group.random will be updated in-place
! resource "opennebula_virtual_machine_group" "random" {
id = "18"
name = "team-random-group"
# (8 unchanged attributes hidden)
! role {
! host_anti_affined = [
+ 22,
+ 21,
+ 20,
+ 32,
+ 28,
+ 30,
+ 31,
+ 23,
+ 2,
+ 3,
16,
]
id = 0
name = "random"
# (1 unchanged attribute hidden)
}
}
Trying to apply the change fails (but that's on Nebula's API side), stating the group has some VMs attached:
╷
│ Error: Failed to update content
│
│ with opennebula_virtual_machine_group.random,
│ on vm_groups_team.tf line 100, in resource "opennebula_virtual_machine_group" "random":
│ 100: resource "opennebula_virtual_machine_group" "random" {
│
│ VM group (ID: 11): OpenNebula error [INTERNAL]: [one.vmgroup.update] Cannot
│ update template. VM Group has 2 VMs
╵
We can see Nebula itself already has the hosts in the VM group:
$ onevmgroup show 18
VM GROUP 18 INFORMATION
ID : 18
NAME : team-random-group
USER : oneadmin
GROUP : oneadmin
LOCK : None
PERMISSIONS
OWNER : um-
GROUP : u--
OTHER : -m-
ROLES
ID NAME POLICY AFFINED_HOSTS ANTI_AFFINED_HOST VIRTUAL_MACHINES
0 random 22,21,20,32,28,30,
TEMPLATE CONTENTS
Debug output
No response
Panic output
No response
Important factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
This issue is stale because it has been open for 30 days with no activity and it has not the 'status: confirmed' label or it is not in a milestone. Remove the 'status: stale' label or comment, or this will be closed in 5 days.
Description
Creation of a VM group is successful, subsequent runs do not try to modify the resource.
In practice, Terraform tries to update VM group with all but the first host in the
host_anti_affined
attribute.Terraform and Provider version
Terraform: 1.3.9, 1.4.6, 1.5.7
Provider: 1.2.2, 1.3.1
Affected resources and data sources
opennebula_virtual_machine_group
Terraform configuration
Expected behavior
The VM group gets created with a role called
random
which lists the 11 hosts in the anti_affined list.Actual behavior
The VM Group gets created with a role called
random
which lists the 11 hosts in the anti_affined list, however, on subsequent runs, Terraform tries to add all but the last host to the anti_affined list.Steps to Reproduce
Create a VM group:
Run the plan again; Terraform wants to add all but the first host in the list:
Trying to apply the change fails (but that's on Nebula's API side), stating the group has some VMs attached:
We can see Nebula itself already has the hosts in the VM group:
Debug output
No response
Panic output
No response
Important factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: