Description of problem: When a before_vm_hibernate hook fails (exit code 2), the resulting vm state is "paused". To be consistant with other hooks, the hook should leave the vm in the state it was before the action was started (running). Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Run vm 2. Place a hook script with a 2 exit code in before_vm_hibernate hook dir 3. Suspend vm 4. The vm will go into the paused state. Actual results: VM is paused Expected results: VM should go back to running, or alternatively should never be paused. Additional info: Cause: After hook failure, vm.cont() is called to continue the vm, but the state of the vm (Saving State) does not allow for this, exiting the method (error message: cannot cont while Saving State). VM state needs to be changed before calling vm.cont (I tried removing the if statement which checks the state solves the problem). Probably a better solution would be to change the place where the hook is executed. Currently it is done inside migrate.SourceThread, only after the vm state has been paused. Could it be called before migrate.SourceThread is even started?
This bug is not marked for z-stream, yet the milestone is for a z-stream version, therefore the milestone has been reset. Please set the correct milestone or add the z-stream flag.
In oVirt testing is done on single release by default. Therefore I'm removing the 4.0 flag. If you think this bug must be tested in 4.0 as well, please re-add the flag. Please note we might not have testing resources to handle the 4.0 clone.
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.
oVirt 4.0 beta has been released, moving to RC milestone.
we're past RC, this is not a blocker
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.
Verify with: Engine: 4.2.0-0.0.master.20170104114928.git5490b36.el7.centos Host: OS Version:RHEL - 7.3 - 7.el7 OS Description:Red Hat Enterprise Linux Server 7.3 (Maipo) Kernel Version:3.10.0 - 514.el7.bug1404060_20.x86_64 KVM Version:2.6.0 - 28.el7_3.3 LIBVIRT Version:libvirt-2.0.0-10.el7_3.2 VDSM Version:vdsm-4.20.0-128.git7001c0a.el7.centos Steps: 1. Run vm 2. Place a hook script with a 2 exit code in before_vm_hibernate hook dir 3. Case 1: Suspend vm 4. Remove hook script 5. Case 2: Suspend vm Results: Case 1: VM did not suspended, vm in running. Case 2: VM move to suspend state