Arik Hadas has uploaded a new change for review.

Change subject: core: fix NPE when migration caused by maintenance fails
......................................................................

core: fix NPE when migration caused by maintenance fails

On failure to migrate VM from VDS which is going to maintenance, we got
NPE in ExecutionHandler while trying to end the job.

The solution is to pass the job from the MaintenanceVds command to the
InternalMigrateVm command it invokes as well.

Change-Id: If1bde265b078997507ad7f7e4b00fbd024cc3c39
Bug-Url: https://bugzilla.redhat.com/1053884
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceVdsCommand.java
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/41/25441/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceVdsCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceVdsCommand.java
index 8c62c03..26a3213 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceVdsCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceVdsCommand.java
@@ -153,6 +153,7 @@
                     parentContext.getJob().getStep(StepEnum.EXECUTING),
                     StepEnum.MIGRATE_VM,
                     
ExecutionMessageDirector.resolveStepMessage(StepEnum.MIGRATE_VM, values));
+            ctx.setJob(parentContext.getJob());
             ctx.setStep(step);
             ctx.setMonitored(true);
         } catch (RuntimeException e) {


-- 
To view, visit http://gerrit.ovirt.org/25441
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1bde265b078997507ad7f7e4b00fbd024cc3c39
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to