Bug 1315886

Summary: Template Edit dialog loads SPICE as Graphics protocol even if using VNC
Product: [oVirt] ovirt-engine Reporter: nicolas
Component: Frontend.WebAdminAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED CURRENTRELEASE QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: medium    
Version: 3.6.3.3CC: bugs, mavital, mgoldboi, michal.skrivanek, mperina, tjelinek
Target Milestone: ovirt-3.6.5Flags: rule-engine: ovirt-3.6.z+
mgoldboi: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+
Target Release: 3.6.5   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 3.6.5-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-21 14:37:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description nicolas 2016-03-08 21:37:59 UTC
Description of problem:

When editing a template, Graphics protocol is set to SPICE. When changed to VNC, oVirt seems to store changes but when edited again SPICE is still selected.

Version-Release number of selected component (if applicable):

3.6.3.4-1

How reproducible:

Always

Steps to Reproduce:
1. Go to the Templates tab
2. Select one and click Edit
3. Go to Console.
4. As graphics protocol SPICE will be selected.
5. Change it to VNC
6. Edit the template again and open the Console submenu

Actual results:

SPICE is still selected.

Expected results:

VNC should be selected.

Additional info:

Also, the VM from which this template was created already had the VNC protocol. When creating the template, it was automatically changed to SPICE.

There seems to be no error in the logs:

2016-03-08 21:28:33,525 WARN  [org.ovirt.engine.core.dal.job.ExecutionMessageDirector] (default task-10) [174e92a1] The message key 'UpdateVmTemplate' is missing from 'bundles/ExecutionMessages'
2016-03-08 21:28:33,628 INFO  [org.ovirt.engine.core.bll.UpdateVmTemplateCommand] (default task-10) [174e92a1] Running command: UpdateVmTemplateCommand internal: false. Entities affected :  ID: f377eb7f-885c-4443-9b0c-bf6ba8e34c21 Type: VmTemplateAction group EDIT_TEMPLATE_PROPERTIES with role type USER
2016-03-08 21:28:33,652 INFO  [org.ovirt.engine.core.bll.UpdateGraphicsDeviceCommand] (default task-10) [76119083] Running command: UpdateGraphicsDeviceCommand internal: true. Entities affected :  ID: f377eb7f-885c-4443-9b0c-bf6ba8e34c21 Type: VmTemplateAction group EDIT_VM_PROPERTIES with role type USER
2016-03-08 21:28:33,667 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-10) [76119083] Correlation ID: 174e92a1, Job ID: 25e6f7eb-35c4-4c1a-8cfe-6ee82169da30, Call Stack: null, Custom Event ID: -1, Message: Template Ubuntu configuration was updated by admin@internal.

Comment 1 nicolas 2016-03-09 17:34:55 UTC
Just to provide some additional info:

It seems that saving the template indeed stores changes into DB:

In [1]: t = kvm.templates.get(name='test')
In [2]: disp = t.get_display()
In [3]: disp.get_type()
Out[3]: 'vnc'

The thing is that whenever the Edit dialog is opened, the selection is changed to SPICE every time. If you don't forget to change it to VNC each time you save some changes, nothing wrong happens, but if you forget, SPICE is stored as it is selected by default even if the actual value is VNC.

Comment 2 Red Hat Bugzilla Rules Engine 2016-03-10 16:36:01 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 3 meital avital 2016-04-10 11:39:52 UTC
Verified rhevm-3.6.5.1-0.1.el6

Verified  Steps:
1. Go to the Templates tab
2. Select one and click Edit
3. Go to Console.
4. As graphics protocol SPICE will be selected.
5. Change it to VNC
6. Edit the template again and open the Console submenu
7. Verified that the graphics protocol change to VNC

Also verified that when created a Teammate of VM with VNC -> the Template created with VNC.