----- Original Message -----
From: "Itamar Heim" <iheim(a)redhat.com>
To: "Omer Frenkel" <ofrenkel(a)redhat.com>, "Tomas Jelinek"
<tjelinek(a)redhat.com>
Cc: "engine-devel" <engine-devel(a)ovirt.org>
Sent: Wednesday, December 4, 2013 5:29:57 PM
Subject: Re: [Engine-devel] [engine-devel] instance type as top-level entity
On 12/04/2013 02:17 PM, Omer Frenkel wrote:
>
>
> ----- Original Message -----
>> From: "Tomas Jelinek" <tjelinek(a)redhat.com>
>> To: "engine-devel" <engine-devel(a)ovirt.org>
>> Cc: "Omer Frenkel" <ofrenkel(a)redhat.com>
>> Sent: Wednesday, December 4, 2013 2:14:06 PM
>> Subject: [engine-devel] instance type as top-level entity
>>
>> 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
>>
>
> according to the wiki (and discussions we had) instance type is bounded to
> a cluster (even if only as a changeable default)
> so i dont think there is an issue..
where in the wiki please?
the way i read the wiki its DC level, just like templates?
OK, it seems I have not asked the question correctly. Let me rephrase it:
Since we are going to provide default (predefined) instance types which the user is not
allowed to delete I assume this instance types should
be available for the whole system (not only for the default cluster) just like blank
template.
This brings up a question if all the other instance types are going to be also system
level and if yes, how are we going to solve it technically.
We still have the option to implement the instance types as templates and the default
instance types as blank template, but the question is if this is
what makes most sense.
The wiki currently says that the instance type is connected to cluster using vds_group_id
field but as I have started some implementation this
question popped up in my mind (not yet documented on wiki - will be according to the
result of this discussion).
BTW the question if the instance types are top level or not leads us to a different
question - where to put them in GUI?
- If the instance type is a top level entity the best place to have it is the configure
dialog (top right corner)
- If the instance type is not a top level entity the best place to have it is possibly a
main tab (or part of the template main tab)