[Engine-devel] [engine-devel] instance type as top-level entity
Tomas Jelinek
tjelinek at redhat.com
Wed Dec 4 12:14:06 UTC 2013
Hey all,
I have started to work on the instance types[1] again and hit an issue. Since the instance types are supposed to be top-level entities
(e.g. without the connection to DC/Cluster) but they are modeled as templates it is not possible to store them to DB since the DB constraints violation on vm_static table
(e.g. the vds_group_id has to be unique and point to an existing vds_group).
So, I see 4 options:
1: drop the constraints on the vm_static.vds_group_id (the vds_groups_vm_static constraint)
(most simple approach but would open the door to some issues which are now guard on the DB level)
2: do the same magic [well, hacks :) ] as with the "blank" template which is in the same situation
(not exactly a nice solution to have the instance types wired to one specific cluster just to satisfy the constraint but return them all the time)
3: do not store this data in vm_static but create some new table called e.g. instance_type which would contain all of the fields from vm_static which are needed by it
(actually the best approach AFAIK but to do it correctly it would require some more refactoring to do some hierarchy of tables and not copy the fields from table to table)
4: make the instance types not top-level (e.g. bound to specific DC/Cluster)
(would bring some issues for example with the default instance types which should be present for all the DC/Clusters)
Thoughts?
Thank you,
Tomas
[1]: http://www.ovirt.org/Features/Instance_Types
More information about the Devel
mailing list