[Ovirt-devel] Re: [PATCH] added ability to reprovision vm via edit vm form

Mohammed Morsi mmorsi at redhat.com
Fri Sep 12 15:04:48 UTC 2008

Scott Seago wrote:
> Mohammed Morsi wrote:
>> ---
>>  wui/src/app/controllers/vm_controller.rb |   73
>> +++++++++++++++++++++++++-----
>>  wui/src/app/views/vm/_form.rhtml         |    6 ++-
>>  2 files changed, 65 insertions(+), 14 deletions(-)
> This all looks good so far, but I think there's still something
> missing. From what I see here, I don't think the cobbler system is 
> being created in the reprovisioning case.
In the patch, the very first line added (to VmController.update) is a
call to _setup_vm_provision(params), a method I added below to update
the cobbler system if found, else create it. If I am misunderstanding
something, please clarify.

> Right the cobbler system is created in taskomatic in the create_vm
> action, but this won't be run in the reprovisioning case.
You bring up a good point here about an inconsistency, in the create vm
case, taskomatic handles creating the vm, where as in the edit case
which I added with this patch, the vm controller takes care of it. Will
probably work, but as mentioned it is not consistent and probably should
be taken care of by one component. Right now we could probably easily
add a call to my new _setup_vm_provision(params) method in

> It's not completely obvious how we'd resolve this, but we need to
> create and/or modify the cobbler system before restarting the VM.
> Darryl -- from the cobbler point of view, what action is required when
> a cobbler profile is changed for a system -- do we just edit the
> cobbler system? i.e. retrieve it by name (UUID), and modify, or do we
> have to delete it and recreate one?
> In any case, we'll need an explicit taskomatic task to be run before
> restarting the VM -- and this needs to happen any time the
> provisioning information is changed -- but it should probably not
> happen when we're not reprovisioning.
Is there a definitive reason for making taskomatic handle the cobbler
update as opposed to the rails application?


More information about the ovirt-devel mailing list