Bug 1414086 - Remove redundant video cards when no graphics available for a VM and also add video cards if one graphics device exists
Summary: Remove redundant video cards when no graphics available for a VM and also add...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ovirt-4.1.1
: 4.1.1
Assignee: Sharon Gratch
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-17 17:26 UTC by Sharon Gratch
Modified: 2017-04-21 09:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:39:35 UTC
oVirt Team: Virt
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 70694 master MERGED restapi + engine : handle scenarios for graphicsconsoles APIs 2017-01-26 16:01:07 UTC
oVirt gerrit 71476 ovirt-engine-4.1 MERGED restapi + engine : handle scenarios for graphicsconsoles APIs 2017-02-02 12:50:21 UTC

Description Sharon Gratch 2017-01-17 17:26:26 UTC
Description of problem:
In case of using rest API with /graphicsconsoles extension, there are cases in which a VM or a Template or an Instance-Type are left with graphic devices without any video device or with video device without any graphic devices.

This can happen When using the following REST APIs:
DELETE  ..api/instancetypes/<instancetype-id>/graphicsconsoles/<console-id>
DELETE  ..api/templates/<template-id>/graphicsconsoles/<console-id>
DELETE  ..api/vms/<vm-id>/graphicsconsoles/<console-id>
Or:
POST  ..api/instancetypes/<instancetype-id>/graphicsconsoles
POST  ..api/templates/<template-id>/graphicsconsoles
POST  ..api/vms/<vm-id>/graphicsconsoles
<graphics_console>
<protocol>type</protocol>
</graphics_console>



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

How reproducible:
100%

Steps to Reproduce:
For example:
1.run the following API for a VM with QXL,SPICE devices:
DELETE  ..api/vms/<vm-id>/graphicsconsoles/<console-id of SPICE>

Actual results:
As a result of this API, the SPICE device is removed but the QXL device still exists.

Expected results:
In case of no graphic devices, the QXL should be removed and the VM should become headless.

Comment 1 Israel Pinto 2017-02-12 13:49:07 UTC
Verify with:
Engine: Red Hat Virtualization Manager Version: 4.1.1-0.1.el7
Host:
OS Version:RHEL - 7.3 - 7.el7
Kernel Version:3.10.0 - 550.el7.x86_64
KVM Version:2.6.0 - 28.el7_3.3.1
LIBVIRT Version:libvirt-2.0.0-10.el7_3.4
VDSM Version:vdsm-4.19.5-1.el7ev
SPICE Version:0.12.4 - 20.el7_3

Steps:
Run delete and check that 'Headless Mode' is set:
DELETE  ..api/instancetypes/<instancetype-id>/graphicsconsoles/<console-id>
DELETE  ..api/templates/<template-id>/graphicsconsoles/<console-id>
DELETE  ..api/vms/<vm-id>/graphicsconsoles/<console-id>

Run update (with POST) on resource in 'Headless Mode'
and check that graphics console is set:
POST  ..api/instancetypes/<instancetype-id>/graphicsconsoles
POST  ..api/templates/<template-id>/graphicsconsoles
POST  ..api/vms/<vm-id>/graphicsconsoles

Body:
<graphics_console>
<protocol>type</protocol>
</graphics_console>

PASS in all resources


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