Bug 999550 - [RHEVM][webadmin] When creating a VM from template, the dialog presents incorrect VNIC profiles
Summary: [RHEVM][webadmin] When creating a VM from template, the dialog presents incor...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal
Version: 3.3.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 3.3.0
Assignee: Lior Vernia
QA Contact: Nobody
URL:
Whiteboard: network
Depends On: 996568
Blocks: 1019461
TreeView+ depends on / blocked
 
Reported: 2013-08-21 14:31 UTC by tgeft
Modified: 2016-02-10 19:48 UTC (History)
9 users (show)

Fixed In Version: is15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine log (951.46 KB, text/x-log)
2013-08-21 14:31 UTC, tgeft
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 18460 0 None None None Never

Description tgeft 2013-08-21 14:31:22 UTC
Created attachment 788895 [details]
engine log

Description of problem:
When creating a VM from a template, the VNIC profile drop down box shows the default 'rhevm' profile regardless of the profile in the template and the user can select any VNIC profile.

Instead, the box should show the profile in the template and there shouldn't be a way to change it.


Version-Release number of selected component (if applicable):
engine version: 3.3.0-0.15.master.el6ev

How reproducible:
100%


Steps to Reproduce:
1. Create a VM with some profile on its VNIC.
2. Create a template from the VM.
3. Open the new VM dialog and select the template.
4. Select a different VNIC profile from the one in the template and create the VM.

Actual results:
Any VNIC profile can be selected for the new VM's VNIC. When hitting 'ok', the VNIC will be created with the same profile as in the template (regardless of the user's choice).

When a different profile is selected than the one in the template, an error is shown saying that the VNIC cannot be updated when the VM is not in up or down state (but the VM still gets created without problems).

Expected results:
Only the profile in the template should be shown in the dialog and it should be grayed out without an option to change it.


Additional info:

Comment 1 Itamar Heim 2013-08-21 15:18:52 UTC
"Instead, the box should show the profile in the template and there shouldn't be a way to change it"
"Only the profile in the template should be shown in the dialog and it should be grayed out without an option to change it."

why?

the bug describes *creating* a new VM, not editing it, so why shouldn't profile be editable (i agree default should be the one from the template, *if* the user has permission to that profile).

Comment 2 Moti Asayag 2013-08-21 19:31:25 UTC
(In reply to Itamar Heim from comment #1)
> "Instead, the box should show the profile in the template and there
> shouldn't be a way to change it"
> "Only the profile in the template should be shown in the dialog and it
> should be grayed out without an option to change it."
> 
> why?
> 
> the bug describes *creating* a new VM, not editing it, so why shouldn't
> profile be editable (i agree default should be the one from the template,
> *if* the user has permission to that profile).

The creation of a VM from template uses the template vnics for the VM nics.
The AddVmFromTemplate api doesn't exposes the set of vm interfaces explicitly.

The VM interfaces as presented on the 'New VM' dialog are being compared to the current vm vnics, and if there is a difference between them, a specific Update Vnic command is sent.

Currently, we support updating vnics only when the VM status is up or down. When the vm is being created, it status changes to ImageLocked which cause the vnic update operation to fail.

We can consider extending the supported vm statuses for updating a vnic, so the update operation will be enabled at that time.

However, in the list of the vnics on the 'New VM' dialog vnic which aren't using any network/vnic profile will not be presented, therefore cannot be modified (which seems the more reasonable vnics to change, i.e. vnics which their vnic profile no longer exists in the current DC)

Comment 3 Itamar Heim 2013-08-21 19:36:37 UTC
or pass the needed information to AddVmFromTemplate so it will be created correctly to begin with?

Comment 4 Moti Asayag 2013-08-22 06:46:11 UTC
(In reply to Itamar Heim from comment #3)
> or pass the needed information to AddVmFromTemplate so it will be created
> correctly to begin with?

The only consideration for not supporting it ATM is time. A quick fix would be supporting updating the vnics when the vm is on ImageLocked status (as already supported for adding new vnic).

Extending the API of AddVm and AddVmFromTemplate requires further work both on UI and on REST API. I'll open a bug for it, so we could refer to it separately from this one, while this one is relatively easy to fix (though not optimal).

Comment 5 Lior Vernia 2013-08-22 12:54:19 UTC
Just to make sure that I understand the desired solution comprises two fixes:

1. The default suggested profile for each VNIC should be that of the template (i.e. the one that existed on the source VM at the time of the template's creation, or blank if that profile had been removed).

2. These selections should stay changeable, but obviously in case they've been changed - the user's choice should be reflected on the newly-created VM.

Please confirm or correct me if I got something wrong.

Comment 6 Moti Asayag 2013-08-22 13:06:24 UTC
(In reply to Lior Vernia from comment #5)
> Just to make sure that I understand the desired solution comprises two fixes:
> 
> 1. The default suggested profile for each VNIC should be that of the
> template (i.e. the one that existed on the source VM at the time of the
> template's creation, or blank if that profile had been removed).
> 
> 2. These selections should stay changeable, but obviously in case they've
> been changed - the user's choice should be reflected on the newly-created VM.
> 
> Please confirm or correct me if I got something wrong.

Confirmed. In the scope of this bug the UpdateVmInterface command should support modifying the vnic when the Vm is in ImageLocked status as well (same as in adding new vnic).

A follower bug will be open to support extending the AddVm and AddVmFromTemplate api to receive the required vm interfaces so the vm creation as requested will be executed at once.

Comment 7 Moti Asayag 2013-08-27 13:28:24 UTC
The fix for the UpdateVmInterface should be addressed as part of fixing bug 996568 "CanDoAction on UpdateVmInterfaceCommand when creating VM from template".

So fixing this bug should handle UI side only.

Comment 8 tgeft 2013-09-18 08:38:13 UTC
works on is15

Comment 11 Itamar Heim 2014-01-21 22:30:17 UTC
Closing - RHEV 3.3 Released

Comment 12 Itamar Heim 2014-01-21 22:30:19 UTC
Closing - RHEV 3.3 Released

Comment 13 Itamar Heim 2014-01-21 22:33:21 UTC
Closing - RHEV 3.3 Released


Note You need to log in before you can comment on or make changes to this bug.