Bug 1128453 - [REST API]: VM next_run do not have all fields updated.
Summary: [REST API]: VM next_run do not have all fields updated.
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: ---
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: ovirt-4.0.2
Assignee: Tomas Jelinek
QA Contact: Israel Pinto
Depends On:
TreeView+ depends on / blocked
Reported: 2014-08-10 14:18 UTC by Ilanit Stein
Modified: 2016-08-12 14:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: the next_run option was not working for graphics consoles nor for boot sequence Consequence: if there was a next run configuration available, it was not possible to find it out using the rest api Fix: added support for the ;next run for boot options and for the /graphicsconsoles subresource. Please note that the legacy <display> still does not support this option. Result: Now the user can determine both the next run configuration and the current configuration using the rest api.
Clone Of:
Last Closed: 2016-08-12 14:31:25 UTC
oVirt Team: Virt
rule-engine: ovirt-4.0.z+
ylavi: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
oVirt gerrit 32006 master MERGED rest: dont always use vm dynamic values Never
oVirt gerrit 58183 master MERGED core,restapi: /graphicsconsoles did not work properly with 'current' 2016-07-11 07:37:16 UTC
oVirt gerrit 60380 master MERGED Added the documentation of the ;current parameter to the /graphicsconsoles 2016-07-11 13:57:07 UTC
oVirt gerrit 60459 ovirt-engine-4.0 MERGED core,restapi: /graphicsconsoles did not work properly with 'current' 2016-07-11 16:10:52 UTC
oVirt gerrit 60521 model_4.0 MERGED Added the documentation of the ;current parameter to the /graphicsconsoles 2016-07-11 14:30:47 UTC

Description Ilanit Stein 2014-08-10 14:18:48 UTC
Description of problem:
Read VM next_run, via REST, show 'console', and 'boot sequence' are not updated 
with the new values, set in VM via UI Edit running VM.   
They have the value of current VM configuration.

Version-Release number of selected component (if applicable):
ovirt-engine 3.5-rc1

How reproducible:

Expected results:
VM current run should show all "NEXT BOOT" parameters.

Additional info:
The following parameters were tested as well, and their values were found CORRECT in the next_run:
memory, guaranteed memory, monitors, usb policy, cdrom change

Comment 1 Omer Frenkel 2014-08-25 11:23:31 UTC
the issue is that rest api has a feature to show 'dynamic' values (that contain the current run info) if it exists, so it overrides the next-run values.

Comment 2 Ilanit Stein 2015-10-27 12:36:30 UTC
Tested on rhevm 3.6.0-17.

Edit a running VM with these changes, that will apply only after next VM boot:
- console changed from spice to vnc
- boot sequence changed from first hard disk to network first, and then CD rom.

https://<engine ip>:443/ovirt-engine/api/vms/68cbc73b-5745-4890-aeeb-a5d66de65a44;next_run
Still the next_run output show the VM current_run, instead of next_run, as expected.

Comment 3 Red Hat Bugzilla Rules Engine 2015-10-27 12:36:37 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 5 Sandro Bonazzola 2015-11-05 08:22:16 UTC
oVirt 3.6.0 has been released on November 4th, re-targeting to 4.0 since this bug has been marked with severity < high

Comment 6 Red Hat Bugzilla Rules Engine 2015-11-16 14:07:32 UTC
This bug is flagged for 3.6, yet the milestone is for 4.0 version, therefore the milestone has been reset.
Please set the correct milestone or add the flag.

Comment 7 Sandro Bonazzola 2016-05-02 10:10:02 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 8 Yaniv Lavi 2016-05-23 13:25:47 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 9 Yaniv Lavi 2016-05-23 13:26:17 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 10 Tomas Jelinek 2016-07-18 08:11:35 UTC
Please note that the ;next_run still does not work for the legacy <display> and it will not be fixed since the <display> does not support the option to have more than one displays at once. To find the correct next_run configuration you need to check the /graphicsconsoles subresouce.

Comment 11 Israel Pinto 2016-08-02 11:45:05 UTC
Verify with:
Engine Version:
OS Version:RHEL - 7.2 - 9.el7_2.1
OS Description:Kernel Version:3.10.0 - 327.22.2.el7.x86_64
KVM Version:2.3.0 - 31.el7_2.16
LIBVIRT Version:libvirt-1.2.17-13.el7_2.5
VDSM Version:vdsm-
SPICE Version:0.12.4 - 15.el7_2.1

1. Create VM and run it
2. Edit running VM with the following parameters:
   monitors, boot sequence, guaranteed memory,
   Migration: 'Do not allow migration'
   display (VNC/SPICE/VNC+SPICE)
3. Check the UI reports the next run updates
4. Check with REST API the next_nun configuration as expected    
   in https://<engine ip>:443/ovirt-engine/api/vms/<vm_id>;next_run
   and the flag is true:

5. Display check compare current to next run:
  https://<engine ip>:443/ovirt-engine/api/vms/<vm_id>/graphicsconsoles;current
  https://<engine ip>:443/ovirt-engine/api/vms/<vm_id>/graphicsconsoles;next_run
6. Reboot VM and check that parameters updated



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