Error updating virtual machine groups

Hi

We are testing the new 5.12.0.1 release in our cluster and we found an issue updating vm group templates. We do not know if this is just a known issue or just a feature in 5.12 (we didn’t have this issue in 5.10).

Basically we want to update one vm group that is already used with some VMs (with anti-affinity roles in our case)

$ onevmgroup list
ID USER GROUP NAME VMS ROLES
0 oneadmin oneadmin zorua_vmgroups 24 master_groupa, master_groupb, slap,

But in our case we only want to update the VM group template to add a new flag like COLOR = "red"

$ onevmgroup update 0
NAME=“zorua_vmgroups”
COLOR=“red”

But we get this error:

[one.vmgroup.update] Cannot update template. VM Group has 24 VMs

We didn’t have this issue in 5.10, is this a known issue or its just made on purpose? It is not possible to change anything in the template if the vm group is already being used by any VM?

Thanks in advance!
Álvaro

Hello @alvaro_simongarcia,

I’ve just tested it in OpenNebula 5.10.5 version and I get the same error:

$ onevmgroup update 0
[one.vmgroup.update] Cannot update template. VM Group has 1 VMs

Looking into the code this check have not been modified for 4 years: https://github.com/OpenNebula/one/blame/master/src/vm_group/VMGroup.cc#L460. Are you sure you were able to perform this action before?

Hi @cgonzalez

Thanks a lot for your reply.

Yes, that is possible, maybe we were lucky and we didn’t detect this until now.

Just to give you more information, we are deploying our opennebula clusters with Quattor administration toolkit. Quattor OpenNebula plugin only tries to update any template when it detects any change, probably our current 5.12 template it was changed (probably a trivial change like a different alphabetic order from the string) and quattor tries to update the onevmgroup template via rpc api and we get this error.

but this seems to be an onevmgroup issue no? it should be able to update or at least do not show an error when you try to update the onevmgroup template, even if it is being used by any VM.

Cheers
Álvaro